rleland 02/03/29 15:30:49 Modified: src/share/org/apache/struts/config package.html src/share/org/apache/struts/taglib/nested package.html src/share/org/apache/struts/taglib/template package.html Added: src/share/org/apache/struts/config/doc-files configUML.jpg src/share/org/apache/struts/doc-files Stamp.gif jakarta-feather-small.gif src/share/org/apache/struts/taglib/nested/html/doc-files nested-html.jpg src/share/org/apache/struts/taglib/template/doc-files templateUML.jpg Log: Update more UML for JavaDoc Revision Changes Path 1.2 +10 -5 jakarta-struts/src/share/org/apache/struts/config/package.html Index: package.html =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/config/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- package.html 15 Jan 2002 19:14:26 -0000 1.1 +++ package.html 29 Mar 2002 23:30:48 -0000 1.2 @@ -1,10 +1,15 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<title>Package Documentation for org.apache.struts.config Package</title> + <title>Package Documentation for org.apache.struts.config Package</title> </head> -<body bgcolor="white"> -The "config" package contains configuration objects that correspond to elements -that may be specified in the <code>struts-config.xml</code> application -configuration file. + <body bgcolor="white"> + The "config" package contains configuration objects that correspond to elements +that may be specified in the <code>struts-config.xml</code> application configuration +file.<br> +<br> +<img src="doc-files/configUML.jpg" alt="Config UML" width="1146" height="688"> +<br> + </body> </html> 1.1 jakarta-struts/src/share/org/apache/struts/config/doc-files/configUML.jpg <<Binary file>> 1.1 jakarta-struts/src/share/org/apache/struts/doc-files/Stamp.gif <<Binary file>> 1.1 jakarta-struts/src/share/org/apache/struts/doc-files/jakarta-feather-small.gif <<Binary file>> 1.5 +121 -119 jakarta-struts/src/share/org/apache/struts/taglib/nested/package.html Index: package.html =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/package.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- package.html 24 Mar 2002 07:14:45 -0000 1.4 +++ package.html 29 Mar 2002 23:30:48 -0000 1.5 @@ -1,63 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> - <title>Package Documentation for org.apache.struts.taglib.bean Package</title> + <title>Package Documentation for org.apache.struts.taglib.nested Package</title> </head> <body bgcolor="white"> - Nested tags & supporting classes extend the base struts tags to allow - them to relate to each other in a nested nature. The fundamental logic of - the original tags don't change, except in that all references to beans and - bean properties will be managed in a nested context. <br> + Nested tags & supporting classes extend the base struts tags to +allow them to relate to each other in a nested nature. The fundamental +logic of the original tags don't change, except in that all references +to beans and bean properties will be managed in a nested context. <br> <br> <a name="doc.Description"></a> <div align="Center"> [ <a href="#doc.Intro">Introduction</a> - ] [ <a href="#doc.FoundationConcepts">Foundation Concepts - model</a> - ] [ <a href="#doc.TaggingConcepts">Foundation Concepts - tags</a> - ] [ <a href="#doc.TagList">Nested Tag List</a> - ] [ <a href="#doc.PropertyProperty">The "property" Property</a> - ] [ <a href="#doc.ImplementationDetails">Implementation Details</a> - ] </div> + ] [ <a href="#doc.FoundationConcepts">Foundation Concepts - model</a> + ] [ <a href="#doc.TaggingConcepts">Foundation Concepts - tags</a> + ] [ <a href="#doc.TagList">Nested Tag List</a> + ] [ <a href="#doc.PropertyProperty">The "property" Property</a> + ] [ <a href="#doc.ImplementationDetails">Implementation Details</a> + ] </div> <hr><a name="doc.Intro"></a> <h3>Introduction</h3> <p>The nesting extension provides the ability to define a nested object model - and efficiently represent and manage that model through JSP's custom tags.</p> + and efficiently represent and manage that model through JSP's custom +tags.</p> <p>It's written in a layer that extends the current Struts tags, building - on their logic and functionality. The layer enables the tags to be aware - of the tags which surround them so they can correctly provide the nesting - property reference to the Struts system. Struts already supported properties - which use "dot notation" in accessing nested objects and properties.</p> + on their logic and functionality. The layer enables the tags to be aware + of the tags which surround them so they can correctly provide the nesting + property reference to the Struts system. Struts already supported properties + which use "dot notation" in accessing nested objects and properties.</p> <pre>e.g. myProperty.childProperty.finalProperty</pre> <p>Because of this the controller servlet excellently manages this nested - model. These tags are about bringing such ease of management to the JSP - view of the architecture.</p> + model. These tags are about bringing such ease of management to the JSP + view of the architecture.</p> <hr><a name="doc.FoundationConcepts"></a> <h3>Foundation Concepts - model.</h3> <p> A bean holds a reference to another bean internally, and all access - to that bean is handled through the current bean. This act of having + to that bean is handled through the current bean. This act of having one bean's access go through another bean is known as "nesting beans". The first bean is known as the parent bean. The bean which it references, -is known as a child bean. The terms "parent" and "child" are commonly + is known as a child bean. The terms "parent" and "child" are commonly used to describe the model's hierarchy. </p> <p><b>A simple example...</b><br /=""> - Take an object which represents a monkey. The monkey's job is to pick - bunches of bananas. On each bunch picked hangs many bananas. If this + Take an object which represents a monkey. The monkey's job is to pick + bunches of bananas. On each bunch picked hangs many bananas. If this case was translated to bean objects, the monkey object would have a reference - to the bunch objects he picked, and each bunch object would hold a reference - to the bananas hanging in the bunch. </p> + to the bunch objects he picked, and each bunch object would hold a reference + to the bananas hanging in the bunch. </p> <p><b>To describe this...</b><br /=""> - The monkey object is the parent to the bunch object, and the bunch object - is a child of the monkey object. The bunch object is parent to its child - banana objects, and the child banana objects children of the bunch object. - The monkey is higher in the hierarchy than the bananas, and the bananas - lower in the hierarchy to the bunches. </p> + The monkey object is the parent to the bunch object, and the bunch +object is a child of the monkey object. The bunch object is parent to +its child banana objects, and the child banana objects children of the +bunch object. The monkey is higher in the hierarchy than the bananas, +and the bananas lower in the hierarchy to the bunches. </p> <p> One special term to remember is for the most parent class, which is - known as the "root" object which starts the hierarchy. </p> + known as the "root" object which starts the hierarchy. </p> <hr><a name="doc.TaggingConcepts"></a> <h3>Foundation Concepts - tags.</h3> <p> What the tags provide is an efficient way or representing the above - models within JSP tag markup. As a result the tags take on similar relationships - to each other. A tag can be the parent of another, and similarly be a + models within JSP tag markup. As a result the tags take on similar relationships + to each other. A tag can be the parent of another, and similarly be a child of a parent tag. However the most important part to remember, is that the properties of parent tags define the nested property for the child tags' properties. </p> @@ -65,32 +66,32 @@ a tag is a parent tag in a markup sense (the opening tag and closing tag are either side of another tag) does not immediately mean that the child tag will be relative to that tag. Why? Some tags make bad parents. In other - words, they're not logical steps in defining a hierarchy. </p> + words, they're not logical steps in defining a hierarchy. </p> <p> For example the relationship between the select tag and the options - tag. The html:options tag "must" be surrounded by a parent html:select -tag. </p> + tag. The html:options tag "must" be surrounded by a parent html:select + tag. </p> <pre>eg:<br> <html:select name="myBean" property="mySelectProperty" ><br> <html:options name="myBean" property="myOptionsProperty" ><br> </html:select></pre> <p> In the nested context, this would cause undesired results if the select - tag was a parent. The bean reference would become... </p> + tag was a parent. The bean reference would become... </p> <pre> mySelectProperty.myOptionsProperty</pre> - ...which when translated, Struts would go to the value of the select -property and then try to get your options list from that returned value. -The extended logic tags are the same. You don't want to extend your properties -within the objects the logic tags are evaluating. + ...which when translated, Struts would go to the value of the select + property and then try to get your options list from that returned value. + The extended logic tags are the same. You don't want to extend your properties + within the objects the logic tags are evaluating. <p> To get manage this, the tags in the nested extension are categorised - into parent tags and non-parent tags. Those which implement <code>org.apache.struts.taglib.nested.NestedParentSupport</code> - are classed as parents, and the nested system knows they define levels - in the nested hierarchy. Every other tag, does not, and will be skipped - if found to be a "markup parent" (like our select tag) and not a "nested - parent". </p> + into parent tags and non-parent tags. Those which implement <code>org.apache.struts.taglib.nested.NestedParentSupport</code> + are classed as parents, and the nested system knows they define levels + in the nested hierarchy. Every other tag, does not, and will be skipped + if found to be a "markup parent" (like our select tag) and not a "nested + parent". </p> <p> There are also the special case of starting off the hierarchy with a "root" tag. These tags are what the extension requires to provide them with the bean by which the structure will be based on. </p> <hr><a name="doc.TagList"></a> <h3>Nested Tag List.</h3> <p> Here's a list of tags in the nested extension, grouped by parent/context - functionality. "root", "nested parent", "markup parent" & "basic". - </p> + functionality. "root", "nested parent", "markup parent" & "basic". + </p> <p><b>Root Tags</b> <table border="1"> <tbody> @@ -100,24 +101,24 @@ </tr> <tr> <td>html:form</td> - <td>For backwards compatibility, you can use the typical form tag to - implement your nested hierarchy.</td> + <td>For backwards compatibility, you can use the typical form tag +to implement your nested hierarchy.</td> </tr> <tr> <td>nested:form</td> <td>An extension of the above <code>html:form</code>, this is just - to provide definition in the nested tag library.</td> + to provide definition in the nested tag library.</td> </tr> <tr> <td>nested:root</td> - <td>When you don't want to configure a form, you can use any bean which - is in "scope" by specifying its name within this tag.</td> + <td>When you don't want to configure a form, you can use any bean +which is in "scope" by specifying its name within this tag.</td> </tr> </tbody> </table> </p> <br /=""> -<p><b>Nested Parent Tags</b> (Affect the hierarchy) +<p><b>Nested Parent Tags</b> (Affect the hierarchy) <table border="1"> <tbody> <tr> @@ -127,20 +128,20 @@ <tr> <td>nested:nest</td> <td>This tag executes no logic, simply representing a nesting level - for the rest of the markup to relate to.</td> + for the rest of the markup to relate to.</td> </tr> <tr> <td>nested:iterate</td> <td>Extension of <code>logic:iterate</code> you can use it to iterate - through a list, and have all child references nest within the - beans returned from this iterated collection.</td> + through a list, and have all child references nest within the + beans returned from this iterated collection.</td> </tr> </tbody> </table> </p> <br /=""> <p><b>Markup Parent Tags</b> (marked-up like parent tags, but don't affect - the hierarchy) + the hierarchy) <table border="1"> <tbody> <tr> @@ -150,7 +151,7 @@ <tr> <td>nested:select</td> <td><code>html:select</code> extension. Provides the logic to render - a select box in Html.</td> + a select box in Html.</td> </tr> <tr> <td>nested:empty</td> @@ -204,7 +205,7 @@ </table> </p> <br /=""> -<p><b>Base tags</b> (usually a tag which has no body content) +<p><b>Base tags</b> (usually a tag which has no body content) <table border="1"> <tbody> <tr> @@ -269,37 +270,37 @@ <hr><a name="doc.PropertyProperty"></a> <h3>The relative references and the "property" property.</h3> <p>Use of the "property" property is exactly the same as the original Struts - tag with minor addition. Appends the provided property to the nested + tag with minor addition. Appends the provided property to the nested property of the tags that surround it. You can use additional nesting (use "dot notation") within the provided property as the current struts system allows but there is now a tag which can provide this in a "cleaner" fashion. :)</p> <p>The one other addition to the "property" property, is the ability to step - backwards in the heirarchy in the familiar directory fashion; e.g. "../../myPropertyName"</p> + backwards in the heirarchy in the familiar directory fashion; e.g. "../../myPropertyName"</p> <p>As expected this allows you to step backwards in the nested model to access - a higher level in the object tree. The implementation uses the StringTokenizer - working off the "/" delimiter and counts the tokens. This was going to - be denied, enforcing the ".." fashion, but on consideration, allowed for - some easier-to-read naming possibilities.</p> + a higher level in the object tree. The implementation uses the StringTokenizer + working off the "/" delimiter and counts the tokens. This was going to + be denied, enforcing the ".." fashion, but on consideration, allowed +for some easier-to-read naming possibilities.</p> <p>Consider "propertyOne.propertyTwo.propertyThree.propertyFour". With the - current nesting level beneath "propertyFour" you can instead use "two/three/four/anotherProperty" - which is easier to understand than "../../../anotherProperty". Doesn't -sound like much, but makes life easier when traversing large jsp pages + current nesting level beneath "propertyFour" you can instead use "two/three/four/anotherProperty" + which is easier to understand than "../../../anotherProperty". Doesn't + sound like much, but makes life easier when traversing large jsp pages for tags defining your object model.</p> <p>Also implemented is the also familiar directory fashion of a leading "/" - to reference from the root of the model and start over. e.g. "/propertyOne". - This allow a convenient way to move around a few levels as well as "forking" - in the object structure among other felixble approaches to structure.</p> + to reference from the root of the model and start over. e.g. "/propertyOne". + This allow a convenient way to move around a few levels as well as "forking" + in the object structure among other felixble approaches to structure.</p> <p><b>Parent References...</b><br /=""> - "property" properties, including the relative properties described above, - all end up referencing a property of a child bean. For example "/myProperty" - will return an object from the "myProperty" of the root bean. The fact -that a property is specified means that you are accessing the result of -that property. This results in never being able to properly access a parent -object itself within its current related context. </p> + "property" properties, including the relative properties described +above, all end up referencing a property of a child bean. For example +"/myProperty" will return an object from the "myProperty" of the root bean. +The fact that a property is specified means that you are accessing the +result of that property. This results in never being able to properly access +a parent object itself within its current related context. </p> <p> Take for example you simply want to print out a list of String objects. - In a bean you create a list of them, offer them out to the system via -a getter, and you markup using the nested:iterate or logic:iterate tag + In a bean you create a list of them, offer them out to the system via + a getter, and you markup using the nested:iterate or logic:iterate tag (both contain the same issues). The only way to get at the object itself is get the iterate tag to declare a scripting variable. With the nested tags you can now simply reference the object using a parent reference of @@ -309,33 +310,33 @@ of the current nested block are "./" or "this/". Not just the iterate tag, this will return the object represented by any nested parent tag. </p> <p> This allows you to be in a nested tag block and use the custom tags - work directly against the parent defined object, indexed or otherwise. - So to be in an iterate block, and to print out the String representation - of the current iterated object, you can now use... </p> + work directly against the parent defined object, indexed or otherwise. + So to be in an iterate block, and to print out the String representation + of the current iterated object, you can now use... </p> <pre>eg:<br> <nested:iterate property="myItemList" ><br> <html:write property="this/" ><br><br> </html:iterate></pre> <p> or if you want to print the string value of a parent the other side - of the object... </p> + of the object... </p> <pre>eg:<br> <nested:iterate property="myBeanList" ><br> <nested:iterate property="myItemList" ><br> <html:write property="beanListObject/" ><br><br> </html:iterate><br> </html:iterate></pre> <p> The fact that it didn't use the special cases of "./" or "this/" means - that it steps back in the hierarchy as a typical relative reference. This - is unlimited the amount of steps you can take back in the hierarchy. For - example, to go back three parents your property would be "one/two/three/". - </p> + that it steps back in the hierarchy as a typical relative reference. +This is unlimited the amount of steps you can take back in the hierarchy. +For example, to go back three parents your property would be "one/two/three/". + </p> <p><b>Note:</b> The logic identifies the leading "/" and then reads the property - from the last index of "/". Resulting in "/three/four/anotherProperty" - working the same as "/anotherProperty".</p> + from the last index of "/". Resulting in "/three/four/anotherProperty" + working the same as "/anotherProperty".</p> <p><b>Note:</b> If you're busily nesting away, and a parent tag has a leading - "/" property, the contained tags will append to this new structure. Handy, - but you have to keep it in mind.</p> + "/" property, the contained tags will append to this new structure. +Handy, but you have to keep it in mind.</p> <p><b>Note:</b> If you try to reference beneath the level of the nesting, - it will simply act like as if a leading "/" property was defined.</p> + it will simply act like as if a leading "/" property was defined.</p> <p><b>Parent Reference Note:</b> The only thing to keep in mind with parent - references is that you cannot parent reference the root bean. This is + references is that you cannot parent reference the root bean. This is because the resulting property would be an empty string. Something that the BeanUtils/PropertyUtils cannot handle (if this is a requirement, you could use a "fake nested property". A getter which simply returns the same bean instance ("this") and simply add an extra <code>nested:nest</code> - level at the start of your hierarchy. Works just fine). </p> + level at the start of your hierarchy. Works just fine). </p> <hr><br> <img src="doc-files/nestedUML.jpg" alt="nested UML"> <a name="doc.ImplementationDetails"></a> @@ -343,56 +344,57 @@ <b>NestedPropertyHelper</b> <dir> <p>This class embodies all of the logic that runs the nested tagging system. - It defines a static method, "setNestedProperties", which the nested tags - pass themselves into to have their appropriate properties set.</p> + It defines a static method, "setNestedProperties", which the nested tags + pass themselves into to have their appropriate properties set.</p> <p>The tag extensions themselves implement options of three interfaces which - define functionality for the various types of nested usage. When traversing - the tag hierarchy back up to the root of the structure, these tags define - the result of the current tag.</p> + define functionality for the various types of nested usage. When traversing + the tag hierarchy back up to the root of the structure, these tags define + the result of the current tag.</p> </dir> <b>NestedTagSupport Interface...</b> <dir> <p>This is the base of the interfaces. Simply put, any tag that we need to - single out of the standard struts tags for use by the nesting system can - implement this or its children.</p> + single out of the standard struts tags for use by the nesting system +can implement this or its children.</p> </dir> <b>NestedPropertySupport Interface...</b> <dir> <p>Tags that implement this interface will have the provided property attribute - appended to the parenting nested attribute. This is the heart of the matter. - </p> + appended to the parenting nested attribute. This is the heart of the matter. + </p> <p>This is the basic property, and so far all the nested tags support this - to have their nested properties written correctly.</p> + to have their nested properties written correctly.</p> </dir> <b>NestedNameSupport Interface...</b> <dir> <p>This interface means that the implementing tag wants to have it's name - tag looked after by the nesting system. This is automatic, and the name - is written for the tag from the root tag. If the JSP is a form, then it - will look to the form tag and get a hold of the bean name that is defined - in the struts-config.xml file for the action, otherwise, a nested:root -tag must be provided for this means.</p> + tag looked after by the nesting system. This is automatic, and the name + is written for the tag from the root tag. If the JSP is a form, then +it will look to the form tag and get a hold of the bean name that is +defined in the struts-config.xml file for the action, otherwise, a nested:root + tag must be provided for this means.</p> <p>This extends the NestedPropertySupport interface as, at time of writing, - all tags which used a "name" attribute, required a property attribute in -some way to make it useful. This could change, and it's only a small refactoring -to make it work for the instance if it's relevant for nesting.</p> + all tags which used a "name" attribute, required a property attribute +in some way to make it useful. This could change, and it's only a small +refactoring to make it work for the instance if it's relevant for nesting.</p> <p><b>Note:</b> At the moment, if the tag implements this interface, the name attribute will be rewritten by the system on all counts. I find it hard to picture a valid requirement for inter-mixing multiple object structures - (which distinguishable names would allow) in the one JSP page which couldn't - be more efficiently provided by the current nesting model working over -the one model. Time may prove this idea wrong.</p> + (which distinguishable names would allow) in the one JSP page which couldn't + be more efficiently provided by the current nesting model working over + the one model. Time may prove this idea wrong.</p> </dir> <b>ParentTagSupport</b> <dir> <p>This tag identifies for the system those tags which define levels in the - nested heirarchy. Namely the "getNestedProperty()" method that yields - to calling tags the fully qualified nested property of the parent tag. -In the case of a NestedIterator being the parent tag, it will also append -the current index reference. e.g. propertyOne.propertyTwo[5]</p> + nested heirarchy. Namely the "getNestedProperty()" method that yields + to calling tags the fully qualified nested property of the parent tag. + In the case of a NestedIterator being the parent tag, it will also append + the current index reference. e.g. propertyOne.propertyTwo[5]</p> </dir> <br /=""> <br /=""> +<br> <br> </body> </html> 1.1 jakarta-struts/src/share/org/apache/struts/taglib/nested/html/doc-files/nested-html.jpg <<Binary file>> 1.2 +131 -106 jakarta-struts/src/share/org/apache/struts/taglib/template/package.html Index: package.html =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/template/package.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- package.html 12 Jan 2001 01:47:53 -0000 1.1 +++ package.html 29 Mar 2002 23:30:49 -0000 1.2 @@ -1,117 +1,142 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<title>Package Documentation for org.apache.struts.taglib.template Package</title> + <title>Package Documentation for org.apache.struts.taglib.template Package</title> </head> -<body bgcolor="white"> - <p> - The "struts-template" tag library contains tags that are useful in creating dynamic - JSP templates for pages which share a common format. These templates are best used - when it is likely that a layout shared by several pages in your application will - change. The functionality provided by these tags is similar to what can be - achieved using standard JSP include directive, but are dynamic rather than static. - </p> - <a name="doc.Description"></a> - - <p> - -<div align="center"> <a href="#doc.Introduction">[Introduction]</a> <a href="#doc.Functionality">[Template - Functionality]</a> <a href="#doc.Properties">[Template Properties]</a> <a href="#doc.Examples">[Template - Examples]</a> </div> - <p></p> - - <hr /> -<a name="doc.Intro"></a> -<h3>Introduction<a name="doc.Introduction"></a></h3> - - <p> - The Template library supplies tags that are useful for creating dynamic JSP templates - for pages which share a common format. - </p> - - -<a name="doc.Functionality"></a> -<h3>Template Tag Functionality<a name="doc.Functionality"></a></h3> + <body bgcolor="white"> + +<p> The "struts-template" tag library contains tags that are useful in +creating dynamic JSP templates for pages which share a common format. +These templates are best used when it is likely that a layout shared +by several pages in your application will change. The functionality provided +by these tags is similar to what can be achieved using standard JSP include +directive, but are dynamic rather than static. </p> + <a name="doc.Description"></a> + +<p> </p> +<div align="Center"> <a href="#doc.Introduction">[Introduction]</a> + <a href="#doc.Functionality">[Template Functionality]</a> + <a href="#TagLib_Template_UML_">[Template UML]</a> +<a href="#doc.Properties">[Template Properties]</a> + <a href="#doc.Examples">[Template Examples]</a> + </div> + +<p></p> + +<hr /=""> <a name="doc.Intro"></a> + +<h3>Introduction<a name="doc.Introduction"></a> +</h3> + +<p> The Template library supplies tags that are useful for creating dynamic +JSP templates for pages which share a common format. </p> + <a name="doc.Functionality"></a> + +<h3>Template Tag Functionality<a name="doc.Functionality"></a> +</h3> + <p>Each of the three template tags has a specific, interelated function:</p> -<p> + +<p> </p> <ul> - <li><b><a href="/struts-template.html#get">get</a></b> - Retrieves content from a request scope bean, for use in the template layout.</li> - <li><b><a href="/struts-template.html#insert">insert</a></b> - Retrieves (or includes) the specified template file, and then inserts the specified content into the template's layout. By changing the layout defined in the template file, any other file that inserts the template will automatically use the new layout.</li> - <li><b><a href="/struts-template.html#put">put</a></b> - Creates a request scope bean that specifies the content to be used by the get tag. Content can be printed directly or included from a JSP or HTML file.</li> + <li><b><a href="/struts-template.html#get">get</a> + </b> - Retrieves content from a request scope bean, for use in the template +layout.</li> + <li><b><a href="/struts-template.html#insert">insert</a> + </b> - Retrieves (or includes) the specified template file, and then +inserts the specified content into the template's layout. By changing the +layout defined in the template file, any other file that inserts the template +will automatically use the new layout.</li> + <li><b><a href="/struts-template.html#put">put</a> + </b> - Creates a request scope bean that specifies the content to be +used by the get tag. Content can be printed directly or included from a JSP +or HTML fil</li> + <li><br> + <br> + <br> + </li> + <li><a name="TagLib_Template_UML_"></a> + <img src="doc-files/templateUML.jpg" alt="TagLib Template UML" width="1100" height="323"> + </li> + </ul> -</p> - -<h3>Template Tag Properties<a name="doc.Properties"></a></h3> - + +<p></p> + +<h3>Template Tag Properties<a name="doc.Properties"></a> +</h3> + <p>The three template tags use very simple attributes :</p> -<blockquote> - <p><b>get</b> - Requires a single property, the name of the content to be inserted. This tag is used in the template file to indicate where in the layout to insert the content. This name matches the name property used by a put tag.</p> - <p><b>insert</b> - Requires a single property, the name of the template. This tag is the parent to one or more put tags. The put tags indicate the content to be inserted into the template. The layout of the content is determined by get tags placed in the template.</p> - <p><b>put</b> - Requires a name property, which should match a name used in the template file. The content property indicates the source of the content. The optional direct attribute indicates whether the content should be included or printed directly (as a literal string). The default is false, meaning content is included.</p> - - -<a name="doc.Examples"></a> -<h3>Template Tag Examples</h3> - -<p align="center"><b>A sample template file</b></p> -<blockquote> -<hr> -<pre> -<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> -<html><head><title><template:get name='title'/></title></head><br><body background='graphics/blueAndWhiteBackground.gif'> -<table><br> <tr valign='top'><td><template:get name='sidebar'/></td><br> <td><table><br> <tr><td><template:get name='header'/></td></tr><br> <tr><td><template:get name='content'/></td></tr><br> <tr><td><template:get name='footer'/></td></tr><br> </table><br> </td><br> </tr> -</table><br></body></html> -<%<br>/*<br>"chapterTemplate.jsp" -Display a "sidebar" in a column along the left side of the page.<br>Display a "header" over the right column.<br>Display the page "content" below the header.<br>Display a "footer" at below the content.<br>If we change the layout of the elements on this page, all pages<br>inserting this page will also change to use the new layout.<br>*/<br>%> + +<blockquote> + <p><b>get</b> - Requires a single property, the name of the content to +be inserted. This tag is used in the template file to indicate where in the +layout to insert the content. This name matches the name property used by +a put tag.</p> + + <p><b>insert</b> - Requires a single property, the name of the template. +This tag is the parent to one or more put tags. The put tags indicate the +content to be inserted into the template. The layout of the content is determined +by get tags placed in the template.</p> + + <p><b>put</b> - Requires a name property, which should match a name used +in the template file. The content property indicates the source of the content. +The optional direct attribute indicates whether the content should be included +or printed directly (as a literal string). The default is false, meaning +content is included.</p> + <a name="doc.Examples"></a> + + <h3>Template Tag Examples</h3> + + <p align="Center"><b>A sample template file</b></p> + + <blockquote> + <hr> + <pre><%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %><br><html><head><title><template:get name='title'/></title></head><br><body background='graphics/blueAndWhiteBackground.gif'><br><table><br> <tr valign='top'><td><template:get name='sidebar'/></td><br> <td><table><br> <tr><td><template:get name='header'/></td></tr><br> <tr><td><template:get name='content'/></td></tr><br> <tr><td><template:get name='footer'/></td></tr><br> </table><br> </td><br> </tr><br></table><br></body></html><br><%<br>/*<br>"chapterTemplate.jsp"<br>Display a "sidebar" in a column along the left side of the page.<br>Display a "header" over the right column.<br>Display the page "content" below the header.<br>Display a "footer" at below the content.<br>If we change the layout of the elements on this page, all pages<br>inserting this page will also change to use the new layout.<br>*/<br>%><br></pre> + + <hr> </blockquote> + + <p align="Center"><b>A sample JSP using the template</b></p> + + <blockquote> + <hr> + <pre><%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %><br><template:insert template='/chapterTemplate.jsp'><br> <template:put name='title' content='Templates' direct='true'/><br> <template:put name='header' content='/header.html' /><br> <template:put name='sidebar' content='/sidebar.jsp' /><br> <template:put name='content' content='/introduction.html'/><br> <template:put name='footer' content='/footer.html' /><br></template:insert><br><%<br>/*<br>"introduction.jsp"<br>Specify template for this page (chapterTemplate.jsp).<br>The chapterTemplate.jsp defines the layout positions for five<br>elements: title, header, sidebar, content, and footer.<br>Specify the source file (html or jsp) for each element.<br>*/<br>%><br></pre> + + <hr> </blockquote> + + <p align="Center"><b>A sample HTML content file ("header.html") used +by "introduction.jsp", and others.</b></p> + + <blockquote> + <hr> + <pre><table><br><tr><br><td><img src='graphics/java.gif'/></td><br><td><img src='graphics/templates.gif'/></td><br></tr><br></table><br></pre> + + <hr> </blockquote> + + <p align="Center"><b>A sample JSP content file ("sidebar.jsp") used +by "introduction.jsp", and others.</b></p> + + <blockquote> + <hr> + <pre><font size='5'><a name="top">Topics</a></font><p><br><table width='145'><br> <tr><td><a href='introduction.jsp'><br> Introduction </a></td></tr><br> + <tr><td><a href='using.jsp'><br> Using Templates </a></td></tr><br> + <tr><td><a href='optional.jsp'><br> Optional Content </a></td></tr><br> <tr><td><a href='more.jsp'><br> ... and more ...</a></td></tr><br> </table></p><br> +<%<br>/*<br>Specify navigational links for this application.<br>*/<br>%><br></pre> + + <hr> </blockquote> + + <p align="Center"><b>A sample HTML content file used by "introduction.jsp" +only.</b></p> + + <blockquote> + <hr> + <pre><html><br><head><br><link rel="stylesheet" href="css/templates.css" <br>charset="ISO-8859-1" type="text/css"><br></head><br><body><br><h3 class="ChapTitle">Introduction</h3><br><p class="Paragraph">Window toolkits typically provide a layout mechanism<br>< ... /><br><hr> </pre> -<hr> -</blockquote> -<p align="center"><b>A sample JSP using the template</b></p> -<blockquote> -<hr> -<pre> -<%@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' %> -<template:insert template='/chapterTemplate.jsp'><br> <template:put name='title' content='Templates' direct='true'/><br> <template:put name='header' content='/header.html' /><br> <template:put name='sidebar' content='/sidebar.jsp' /><br> <template:put name='content' content='/introduction.html'/><br> <template:put name='footer' content='/footer.html' /> -</template:insert> -<%<br>/*<br>"introduction.jsp" -Specify template for this page (chapterTemplate.jsp).<br>The chapterTemplate.jsp defines the layout positions for five<br>elements: title, header, sidebar, content, and footer.<br>Specify the source file (html or jsp) for each element.<br>*/<br>%> -</pre> -<hr> -</blockquote> -<p align="center"><b>A sample HTML content file ("header.html") used by "introduction.jsp", and others.</b></p> -<blockquote> -<hr> -<pre> -<table><br><tr><br><td><img src='graphics/java.gif'/></td><br><td><img src='graphics/templates.gif'/></td><br></tr><br></table> -</pre> -<hr> -</blockquote> -<p align="center"><b>A sample JSP content file ("sidebar.jsp") used by "introduction.jsp", and others.</b></p> -<blockquote> -<hr> -<pre> -<font size='5'><a name="top">Topics</a></font><p><br><table width='145'><br> <tr><td><a href='introduction.jsp'><br> Introduction </a></td></tr><br> - <tr><td><a href='using.jsp'><br> Using Templates </a></td></tr><br> - <tr><td><a href='optional.jsp'><br> Optional Content </a></td></tr><br> <tr><td><a href='more.jsp'><br> ... and more ...</a></td></tr><br> </table></p><br> -<%<br>/*<br>Specify navigational links for this application.<br>*/<br>%> -</pre> -<hr> -</blockquote> -<p align="center"><b>A sample HTML content file used by "introduction.jsp" only.</b></p> -<blockquote> -<hr> -<pre> -<html><br><head><br><link rel="stylesheet" href="css/templates.css" <br>charset="ISO-8859-1" type="text/css"><br></head><br><body> -<h3 class="ChapTitle">Introduction</h3><br><p class="Paragraph">Window toolkits typically provide a layout mechanism -< ... /> -<hr> -</pre> -</blockquote> -<!-- + </blockquote> + <!-- <h3>Optional Content</h3> <p>All content is optional. If a source page does not specify the content for an element in the template, that element is simply ignored. This can make using templates more flexible, since you can use the same template for more than one page, simply by ommitting or specifying a content element. However, this feature also means that a misspelled name could lead the template to quietly ignore content you meant to include.</p> --> -</body> -</html> - - - + </blockquote> + </body> + </html> 1.1 jakarta-struts/src/share/org/apache/struts/taglib/template/doc-files/templateUML.jpg <<Binary file>>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>