husted      2002/10/25 05:37:53

  Modified:    doc/userGuide dev_validator.xml dev_tiles.xml
  Log:
  + Add  book excerpts to Resource sections.
  
  Revision  Changes    Path
  1.9       +57 -28    jakarta-struts/doc/userGuide/dev_validator.xml
  
  Index: dev_validator.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/dev_validator.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- dev_validator.xml 24 Oct 2002 18:42:20 -0000      1.8
  +++ dev_validator.xml 25 Oct 2002 12:37:53 -0000      1.9
  @@ -11,39 +11,66 @@
   
   <section href="validator" name="Struts Validator">
   
  +<p>
   [:TODO:]
  -<p>Cover basic functionality as documented on David's web site.
  +</p>
  +
  +<p>
  +Cover basic functionality as documented on David's web site.
   <a href="http://home.earthlink.net/~dwinterfeldt/";>Validation Framework for Struts 
</a> 
   </p>
   
  -<p> Struts 1.1 has added additional functionality over the original validator
  -contributed by David Winterfeldt</p>
  +<p>
  +Struts 1.1 has added additional functionality over the original validator
  +contributed by David Winterfeldt.
  +</p>
  +
   <ul>
  -<li> Conditionally required fields</li>
  -<li> intRange() &amp; floatRange() methods in both JavaScript and Java</li>
  +<li>
  +  Conditionally required fields
  +</li>
  +<li>
  +  intRange() &amp; floatRange() methods in both JavaScript and Java
  +</li>
   </ul>
  -<p> There have also been changes in the validator behavior and deprecation of 
functionality
  +<p>
  +There have also been changes in the validator behavior and deprecation of 
functionality
   </p>
   <ul>
  -<li> The validator xml files now validate against the DTD stored in the 
commons-validator.jar. </li>
  -<li> The default valiator-rules.xml now ignores blank fields for all the basic 
validation types.
  -If you require a field to be present then to your applications validator.xml 
  -field definition add "required" to the depends attribute.</li>
  -<li> The Javascript Tag has new attributes defined. </li>
  -<li> Deprecation of range() methods in both JavaScript and Java</li>
  -<li> Deprecation of StrutsVlaidator &amp; StrutsValidatorUtil</li>
  +<li>
  +  The validator xml files now validate against the DTD stored in the 
commons-validator.jar. 
  +</li>
  +<li>
  +  The default valiator-rules.xml now ignores blank fields for all the basic 
validation types.
  +  If you require a field to be present then to your applications validator.xml 
  +  field definition add "required" to the depends attribute.
  +</li>
  +<li>
  +  The Javascript Tag has new attributes defined.
  +</li>
  +<li>
  +  Deprecation of range() methods in both JavaScript and Java
  +</li>
  +<li>
  +  Deprecation of StrutsVlaidator &amp; StrutsValidatorUtil
  +</li>
   </ul>
   
   <p>
   The most fundamental change is the ability to conditionally
   require validator fields based on the value of other fields.
   It allows you to define logic like "only validate this field if field X is non-
  -null and field Y equals "male".</p>
  +null and field Y equals "male".
  +</p>
  +
   <p>
   The syntax looks like this:
   </p>
  +
   <p>
  -If you have this in your struts-config.xml </p>
  +If you have this in your struts-config.xml
  +</p>
  +
   <ol>
   <pre><![CDATA[
   <form-bean name="dependentlistForm"
  @@ -57,11 +84,15 @@
   </form-bean>
   ]]></pre>
   </ol>
  +
   <p>
   Where dependent is a bean that has properties lastName, firstName, dob, 
  -coverageType </p>
  +coverageType
  +</p>
  +
   <p>
  -You can define a validation:</p>
  +You can define a validation:
  +</p>
   
   <pre><![CDATA[
     <form name="dependentlistForm">
  @@ -140,18 +171,16 @@
   indexed field as firstName.  Same thing for dob, except that we validate for 
   date if not blank.
   </p>
  +
   <p>
   The coverageType is only required if the lastName for the same indexed bean is 
   not null, and also if the non-indexed field insureDependents is true.
   </p>
  +
   <p>
   You can have an arbitrary number of fields by using the [n] syntax, the only 
   restriction is that they must all be AND or OR, you can't mix.
   </p>
  -
  -
  -
  -
   </section>
   
   <section href="tiles" name="Validator API Guide">
  @@ -163,14 +192,14 @@
   
   </section>
   
  -<!-- 
  -  <author>Ted Husted</author> 
   <section href="resources" name="Validator Resources">
  -<p><b><u>Validating Input</u></b> by David Winterfeldt and Ted Husted. 
  -Sample chapter from <u>Java Web Development with Struts</u>; available as a 
  -<u>free download</u> (PDF).
  +<p>
  +<a 
href="http://www.manning.com/getpage.html?project=husted&amp;filename=chapters.html";>
  +<b>Validating user input</b></a> by Daid Winterfeldt and Ted Husted.
  +Sample chapter from 
  +<a 
href="http://www.amazon.com/exec/obidos/ISBN=1930110502/hitchhikeguidetoA/";>Struts in 
Action</a>; 
  +available as a free download (PDF).
   </p>
  -</section>
  --->
   
  +</section>
   </chapter></body></document>
  
  
  
  1.10      +256 -256  jakarta-struts/doc/userGuide/dev_tiles.xml
  
  Index: dev_tiles.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/doc/userGuide/dev_tiles.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- dev_tiles.xml     10 Oct 2002 16:32:27 -0000      1.9
  +++ dev_tiles.xml     25 Oct 2002 12:37:53 -0000      1.10
  @@ -1,270 +1,270 @@
   <?xml version="1.0" encoding="ISO-8859-1"?>
   <document url="./resources.xml">
  -     <properties>
  -             <author>Cedric Dumoulin</author>
  -             <title>The Struts User's Guide - Tiles Guide</title>
  -     </properties>
  -     <body>
  -             <chapter name="Tiles Guide">
  -                     <section href="tiles" name="The Tiles Document Assembly 
Framework">
  -                             <p>Tiles builds on the "include" feature provided by 
the JavaServer Page
  +<properties>
  +<author>Cedric Dumoulin</author>
  +<title>
  +The Struts User's Guide - Tiles Guide
  +</title>
  +</properties>
  +<body>
  +<chapter name="Tiles Guide">
  +
  +<section href="tiles" name="The Tiles Document Assembly Framework">
  +
  +<p>Tiles builds on the "include" feature provided by the JavaServer Page
   specification to provided a full-featured, robust framework for assembling
   presentation pages from component parts. Each part, or tile, can be
   reused as often as needed throughout your application. This reduces the
   amount of markup that needs to be maintained and makes it easier to
  -change the look and feel of a website. </p>
  -                     </section>
  -                     <section href="features" name="Overview of Tiles Features">
  -                             <ul>
  -                                     <li>
  -                     Screen definitions
  -                     <ul>
  -                                                     <li>
  -                           Create a screen by assembling
  -                           <strong>
  -                                                                     <em>Tiles</em>
  -                                                             </strong> : header, 
footer,
  -                           menu, body
  -                        </li>
  -                                                     <li>
  -                           Definitions can take place :
  -                           <ul>
  -                                                                     <li>
  -                                 in a centralized xml
  -                                 file
  -                              </li>
  -                                                                     <li>
  -                                 directly in jsp page
  -                              </li>
  -                                                                     <li>
  -                                 in struts action
  -                              </li>
  -                                                             </ul>
  -                                                     </li>
  -                                                     <li>
  -                           Definitions provide an inheritance
  -                           mechanism : a definition can extends another one,
  -                           and override parameters.
  -                        </li>
  -                                             </ul>
  -                                     </li>
  -                                     <li>
  -                     Templating
  -                     <ul>
  -                                                     <li>
  -                                                             <strong>
  -                                                                     <em>Tiles</em>
  -                                                             </strong>
  -                           framework is entirely compatible with
  -                           <em>Templates</em> defined by David Geary and
  -                           implemented in Struts
  -                        </li>
  -                                                     <li>
  -                           You can replace <em>Templates</em>
  -                           library by <strong>
  -                                                                     <em>Tiles</em>
  -                                                             </strong>
  -                           one
  -                        </li>
  -                                             </ul>
  -                                     </li>
  -                                     <li>
  -                     Layouts
  -                     <ul>
  -                                                     <li>
  -                           Define common page layouts and reuse
  -                           them across your web site
  -                        </li>
  -                                                     <li>
  -                           Define menu layouts, and use them by
  -                           passing lists of items and links
  -                        </li>
  -                                                     <li>
  -                           Define portal layout, use it by
  -                           passing list of <strong>
  -                                                                     <em>Tiles</em>
  -                                                             </strong>
  -                           (pages) to show
  -                        </li>
  -                                                     <li>
  -                           Reuse existing layouts, or define
  -                           your owns
  -                        </li>
  -                                             </ul>
  -                                     </li>
  -                                     <li>
  -                     Dynamic page building
  -                     <ul>
  -                                                     <li>
  -                           Tiles are gather dynamically during
  -                           page reload. It is possible to change any attributes
  -                           : layout, list of Tiles in portal, list of menu
  -                           items, ...
  -                        </li>
  -                                             </ul>
  -                                     </li>
  -                                     <li>
  -                     Reuse of <strong>
  -                                                     <em>Tiles</em>
  -                                             </strong> /
  -                     Components
  -                     <ul>
  -                                                     <li>
  -                           If well defined, a
  -                           <strong>
  -                                                                     <em>Tile</em>
  -                                                             </strong> can be 
reused in
  -                           different location
  -                        </li>
  -                                                     <li>
  -                           Dynamic attributes are used to
  -                           parameterized <em>
  -                                                                     
<strong>Tiles</strong>
  -                                                             </em>
  -                                                     </li>
  -                                                     <li>
  -                           It is possible to define library of
  -                           reusable <em>
  -                                                                     
<strong>Tiles</strong>
  -                                                             </em>.
  -                        </li>
  -                                                     <li>
  -                           Build a page by assembling predefined
  -                           components, give them appropriate parameters
  -                        </li>
  -                                             </ul>
  -                                     </li>
  -                                     <li>
  -                     Internationalization (i18n)
  -                  </li>
  -                                     <ul>
  -                                             <li>
  -                     It is possible to load different tiles
  -                     according to Locale
  -                  </li>
  -                                             <li>
  -                     A mechanism similar to Java properties
  -                     files is used for definitions files : you can have one
  -                     definition file per Locale. The appropriate definition is
  -                     loaded according to current Locale
  -                  </li>
  -                                     </ul>
  -                                     <li>
  -                     Multi-channels
  -                  </li>
  -                                     <ul>
  -                                             <li>
  -                     It is possible to load different Tiles
  -                     according to a key stored in jsp session, or
  -                     anywhere.
  -                  </li>
  -                                             <li>
  -                     For example, key could be user provilege,
  -                     browser type, ...
  -                  </li>
  -                                             <li>
  -                     A mechanism similar to Java properties
  -                     files is used for definitions files : you can have one
  -                     definition file per key. The appropriate definition is
  -                     loaded according to the key.
  -                  </li>
  -                                     </ul>
  -                             </ul>
  -                     </section>
  -                     <section href="setup" name="Enabling your application for 
Tiles">
  -                             <p>The Tiles framework is bundled with Struts. It is 
not enabled by default.
  -To enable Tiles you need to:
  +change the look and feel of a website.
  +</p>
  +
  +</section>
  +
  +<section href="features" name="Overview of Tiles Features">
  +
  +<ul>
  +
  +<li>
  +  Screen definitions
  +
  +<ul>
  +<li>
  +  Create a screen by assembling <strong><em>Tiles</em></strong>: header, footer, 
menu, body
  +</li>
  +<li>
  +  Definitions can take place :
  +
  +<ul>
  +<li>
  +  in a centralized xml file
  +</li>
  +
  +<li>
  +  directly in jsp page
  +</li>
  +
  +<li>
  +  in struts action
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +  Definitions provide an inheritance
  +  mechanism : a definition can extends another one,
  +  and override parameters.
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +Templating
  +<ul>
  +
  +<li>
  +  <strong><em>Tiles</em></strong> framework is entirely compatible with 
<em>Templates</em> defined by David Geary and implemented in Struts
  +</li>
  +
  +<li>
  +  You can replace <em>Templates</em> library by <strong><em>Tiles</em></strong>one
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +Layouts
  +
  +<ul>
  +<li>
  +  Define common page layouts and reuse them across your web site
  +</li>
  +
  +<li>
  +  Define menu layouts, and use them by passing lists of items and links
  +</li>
  +
  +<li>
  +  Define portal layout, use it by passing list of <strong><em>Tiles</em></strong> 
(pages) to show
  +</li>
  +
  +<li>
  +  Reuse existing layouts, or define your own
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +  Dynamic page building
  +<ul>
  +<li>
  +  Tiles are gather dynamically during page reload. It is possible to change any 
attributes: layout, list of Tiles in portal, list of menu items, ...
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +  Reuse of <strong><em>Tiles</em></strong> /Components
  +<ul>
  +
  +<li>
  +  If well defined, a<strong><em>Tile</em></strong> can be reused in different 
location
  +</li>
  +
  +<li>
  +  Dynamic attributes are used to parameterized <em><strong>Tiles</strong>
  +</em>
  +</li>
  +
  +<li>
  +  It is possible to define library ofreusable <em><strong>Tiles</strong>
  +</em>.
  +</li>
  +
  +<li>
  +  Build a page by assembling predefined components, give them appropriate parameters
  +</li>
  +</ul>
  +</li>
  +
  +<li>
  +  Internationalization (i18n)
  +</li>
  +
  +<ul>
  +<li>
  +  It is possible to load different tiles according to Locale
  +</li>
  +
  +<li>
  +A mechanism similar to Java properties files is used for definitions files : you 
can have one definition file per Locale. The appropriate definition is loaded 
according to current Locale
  +</li>
  +</ul>
  +
  +<li>
  +  Multi-channels
  +</li>
  +
  +<ul>
  +<li>
  +  It is possible to load different Tiles according to a key stored in jsp session, 
or anywhere.
  +</li>
  +
  +<li>
  +  For example, key could be user provilege, browser type, ...
  +</li>
  +
  +<li>
  +  A mechanism similar to Java properties files is used for definitions files : you 
can have one definition file per key. The appropriate definition is loaded according 
to the key.
  +</li>
  +</ul>
  +</ul>
  +
  +</section>
  +
  +<section href="setup" name="Enabling your application for Tiles">
  +
  +<p>
  +The Tiles framework is bundled with Struts. It is not enabled by default. To enable 
Tiles you need to:
   </p>
  -                             <ul>
  -                                     <li>Setup the struts-tiles taglib in your 
<code>WEB-INF/web.xml</code>
  -      file to include the following tag library declarations:</li>
  -                             </ul>
  -                             <pre>&lt;taglib&gt;
  -  &lt;taglib-uri&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-uri&gt;
  -  &lt;taglib-location&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-location&gt;
  -&lt;/taglib&gt;
  -</pre>
  -                             <ul>
  -                                     <li>At the top of each JSP page that will use 
the Tiles custom tags,
  -          add line(s) declaring the Tiles custom tag libraries used on
  -          this particular page, like this:</li>
  -                             </ul>
  -                             <pre>&lt;%@ taglib uri="/WEB-INF/struts-tiles.tld" 
prefix="tiles" %&gt;
  -</pre>
  -                             <ul>
  -                                     <li>If you plan to use Tiles definitions 
defined in a centralized file, you need
  -          to create this file, and instruct Struts to load the plugin which will 
create
  -              the factory corresponding to the file. You can have more than one 
definitions
  -              files.</li>
  -                                     <ul>
  -                                             <li>Create a file containing your 
definitions and give it a name (ex :
  -        <code>WEB-INF/tiles-defs.xml</code>). You can use the 
<code>tiles-defs.xml</code>
  -        file from the Tiles application for a detailed example of the required 
syntax.</li>
  -                                             <li>Setup Tiles plugin in each 
<code>struts-config.xml</code> file corresponding to
  -      a module:</li>
  -                                     </ul>
  -                                     <pre>
  - &lt;plug-in className="org.apache.struts.tiles.TilesPlugin" &gt;
  -   &lt;set-property property="definitions-config"
  -                    value="/WEB-INF/tiles-defs.xml,
  -                           /WEB-INF/tiles-tests-defs.xml" /&gt;
  -   &lt;set-property property="definitions-parser-validate" value="true" /&gt;
  - &lt;/plug-in&gt;
  -</pre>
  -                                     <ul>
  -                                             <li>
  -                                                     <strong>note:</strong> This 
plugin creates one single shared factory even if you have
  -     several modules. The plugin first read factory parameters from 
<code>web.xml</code> and
  -     then overload them with parameters from the first 
<code>struts-config.xml</code> file read.
  -     Read order is determined by the order of module declarations in 
<code>web.xml</code>.</li>
  -                                     </ul>
  -                             </ul>
  -        <ul>
  -          <li>
  -            <strong>note:</strong> Tiles framework now use the commons-logging 
package to output different
  -            information or debug data. Please refer to this package documentation 
to enable it. The
  -            simplest way to enable logging is to create two files under 
<code>WEB-INF/classes</code>:
  -                                     <pre>
  -          <strong>commons-logging.properties</strong>
  -          org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
  -          <strong>simplelog.properties</strong>
  -          # Logging detail level,
  -          # Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
  -          org.apache.commons.logging.simplelog.defaultlog=trace
  -</pre>
  -
  -          </li>
  -        </ul>
  -                     </section>
  -                     <section href="tiles" name="Tiles API Guide">
  +
  +<ul>
  +<li>
  +  Setup the struts-tiles taglib in your <code>WEB-INF/web.xml</code> file to 
include the following tag library declarations:
  +</li>
  +</ul>
  +
  +<pre>&lt;taglib&gt;
  +&lt;taglib-uri&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-uri&gt;
  +&lt;taglib-location&gt;/WEB-INF/struts-tiles.tld&lt;/taglib-location&gt;
  +&lt;/taglib&gt;</pre>
  +
  +<ul>
  +<li>
  +  At the top of each JSP page that will use the Tiles custom tags, add line(s) 
declaring the Tiles custom tag libraries used on this particular page, like this:
  +</li>
  +</ul>
  +
  +<pre>&lt;%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %&gt;</pre>
  +
  +<ul>
  +<li>
  +  If you plan to use Tiles definitions defined in a centralized file, you need to 
create this file, and instruct Struts to load the plugin which will create the factory 
corresponding to the file. You can have more than one definitions files.
  +</li>
  +
  +<ul>
  +<li>
  +Create a file containing your definitions and give it a name (ex: 
<code>WEB-INF/tiles-defs.xml</code>). You can use the <code>tiles-defs.xml</code> file 
from the Tiles application for a detailed example of the required syntax.</li>
  +
  +<li>
  +  Setup Tiles plugin in each <code>struts-config.xml</code> file corresponding to a 
module:
  +</li>
  +</ul>
  +
  +<pre>&lt;plug-in className="org.apache.struts.tiles.TilesPlugin" &gt;
  +&lt;set-property property="definitions-config"
  +value="/WEB-INF/tiles-defs.xml,
  +/WEB-INF/tiles-tests-defs.xml" /&gt;
  +&lt;set-property property="definitions-parser-validate" value="true" /&gt;
  +&lt;/plug-in&gt;</pre>
  +
  +<ul>
  +<li>
  +  <strong>note:</strong> This plugin creates one single shared factory even if you 
have several modules. The plugin first read factory parameters from 
<code>web.xml</code> and then overload them with parameters from the first 
<code>struts-config.xml</code> file read. Read order is determined by the order of 
module declarations in <code>web.xml</code>.
  +</li>
  +</ul>
  +</ul>
  +
   <ul>
  -<li>A concise
  -<a 
href="../api/org/apache/struts/tiles/package-summary.html#package_description">Tiles 
API Guide</a> is available to help you get started with the Tiles framework.</li>
  +<li>
  +<strong>note:</strong> Tiles framework now use the commons-logging package to 
output different information or debug data. Please refer to this package documentation 
to enable it. The simplest way to enable logging is to create two files under 
<code>WEB-INF/classes</code>:
  +<pre><strong>commons-logging.properties</strong>
  +org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
  +<strong>simplelog.properties</strong>
  +# Logging detail level,
  +# Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
  +org.apache.commons.logging.simplelog.defaultlog=trace</pre>
  +</li>
  +</ul>
  +
  +</section>
  +
  +<section href="tiles" name="Tiles API Guide">
  +
  +<ul>
  +<li>
  +  A concise <a 
href="../api/org/apache/struts/tiles/package-summary.html#package_description">Tiles 
API Guide</a> is available to help you get started with the Tiles framework.
  +</li>
  +
   <li><a href="struts-tiles.html">Tiles Taglib Syntax Reference</a></li>
   </ul>
  -                     </section>
   
  -                     <section href="resources" name="Tiles Resources">
  -                             <p>
  -                                     <a 
href="http://www-106.ibm.com/developerworks/java/library/j-strutstiles.html?loc=j";>
  -                                             <b>Struts and Tiles aid 
component-based development</b>
  -                                     </a> by Wellie Chao.</p>
  -                             <p>
  -                                     <a 
href="http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html";>
  -                                             <b>UI design with Tiles and Struts</b>
  -                                     </a> by Prakash Malani.</p>
  +</section>
  +
  +<section href="resources" name="Tiles Resources">
  +
  +<p>
  +<a 
href="http://www.manning.com/getpage.html?project=husted&amp;filename=chapters.html";>
  +<b>Developing applications with Tiles</b></a> by Cedric Dumoulin and Ted Husted.
  +Sample chapter from
  +<a 
href="http://www.amazon.com/exec/obidos/ISBN=1930110502/hitchhikeguidetoA/";>Struts in 
Action</a>; available as a free download (PDF).
  +</p>
   
  -<!--
  -<author>Ted Husted</author>
   <p>
  -                                     <b>
  -                                             <u>Developing applications with 
Tiles</u>
  -                                     </b> by Cedric Dumoulin and Ted Husted.
  -Sample chapter from <u>Java Web Development with Struts</u>; available as a
  -<u>free download</u> (PDF).
  +<a href="http://www.oreilly.com/catalog/jakarta/chapter/";>
  +<b>Using Tiles</b></a> Sample beta chapter from
  +<a 
href="http://www.amazon.com/exec/obidos/ISBN=0596003285/hitchhikeguidetoA/";>Programming
 Jakarta Struts</a>; available as a free download (PDF).
   </p>
  --->
  -                     </section>
  -             </chapter>
  -     </body>
  -</document>
  +
  +<p>
  +<a 
href="http://www-106.ibm.com/developerworks/java/library/j-strutstiles.html?loc=j";>
  +<b>Struts and Tiles aid component-based development</b></a> by Wellie Chao.
  +</p>
  +
  +<p>
  +<a href="http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html";>
  +<b>UI design with Tiles and Struts</b></a> by Prakash Malani.
  +</p>
  +
  +</section>
  +</chapter></body></document>
  
  
  

--
To unsubscribe, e-mail:   <mailto:struts-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@;jakarta.apache.org>

Reply via email to