You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by gr...@apache.org on 2005/11/07 17:02:21 UTC

svn commit: r331290 - in /struts/tiles/trunk/xdocs: navigation.xml userGuide.xml usersGuide.xml

Author: greddin
Date: Mon Nov  7 08:02:19 2005
New Revision: 331290

URL: http://svn.apache.org/viewcvs?rev=331290&view=rev
Log:
Renamed "Users Guide" to "User Guide" and added content to it.

Added:
    struts/tiles/trunk/xdocs/userGuide.xml
      - copied, changed from r330976, struts/tiles/trunk/xdocs/usersGuide.xml
Removed:
    struts/tiles/trunk/xdocs/usersGuide.xml
Modified:
    struts/tiles/trunk/xdocs/navigation.xml

Modified: struts/tiles/trunk/xdocs/navigation.xml
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/navigation.xml?rev=331290&r1=331289&r2=331290&view=diff
==============================================================================
--- struts/tiles/trunk/xdocs/navigation.xml (original)
+++ struts/tiles/trunk/xdocs/navigation.xml Mon Nov  7 08:02:19 2005
@@ -9,7 +9,7 @@
     <menu name="Tiles">
         <item href="index.html" name="Tiles Home"/>
         <item href="installation.html" name="Installation"/>
-        <item href="usersGuide.html" name="Users Guide"/>
+        <item href="userGuide.html" name="User Guide"/>
         <item href="examples.html" name="Examples"/>
     </menu>
     <menu name="Taglib Reference">

Copied: struts/tiles/trunk/xdocs/userGuide.xml (from r330976, struts/tiles/trunk/xdocs/usersGuide.xml)
URL: http://svn.apache.org/viewcvs/struts/tiles/trunk/xdocs/userGuide.xml?p2=struts/tiles/trunk/xdocs/userGuide.xml&p1=struts/tiles/trunk/xdocs/usersGuide.xml&r1=330976&r2=331290&rev=331290&view=diff
==============================================================================
--- struts/tiles/trunk/xdocs/usersGuide.xml (original)
+++ struts/tiles/trunk/xdocs/userGuide.xml Mon Nov  7 08:02:19 2005
@@ -6,9 +6,9 @@
 
 <body>
 
-<section name="Tiles Configuration">
+<section name="1. Tiles Configuration">
 
-    <subsection name="Web Application Configuration">
+    <subsection name="1.1 Web Application Configuration">
     <p>There are several ways to configure your web application to use Tiles. The
        method you choose depends on whether you are using Tiles with another
        framework, like Struts, and which version of the Servlet specification 
@@ -81,7 +81,7 @@
     </p>      
    </subsection>
     
-    <subsection name="XML Definitions Configuration">
+    <subsection name="1.2  XML Definitions Configuration">
     <p>This section provides an overview of the Tiles XML configuration mechanism.
     </p>
     
@@ -119,17 +119,170 @@
     </tiles-definitions>    
     ]]></source>
 
+    <p>The XML example above is representative of real-life usage.  But it does
+        not illustrate every aspect of the Tiles configuration file.  We will
+        now examine each portion of the configuration file in detail.</p>
+        
+    </subsection>
+    
+    <subsection name="1.2.1 Definitions">
+        <p>A definition can define a template or a "tile."  If it is defining
+        a template its path will point to a JSP page that contains the layout
+        of the template. The definition's attributes will point to various 
+        sections of the template that can be either used as is or overriden.</p>
+        
+        <p>If a definition defines a tile it may refer to a named portion of a 
+        page such as the header, or it may refer to a reusable component, such
+        as a customer form.</p>
+        
+        <p>A template definition would be similar to the <code>mainLayout</code>
+        definition above.  It defines a template containing a layout and 5 named
+        attributes.  The "title" attribute is a String attribute that can be
+        overridden.  The "header" and "footer" attributes are pages that are
+        included in the template.  The "menu" and "body" attributes are 
+        definitions that would be defined elsewhere in the file.</p>
+        
+        <p>A tile definition would be similar to the <code>mainMenu</code>
+        definition above.  This configures a menu tile that can be included
+        anywhere on a page.</p>
+        
+        <p>The following list shows the attributes of the Definition tag.</p>
+        
+        <ul>
+            <li><strong>controllerClass</strong> 
+            The fully qualified Java class name of the controller
+            subclass to call immediately before the tiles is inserted.
+            Only one of controllerClass or controllerUrl should be
+            specified.</li>
+
+            <li><strong>controllerUrl</strong>
+            The context-relative path to the resource used as controller
+            called immediately before the tiles is inserted.
+            Only one of controllerClass or controllerUrl should be
+            specified.</li>
+
+            <li><strong>extends</strong>
+            Name of a definition that is used as ancestor of this definition.
+            All attributes from the ancestor are available to the new
+            definition. Any attribute inherited from the ancestor can
+            be overloaded by providing a new value.</li>
+
+            <li><strong>name</strong> (Required).
+            The unique identifier for this definition.</li>
+
+            <li><strong>page</strong>
+            Same as path.</li>
+
+            <li><strong>path</strong>
+            The context-relative path to the resource used as tiles to
+            insert. This tiles will be inserted and a tiles context
+            containing appropriate attributes will be available.</li>
+
+            <li><strong>role</strong>
+            Security role name that is allowed access to this definition
+            object. The definition is inserted only if the role name is
+            allowed.</li>
+            
+            <li><strong>template</strong>
+            Same as path. For compatibility with the template tag library.</li>
+        </ul>
+    </subsection>
+    
+    <subsection name="1.2.2 Put">
+        <p>The "put" element describes an attribute of a definition. Definition
+           attributes have a name and a value. The value can be specified as an 
+           xml attribute, or in the body of the <code>&lt;put&gt;</code>tag.</p>
+     
+        <p>A definition attribute can be one of three basic types.  It can be
+           a String value that is inserted into a page.  This value can be a 
+           simple String specified in the "value" attribute of the "put" tag or
+           it can be complex HTML content specified as the body of the "put" tag.
+           The attribute can also be the URL of a page to be included in another
+           page.  Thirdly, it can be the name of another Tiles definition to
+           be inserted in a page.</p>
+           
+        <p>The following list shows the attributes of the Put tag.</p>
+        
+        <ul>
+            <li><strong>content</strong>
+                Same as value.</li>
+
+            <li><strong>direct</strong>
+                Same as type="string".</li>
+
+            <li><strong>name</strong> (Required)
+                The unique identifier for this put.</li>
+                
+            <li><strong>type</strong>
+                The type of the value. Can be: string, page, template or 
+                definition. By default, no type is associated to a value. If a 
+                type is associated, it will be used as a hint to process the 
+                value when the attribute will be used in the inserted tiles. A
+                type of "string" indicates that the value should be inserted
+                directly into the content of the page.  A type of "page" or
+                "template" indicates that the value is the URL of a page that
+                should be included.  A type of "definition" indicates that the
+                value is the name of another Tiles definition that should be
+                included in the page.</li>
+                
+            <li><strong>value</strong>
+                The value associated to this tiles attribute. The "value" 
+                attribute is required if the value is not specified in the 
+                content of the "put" tag.
+                </li>
+           </ul>
+           
+    </subsection>
+    
+    <subsection name="1.2.3 PutList">
+        <p>The PutList tag is similar to the Put tag except that it allows you
+            to specify a list of attributes for a Tiles Definition.  It specifies
+            an attribute that is a Java List containing any kind of values. In 
+            the config file, the list elements are specified by nested 
+            <strong>add</strong>, <strong>item</strong> or
+            <strong>putList</strong> elements.</p>
+            
+        <p>The following list shows the attributes of the PutList tag.</p>
+        
+        <ul>
+                <li><strong>name</strong> (Required).
+                    The unique identifier for this put list.</li>
+            </ul>
+    </subsection>
+    
+    <subsection name="1.2.4 Add">
+    </subsection>
+    
+    <subsection name="1.2.5 Bean">
+    </subsection>
+    
+    <subsection name="1.2.6 Set-Property">
+    </subsection>
+    
+    <subsection name="1.2.7 Description">
+    </subsection>
+    
+    <subsection name="1.2.8 Display-Name">
+    </subsection>
+    
+    <subsection name="1.2.9 Icon">
+    </subsection>
+    
+    <subsection name="1.2.10 Large-Icon">
+    </subsection>
+    
+    <subsection name="1.2.11 Small-Icon">
     </subsection>
 </section>
 
-<section name="Using Tiles">
-    <subsection name="Inserting Tiles Into A JSP Page">
+<section name="2. Using Tiles">
+    <subsection name="2.1 Inserting Tiles Into A JSP Page">
     </subsection>
     
-    <subsection name="Using Tiles Controllers">
+    <subsection name="2.2 Using Tiles Controllers">
     </subsection>
     
-    <subsection name="Definitions Factory">
+    <subsection name="2.3 Definitions Factory">
     </subsection>
 </section>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org