[jboss-cvs] jboss-seam/doc/reference/en/modules ...

Shane Bryzak sbryzak at redhat.com
Mon May 7 23:14:24 EDT 2007


  User: sbryzak2
  Date: 07/05/07 23:14:24

  Modified:    doc/reference/en/modules  controls.xml
  Log:
  alphabetical order
  
  Revision  Changes    Path
  1.34      +721 -876  jboss-seam/doc/reference/en/modules/controls.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: controls.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/controls.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -b -r1.33 -r1.34
  --- controls.xml	17 Apr 2007 09:45:40 -0000	1.33
  +++ controls.xml	8 May 2007 03:14:24 -0000	1.34
  @@ -33,110 +33,159 @@
           <row>
             <entry valign="top">
               <para>
  -              <literal>&lt;s:validate&gt;</literal>
  +              <literal>&lt;s:button&gt;</literal>
               </para>
             </entry>
             <entry valign="top">
               <para><emphasis>Description</emphasis></para>
               <para>
  -              A non-visual control, validates a JSF input field against the bound
  -              property using Hibernate Validator.
  +              A button that supports invocation of an action with control
  +              over conversation propagation. <emphasis>Does not submit the form.</emphasis>
               </para>
               <para><emphasis>Attributes</emphasis></para>
  +            <itemizedlist>
  +              <listitem>
               <para>
  -              None.
  +                  <literal>value</literal> &mdash; the label.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>action</literal> &mdash; a method binding that specified
  +                  the action listener.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>view</literal> &mdash; the JSF view id to link to.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>fragment</literal> &mdash; the fragment identifier to link to.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>disabled</literal> &mdash; is the link disabled?
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>propagation</literal> &mdash; determines the conversation
  +                  propagation style: <literal>begin</literal>, <literal>join</literal>,
  +                  <literal>nest</literal>, <literal>none</literal> or <literal>end</literal>.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>pageflow</literal> &mdash; a pageflow definition to begin.
  +                  (This is only useful when <literal>propagation="begin"</literal> or
  +                  <literal>propagation="join"</literal>.)
               </para>
  +              </listitem>
  +            </itemizedlist>
               <para><emphasis>Usage</emphasis></para>
               <programlisting><![CDATA[
  -<h:inputText id="userName" required="true" value="#{customer.userName}">
  -  <s:validate />
  -</h:inputText>
  -<h:message for="userName" styleClass="error" />]]></programlisting>
  +]]></programlisting>
             </entry>
           </row>
   
           <row>
             <entry valign="top">
  -            <para><literal>&lt;s:validateAll&gt;</literal></para>
  +            <para>
  +              <literal>&lt;s:cache&gt;</literal>
  +            </para>
             </entry>
             <entry valign="top">
               <para><emphasis>Description</emphasis></para>
               <para>
  -              A non-visual control, validates all child JSF input fields against their bound
  -              properties using Hibernate Validator.
  +              Cache the rendered page fragment using JBoss Cache. Note that
  +              <literal>&lt;s:cache&gt;</literal> actually uses the instance
  +              of JBoss Cache managed by the built-in <literal>pojoCache</literal>
  +              component.
               </para>
               <para><emphasis>Attributes</emphasis></para>
  +            <itemizedlist>
  +              <listitem>
               <para>
  -              None.
  +                  <literal>key</literal> &mdash; the key to cache rendered content,
  +                  often a value expression. For example, if we were caching a page
  +                  fragment that displays a document, we might use
  +                  <literal>key="Document-#{document.id}"</literal>.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>enabled</literal> &mdash; a value expression that determines
  +                  if the cache should be used.
  +                </para>
  +              </listitem>
  +              <listitem>
  +                <para>
  +                  <literal>region</literal> &mdash; a JBoss Cache node to use (different
  +                  nodes can have different expiry policies).
               </para>
  +              </listitem>
  +            </itemizedlist>
               <para><emphasis>Usage</emphasis></para>
               <programlisting><![CDATA[
  -<s:validateAll>
  -  <div class="entry">
  -    <h:outputLabel for="username">Username:</h:outputLabel>
  -    <h:inputText id="username" value="#{user.username}" required="true"/>
  -    <h:message for="username" styleClass="error" />
  -  </div>
  -  <div class="entry">
  -    <h:outputLabel for="password">Password:</h:outputLabel>
  -    <h:inputSecret id="password" value="#{user.password}" required="true"/>
  -    <h:message for="password" styleClass="error" />
  -  </div>
  -  <div class="entry">
  -    <h:outputLabel for="verify">Verify Password:</h:outputLabel>
  -    <h:inputSecret id="verify" value="#{register.verify}" required="true"/>
  -    <h:message for="verify" styleClass="error" />
  -  </div>
  -</s:validateAll>]]></programlisting>
  +]]></programlisting>
             </entry>
           </row>
   
           <row>
             <entry valign="top">
  -            <para><literal>&lt;s:formattedText&gt;</literal></para>
  +            <para>
  +              <literal>&lt;s:conversationId&gt;</literal>
  +            </para>
             </entry>
             <entry valign="top">
               <para><emphasis>Description</emphasis></para>
               <para>
  -               Outputs <emphasis>Seam Text</emphasis>, a rich text markup useful for blogs, wikis and
  -               other applications that might use rich text.  See the Seam Text chapter for full usage.
  +              Add the conversation id to an output link (or similar JSF control).
  +              <emphasis>Facelets only.</emphasis>
               </para>
               <para><emphasis>Attributes</emphasis></para>
  -            <itemizedlist>
  -              <listitem>
                   <para>
  -                  <literal>value</literal> &mdash; an EL expression specifying the rich text markup to render.
  +              None.
                   </para>
  -              </listitem>
  -            </itemizedlist>
               <para><emphasis>Usage</emphasis></para>
  -            <programlisting><![CDATA[<s:formattedText value="#{blog.text}"/>
  +            <programlisting><![CDATA[
   ]]></programlisting>            
  -            <para><emphasis>Example</emphasis></para>
  -            <mediaobject>
  -              <imageobject role="fo">
  -                <imagedata fileref="images/controls-seamtext.png" align="center"/>
  -              </imageobject>
  -              <imageobject role="html">
  -                <imagedata fileref="../shared/images/controls-seamtext.png" align="center"/>
  -              </imageobject>
  -            </mediaobject>                        
             </entry>
           </row>
   
           <row>
             <entry valign="top">
  -            <para><literal>&lt;s:convertDateTime&gt;</literal></para>
  +            <para>
  +              <literal>&lt;s:conversationPropagation&gt;</literal>
  +            </para>
             </entry>
             <entry valign="top">
               <para><emphasis>Description</emphasis></para>
               <para>
  -              Perform date or time conversions in the Seam timezone.
  +                Customize the conversation propagation for a command link or button
  +                (or similar JSF control).
  +                <emphasis>Facelets only.</emphasis>
               </para>
               <para><emphasis>Attributes</emphasis></para>
  +              <itemizedlist>
  +                <listitem>
               <para>
  -              None.
  +                     <literal>propagation</literal> &mdash; determines the conversation
  +                     propagation style: <literal>begin</literal>, <literal>join</literal>,
  +                     <literal>nest</literal>, <literal>none</literal> or <literal>end</literal>.
  +                  </para>
  +                </listitem>
  +                <listitem>
  +                  <para>
  +                    <literal>pageflow</literal> &mdash; a pageflow definition to begin.
  +                    (This is only useful when <literal>propagation="begin"</literal> or
  +                    <literal>propagation="join"</literal>.)
               </para>
  +                </listitem>
  +              </itemizedlist>
               <para><emphasis>Usage</emphasis></para>
               <programlisting><![CDATA[
   ]]></programlisting>
  @@ -145,14 +194,12 @@
   
           <row>
             <entry valign="top">
  -            <para><literal>&lt;s:convertEnum&gt;</literal></para>
  +            <para><literal>&lt;s:convertDateTime&gt;</literal></para>
             </entry>
  -
             <entry valign="top">
               <para><emphasis>Description</emphasis></para>
               <para>
  -              Assigns an enum converter to the current component.  This is primarily
  -              useful for radio button and dropdown controls.
  +              Perform date or time conversions in the Seam timezone.
               </para>
               <para><emphasis>Attributes</emphasis></para>
               <para>
  @@ -212,436 +259,364 @@
   
                 <row>
                   <entry valign="top">
  -                  <para>
  -                    <literal>&lt;s:enumItem&gt;</literal>
  -                  </para>
  +            <para><literal>&lt;s:convertEnum&gt;</literal></para>
                   </entry>
  +
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  +              Assigns an enum converter to the current component.  This is primarily
  +              useful for radio button and dropdown controls.
  +            </para>
  +            <para><emphasis>Attributes</emphasis></para>
                        <para>
  -                       Creates a <literal>SelectItem</literal> from an enum value.
  +              None.
                        </para>
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
  +]]></programlisting>
  +          </entry>
  +        </row>  
  +        
  +        <row>
  +          <entry valign="top">
                       <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                   <itemizedlist>
  -                     <listitem>
  +              <literal>&lt;s:decorate&gt;</literal>
  +            </para>
  +          </entry>
  +          <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                          <para>
  -                           <literal>enumValue</literal> &mdash; the string representation of the enum
  -                           value.
  +              "Decorate" a JSF input field when validation fails or when 
  +              <literal>required="true"</literal> is set.
                          </para>
  -                     </listitem>
  +            <para><emphasis>Attributes</emphasis></para>
  +            <itemizedlist>
                        <listitem>
                          <para>
  -                           <literal>label</literal> &mdash; the label to be used when rendering the <literal>SelectItem</literal>.
  +                  <literal>template</literal> &mdash; the facelets template to use to decorate the component
                          </para>
                        </listitem>
                      </itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:selectItems&gt;</literal>
  +              <literal>&lt;s:div&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       Creates a <literal>List&lt;SelectItem&gt;</literal> from a List, Set, DataModel or Array.
  -                     </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                   <itemizedlist>
  -                     <listitem>
  -                       <para>
  -                           <literal>value</literal> &mdash; an EL expression specifying the data that backs the <literal>List&lt;SelectItem&gt;</literal>
  +               Render a HTML <literal>&lt;div&gt;</literal>.
                          </para>
  -                     </listitem>
  -                      <listitem>
  +            <para><emphasis>Attributes</emphasis></para>
                          <para>
  -                           <literal>var</literal> &mdash; defines the name of the local variable that holds the current object during iteration
  +              None.
                          </para>
  -                     </listitem>
  -                     <listitem>
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
  +]]></programlisting>
  +          </entry>
  +        </row>            
  +        
  +        <row>
  +          <entry valign="top">
                          <para>
  -                           <literal>label</literal> &mdash; the label to be used when rendering the <literal>SelectItem</literal>.  Can reference
  -                           the <literal>var</literal> variable
  +              <literal>&lt;s:enumItem&gt;</literal>
                          </para>
  -                     </listitem>
  -                      <listitem>
  +          </entry>
  +          <entry valign="top">
  +              <para><emphasis>Description</emphasis></para>
                          <para>
  -                           <literal>disabled</literal> &mdash; if true the <literal>SelectItem</literal> will be rendered disabled.  Can reference
  -                           the <literal>var</literal> variable
  +                Creates a <literal>SelectItem</literal> from an enum value.
                          </para>
  -                     </listitem>
  +              <para><emphasis>Attributes</emphasis></para>
  +              <itemizedlist>
                        <listitem>
                          <para>
  -                           <literal>noSelectionLabel</literal> &mdash; specifies the (optional) label to place at the top of list (if
  -                           <literal>required="true"</literal> is also specified then selecting this value will cause a validation error)
  +                     <literal>enumValue</literal> &mdash; the string representation of the enum
  +                     value.
                          </para>
                        </listitem>
                         <listitem>
                          <para>
  -                           <literal>hideNoSelectionLabel</literal> &mdash; if true, the <literal>noSelectionLabel</literal> will be hidden
  -                           when a value is selected
  +                    <literal>label</literal> &mdash; the label to be used when rendering the <literal>SelectItem</literal>.
                          </para>
                        </listitem>
                      </itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  -<h:selectOneMenu value="#{person.age}"  converter="#{converters.ageConverter}">
  -    <s:selectItems value="#{ages}" var="age" label="#{age}" />
  -</h:selectOneMenu>
  +              <para><emphasis>Usage</emphasis></para>
  +              <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:graphicImage&gt;</literal>
  +              <literal>&lt;s:fileUpload&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                         An extended <literal>&lt;h:graphicImage&gt;</literal> that allows the image to be created in a Seam Component; further transforms
  -                         can be applied to the image. <emphasis>Facelets only.</emphasis>
  +               Renders a file upload control.  This control must be used within a form with
  +               an encoding type of <literal>multipart/form-data</literal>, i.e:
                        </para>
  +
  +            <programlisting><![CDATA[
  +  <h:form enctype="multipart/form-data">]]></programlisting>
  +
                        <para>
  -                         All attributes for <literal>&lt;h:graphicImage&gt;</literal> are supported, as well as:
  +              For multipart requests, the Seam Multipart servlet filter must also be configured
  +              in <literal>web.xml</literal>:
                        </para>
  +
  +            <programlisting><![CDATA[
  +<filter>
  +  <filter-name>Seam Filter</filter-name>
  +  <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
  +</filter>
  +
  +<filter-mapping>
  +  <filter-name>Seam Filter</filter-name>
  +  <url-pattern>/*</url-pattern>
  +</filter-mapping>]]></programlisting>
  +
  +            <para><emphasis>Configuration</emphasis></para>
  +
                       <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  +              The following configuration options for multipart requests may be configured in components.xml:
  +            </para>
  +
                        <itemizedlist>
                            <listitem>
                            <para>
  -                             <literal>value</literal> &mdash; image to display.  Can be a path <literal>String</literal>
  -                             (loaded from the classpath), a <literal>byte[]</literal>, a <literal>java.io.File</literal>,
  -                             a <literal>java.io.InputStream</literal> or a <literal>java.net.URL</literal>.  Currently supported
  -                             image formats are <literal>image/png</literal>, <literal>image/jpeg</literal> and <literal>image/gif</literal>.
  +                  <literal>createTempFiles</literal> &mdash; if this option is set to true, uploaded files are
  +                  streamed to a temporary file instead of in memory.
                            </para>
                            </listitem>
                             <listitem>
                            <para>
  -                             <literal>fileName</literal> &mdash; if not specified the served image will have a generated file name.
  -                             If you want to name your file, you should specify it here.  This name should be unique
  +                  <literal>maxRequestSize</literal> &mdash; the maximum size of a file upload request, in bytes.
                            </para>
                            </listitem>
                        </itemizedlist>
  +
                       <para>
  -<emphasis>Transformations</emphasis>
  -</para>
  -               <para>
  -                  To apply a transform to the image, you would nest a tag specifying the transform to apply.  Seam currently supports these
  -                  transforms:
  +              Here's an example:
                  </para>
  -               <variablelist>
  -                <varlistentry>
  -                  <term>
  -<literal>&lt;s:transformImageSize&gt;</literal>
  -</term>
  -                  <listitem>
  +
  +            <programlisting><![CDATA[
  +<component class="org.jboss.seam.web.MultipartFilter">
  +  <property name="createTempFiles">true</property>
  +  <property name="maxRequestSize">1000000</property>
  +</component>]]></programlisting>
  +
  +            <para><emphasis>Attributes</emphasis></para>
                   <itemizedlist>
                     <listitem>
                       <para>
  -                      <literal>width</literal> &mdash; new width of the image
  +                  <literal>data</literal> &mdash; this value binding receives the binary file data.
  +                  The receiving field should be declared as a <literal>byte[]</literal> or <literal>InputStream</literal> (required).
                       </para>
                     </listitem>
                     <listitem>
                       <para>
  -                      <literal>height</literal> &mdash; new height of the image
  +                  <literal>contentType</literal> &mdash; this value binding receives the file's
  +                  content type (optional).
                       </para>
                     </listitem>
                     <listitem>
                       <para>
  -                      <literal>maintainRatio</literal> &mdash; if <literal>true</literal>, and <emphasis>one</emphasis> of
  -                      <literal>width</literal>/<literal>height</literal> are specified, the image will be resized with the
  -                      dimension not specified being calculated to maintain the aspect ratio.
  +                  <literal>fileName</literal> &mdash; this value binding receives the filename (optional).
                       </para>
                     </listitem>
                     <listitem>
                       <para>
  -                      <literal>factor</literal> &mdash; scale the image by the given factor
  +                  <literal>accept</literal> &mdash; a comma-separated list of content types to accept,
  +                  may not be supported by the browser.  E.g. <literal>"images/png,images/jpg"</literal>,
  +                  <literal>"images/*"</literal>.
                       </para>
                     </listitem>
  -                </itemizedlist>
  -                      </listitem>
  -                    </varlistentry>
  -                    <varlistentry>
  -                      <term>
  -<literal>&lt;s:transformImageBlur&gt;</literal>
  -</term>
  -                      <listitem>
  -                <itemizedlist>
                     <listitem>
                       <para>
  -                      <literal>radius</literal> &mdash; perform a convolution blur with the given radius
  +                  <literal>style</literal> &mdash; The control's style
                       </para>
                     </listitem>
  -                </itemizedlist>
  -                      </listitem>
  -                    </varlistentry>
  -                    <varlistentry>
  -                      <term>
  -<literal>&lt;s:transformImageType&gt;</literal>
  -</term>
  -                      <listitem>
  -                <itemizedlist>
                     <listitem>
                       <para>
  -                      <literal>contentType</literal> &mdash; alter the type of the image to either <literal>image/jpeg</literal> or <literal>image/png</literal>
  +                  <literal>styleClass</literal> &mdash; The control's style class
                       </para>
                     </listitem>
                   </itemizedlist>
  -                      </listitem>
  -                    </varlistentry>
  -                   </variablelist>
  -
  -                   <para>
  -                      It's easy to create your own transform - create a <literal>UIComponent</literal> which <literal>implements</literal>
  -                      <literal>org.jboss.seam.ui.graphicImage.ImageTransform</literal>.  Inside the <literal>applyTransform()</literal>method
  -                      use <literal>image.getBufferedImage()</literal> to get the original image and <literal>image.setBufferedImage()</literal>
  -                      to set your transformed image.  Transforms are applied in the order specified in the view.
  -                   </para>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
  -                  <para>
  -                    <literal>&lt;s:decorate&gt;</literal>
  -                  </para>
  +            <para><literal>&lt;s:formattedText&gt;</literal></para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       "Decorate" a JSF input field when validation fails or when 
  -                       <literal>required="true"</literal> is set.
  +               Outputs <emphasis>Seam Text</emphasis>, a rich text markup useful for blogs, wikis and
  +               other applications that might use rich text.  See the Seam Text chapter for full usage.
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -
  +            <para><emphasis>Attributes</emphasis></para>
                           <itemizedlist>
                        <listitem>
                          <para>
  -                           <literal>template</literal> &mdash; the facelets template to use to decorate the component
  +                  <literal>value</literal> &mdash; an EL expression specifying the rich text markup to render.
                          </para>
                        </listitem>
   						</itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  -                    </para>
  -                </entry>
  -              </row>
  -              <row>
  -                <entry valign="top">
  -                  <para>
  -                    <literal>&lt;s:message&gt;</literal>
  -                  </para>
  -                </entry>
  -                <entry valign="top">
  -                    <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       "Decorate" a JSF input field with the validation error message.
  -                     </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                    <para>
  -                        None.
  -                    </para>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[<s:formattedText value="#{blog.text}"/>
   ]]></programlisting>
  -                    </para>
  +            <para><emphasis>Example</emphasis></para>
  +            <mediaobject>
  +              <imageobject role="fo">
  +                <imagedata fileref="images/controls-seamtext.png" align="center"/>
  +              </imageobject>
  +              <imageobject role="html">
  +                <imagedata fileref="../shared/images/controls-seamtext.png" align="center"/>
  +              </imageobject>
  +            </mediaobject>                        
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:span&gt;</literal>
  +              <literal>&lt;s:fragment&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       Render a HTML <literal>&lt;span&gt;</literal>.
  +              A non-rendering component useful for enabling/disabling rendering of it's children.
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  +            <para><emphasis>Attributes</emphasis></para>
                       <para>
                           None.
                       </para>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:div&gt;</literal>
  +              <literal>&lt;s:graphicImage&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       Render a HTML <literal>&lt;div&gt;</literal>.
  -                     </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                    <para>
  -                        None.
  +              An extended <literal>&lt;h:graphicImage&gt;</literal> that allows the image to be created in a Seam Component; further transforms
  +              can be applied to the image. <emphasis>Facelets only.</emphasis>
                       </para>
                       <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  +              All attributes for <literal>&lt;h:graphicImage&gt;</literal> are supported, as well as:
                       </para>
  -                </entry>
  -              </row>
  -
  -              <row>
  -                <entry valign="top">
  +            <para><emphasis>Attributes</emphasis></para>
  +             <itemizedlist>
  +               <listitem>
                     <para>
  -                    <literal>&lt;s:fragment&gt;</literal>
  +                 <literal>value</literal> &mdash; image to display.  Can be a path <literal>String</literal>
  +                 (loaded from the classpath), a <literal>byte[]</literal>, a <literal>java.io.File</literal>,
  +                 a <literal>java.io.InputStream</literal> or a <literal>java.net.URL</literal>.  Currently supported
  +                 image formats are <literal>image/png</literal>, <literal>image/jpeg</literal> and <literal>image/gif</literal>.
                     </para>
  -                </entry>
  -                <entry valign="top">
  -                    <para>
  -<emphasis>Description</emphasis>
  -</para>
  +               </listitem>
  +                <listitem>
                        <para>
  -                       A non-rendering component useful for enabling/disabling rendering of it's children.
  +                 <literal>fileName</literal> &mdash; if not specified the served image will have a generated file name.
  +                 If you want to name your file, you should specify it here.  This name should be unique
                        </para>
  +               </listitem>
  +             </itemizedlist>
  +             <para><emphasis>Transformations</emphasis></para>
                       <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                    <para>
  -                        None.
  +               To apply a transform to the image, you would nest a tag specifying the transform to apply.  Seam currently supports these
  +               transforms:
                       </para>
  +             <variablelist>
  +              <varlistentry>
  +                <term><literal>&lt;s:transformImageSize&gt;</literal></term>
  +                <listitem>
  +                  <itemizedlist>
  +                    <listitem>
                       <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  +                        <literal>width</literal> &mdash; new width of the image
                       </para>
  -                </entry>
  -              </row>
  -
  -              <row>
  -                <entry valign="top">
  +                    </listitem>
  +                    <listitem>
                     <para>
  -                    <literal>&lt;s:cache&gt;</literal>
  +                        <literal>height</literal> &mdash; new height of the image
                     </para>
  -                </entry>
  -                <entry valign="top">
  -                    <para>
  -<emphasis>Description</emphasis>
  -</para>
  +                    </listitem>
  +                    <listitem>
                        <para>
  -                        Cache the rendered page fragment using JBoss Cache. Note that
  -                         <literal>&lt;s:cache&gt;</literal> actually uses the instance
  -                         of JBoss Cache managed by the built-in <literal>pojoCache</literal>
  -                         component.
  +                        <literal>maintainRatio</literal> &mdash; if <literal>true</literal>, and <emphasis>one</emphasis> of
  +                        <literal>width</literal>/<literal>height</literal> are specified, the image will be resized with the
  +                        dimension not specified being calculated to maintain the aspect ratio.
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                   <itemizedlist>
  +                    </listitem>
                          <listitem>
                          <para>
  -                           <literal>key</literal> &mdash; the key to cache rendered content,
  -                           often a value expression. For example, if we were caching a page
  -                           fragment that displays a document, we might use
  -                           <literal>key="Document-#{document.id}"</literal>.
  +                        <literal>factor</literal> &mdash; scale the image by the given factor
                          </para>
                          </listitem>
  +                  </itemizedlist>
  +                </listitem>
  +              </varlistentry>
  +              <varlistentry>
  +                <term><literal>&lt;s:transformImageBlur&gt;</literal></term>
  +                <listitem>
  +                  <itemizedlist>
                          <listitem>
                          <para>
  -                           <literal>enabled</literal> &mdash; a value expression that determines
  -                           if the cache should be used.
  +                        <literal>radius</literal> &mdash; perform a convolution blur with the given radius
                          </para>
                          </listitem>
  +                  </itemizedlist>
  +                </listitem>
  +              </varlistentry>
  +              <varlistentry>
  +                <term><literal>&lt;s:transformImageType&gt;</literal></term>
  +                <listitem>
  +                  <itemizedlist>
                          <listitem>
                          <para>
  -                           <literal>region</literal> &mdash; a JBoss Cache node to use (different
  -                           nodes can have different expiry policies).
  +                        <literal>contentType</literal> &mdash; alter the type of the image to either <literal>image/jpeg</literal> or <literal>image/png</literal>
                          </para>
                          </listitem>
                      </itemizedlist>
  +                </listitem>
  +              </varlistentry>
  +            </variablelist>
  +
                       <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  +              It's easy to create your own transform - create a <literal>UIComponent</literal> which <literal>implements</literal>
  +              <literal>org.jboss.seam.ui.graphicImage.ImageTransform</literal>.  Inside the <literal>applyTransform()</literal>method
  +              use <literal>image.getBufferedImage()</literal> to get the original image and <literal>image.setBufferedImage()</literal>
  +              to set your transformed image.  Transforms are applied in the order specified in the view.
                       </para>
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
  +]]></programlisting>
                   </entry>
                 </row>
   
  @@ -652,16 +627,12 @@
                     </para>
                   </entry>
                   <entry valign="top">
  -                    <para>
  -<emphasis>Description</emphasis>
  -</para>
  +            <para><emphasis>Description</emphasis></para>
                        <para>
                          A link that supports invocation of an action with control over conversation
                          propagation. <emphasis>Does not submit the form.</emphasis>
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  +            <para><emphasis>Attributes</emphasis></para>
                        <itemizedlist>
                            <listitem>
                            <para>
  @@ -704,84 +675,30 @@
                            </para>
                            </listitem>
                        </itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:button&gt;</literal>
  +              <literal>&lt;s:message&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       A button that supports invocation of an action with control
  -                       over conversation propagation. <emphasis>Does not submit the form.</emphasis>
  -                     </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                     <itemizedlist>
  -                         <listitem>
  -                         <para>
  -                             <literal>value</literal> &mdash; the label.
  -                         </para>
  -                         </listitem>
  -                         <listitem>
  -                         <para>
  -                             <literal>action</literal> &mdash; a method binding that specified
  -                             the action listener.
  -                         </para>
  -                         </listitem>
  -                         <listitem>
  -                         <para>
  -                             <literal>view</literal> &mdash; the JSF view id to link to.
  -                         </para>
  -                         </listitem>
  -                         <listitem>
  -                         <para>
  -                             <literal>fragment</literal> &mdash; the fragment identifier to link to.
  -                         </para>
  -                         </listitem>
  -                         <listitem>
  -                         <para>
  -                             <literal>disabled</literal> &mdash; is the link disabled?
  -                         </para>
  -                         </listitem>
  -                         <listitem>
  -                         <para>
  -                             <literal>propagation</literal> &mdash; determines the conversation
  -                             propagation style: <literal>begin</literal>, <literal>join</literal>,
  -                             <literal>nest</literal>, <literal>none</literal> or <literal>end</literal>.
  +              "Decorate" a JSF input field with the validation error message.
                            </para>
  -                         </listitem>
  -                         <listitem>
  +            <para><emphasis>Attributes</emphasis></para>
                            <para>
  -                             <literal>pageflow</literal> &mdash; a pageflow definition to begin.
  -                             (This is only useful when <literal>propagation="begin"</literal> or
  -                             <literal>propagation="join"</literal>.)
  +              None.
                            </para>
  -                         </listitem>
  -                     </itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
  @@ -974,76 +891,78 @@
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:conversationPropagation&gt;</literal>
  +              <literal>&lt;s:selectItems&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  +                 Creates a <literal>List&lt;SelectItem&gt;</literal> from a List, Set, DataModel or Array.
  +               </para>
  +             <para><emphasis>Attributes</emphasis></para>
  +             <itemizedlist>
  +               <listitem>
                        <para>
  -                       Customize the conversation propagation for a command link or button
  -                       (or similar JSF control).
  -                       <emphasis>Facelets only.</emphasis>
  +                     <literal>value</literal> &mdash; an EL expression specifying the data that backs the <literal>List&lt;SelectItem&gt;</literal>
                        </para>
  +               </listitem>
  +                <listitem>
                       <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                   <itemizedlist>
  +                     <literal>var</literal> &mdash; defines the name of the local variable that holds the current object during iteration
  +                 </para>
  +               </listitem>
                          <listitem>
                          <para>
  -                           <literal>propagation</literal> &mdash; determines the conversation
  -                           propagation style: <literal>begin</literal>, <literal>join</literal>,
  -                           <literal>nest</literal>, <literal>none</literal> or <literal>end</literal>.
  +                     <literal>label</literal> &mdash; the label to be used when rendering the <literal>SelectItem</literal>.  Can reference
  +                     the <literal>var</literal> variable
                          </para>
                          </listitem>
                          <listitem>
                          <para>
  -                           <literal>pageflow</literal> &mdash; a pageflow definition to begin.
  -                           (This is only useful when <literal>propagation="begin"</literal> or
  -                           <literal>propagation="join"</literal>.)
  +                     <literal>disabled</literal> &mdash; if true the <literal>SelectItem</literal> will be rendered disabled.  Can reference
  +                     the <literal>var</literal> variable
                          </para>
                          </listitem>
  -                   </itemizedlist>
  +               <listitem>
                       <para>
  -<emphasis>Usage</emphasis>
  -</para>
  +                     <literal>noSelectionLabel</literal> &mdash; specifies the (optional) label to place at the top of list (if
  +                     <literal>required="true"</literal> is also specified then selecting this value will cause a validation error)
  +                 </para>
  +               </listitem>
  +               <listitem>
                       <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  +                    <literal>hideNoSelectionLabel</literal> &mdash; if true, the <literal>noSelectionLabel</literal> will be hidden
  +                    when a value is selected
                       </para>
  +               </listitem>
  +             </itemizedlist>
  +             <para><emphasis>Usage</emphasis></para>
  +             <programlisting><![CDATA[
  +<h:selectOneMenu value="#{person.age}"  converter="#{converters.ageConverter}">
  +    <s:selectItems value="#{ages}" var="age" label="#{age}" />
  +</h:selectOneMenu>
  +]]></programlisting>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:conversationId&gt;</literal>
  +              <literal>&lt;s:span&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                       Add the conversation id to an output link (or similar JSF control).
  -                       <emphasis>Facelets only.</emphasis>
  +              Render a HTML <literal>&lt;span&gt;</literal>.
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  +            <para><emphasis>Attributes</emphasis></para>
                       <para>
                           None.
                       </para>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
  @@ -1054,159 +973,85 @@
                     </para>
                   </entry>
                   <entry valign="top">
  -                    <para>
  -<emphasis>Description</emphasis>
  -</para>
  +            <para><emphasis>Description</emphasis></para>
                        <para>
                          Add the task id to an output link (or similar JSF control), when the
                          task is available via <literal>#{task}</literal>.
                          <emphasis>Facelets only.</emphasis>
                        </para>
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  +            <para><emphasis>Attributes</emphasis></para>
                       <para>
                           None.
                       </para>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  -                    <para>
  -                        <programlisting>
  -<![CDATA[
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
   ]]></programlisting>
  -                    </para>
                   </entry>
                 </row>
   
                 <row>
                   <entry valign="top">
                     <para>
  -                    <literal>&lt;s:fileUpload&gt;</literal>
  +              <literal>&lt;s:validate&gt;</literal>
                     </para>
                   </entry>
                   <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                       <para>
  -<emphasis>Description</emphasis>
  -</para>
  -                     <para>
  -                         Renders a file upload control.  This control must be used within a form with
  -                         an encoding type of <literal>multipart/form-data</literal>, i.e:
  -                     </para>
  -
  -                     <programlisting>
  -                       <![CDATA[
  -        <h:form enctype="multipart/form-data">
  -                       ]]>
  -                     </programlisting>
  -
  -                     <para>
  -                         For multipart requests, the Seam Multipart servlet filter must also be configured
  -                         in <literal>web.xml</literal>:
  -                     </para>
  -
  -                     <programlisting>
  -                       <![CDATA[
  -  <filter>
  -    <filter-name>Seam Filter</filter-name>
  -    <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
  -  </filter>
  -
  -  <filter-mapping>
  -    <filter-name>Seam Filter</filter-name>
  -    <url-pattern>/*</url-pattern>
  -  </filter-mapping>
  -                       ]]>
  -                     </programlisting>
  -
  -                    <para>
  -<emphasis>Configuration</emphasis>
  -</para>
  -
  -                     <para>
  -                        The following configuration options for multipart requests may be configured in components.xml:
  -                     </para>
  -
  -                     <itemizedlist>
  -                       <listitem>
  -                       <para>
  -                         <literal>createTempFiles</literal> &mdash; if this option is set to true, uploaded files are
  -                         streamed to a temporary file instead of in memory.
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  -                       <para>
  -                          <literal>maxRequestSize</literal> &mdash; the maximum size of a file upload request, in bytes.
  +              A non-visual control, validates a JSF input field against the bound
  +              property using Hibernate Validator.
                          </para>
  -                       </listitem>
  -                     </itemizedlist>
  -
  +            <para><emphasis>Attributes</emphasis></para>
                        <para>
  -                       Here's an example:
  +              None.
                        </para>
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
  +<h:inputText id="userName" required="true" value="#{customer.userName}">
  +  <s:validate />
  +</h:inputText>
  +<h:message for="userName" styleClass="error" />]]></programlisting>
  +          </entry>
  +        </row>
   
  -                     <programlisting>
  -                       <![CDATA[
  -  <component class="org.jboss.seam.web.MultipartFilter">
  -      <property name="createTempFiles">true</property>
  -      <property name="maxRequestSize">1000000</property>
  -  </component>
  -                       ]]>
  -                     </programlisting>
  -
  -                    <para>
  -<emphasis>Attributes</emphasis>
  -</para>
  -                   <itemizedlist>
  -                       <listitem>
  -                       <para>
  -                           <literal>data</literal> &mdash; this value binding receives the binary file data.
  -                           The receiving field should be declared as a <literal>byte[]</literal> or <literal>InputStream</literal> (required).
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  -                       <para>
  -                           <literal>contentType</literal> &mdash; this value binding receives the file's
  -                           content type (optional).
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  -                       <para>
  -                           <literal>fileName</literal> &mdash; this value binding receives the filename (optional).
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  -                       <para>
  -                           <literal>accept</literal> &mdash; a comma-separated list of content types to accept,
  -                           may not be supported by the browser.  E.g. <literal>"images/png,images/jpg"</literal>,
  -                           <literal>"images/*"</literal>.
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  -                       <para>
  -                           <literal>style</literal> &mdash; The control's style
  -                       </para>
  -                       </listitem>
  -                       <listitem>
  +        <row>
  +          <entry valign="top">
  +            <para><literal>&lt;s:validateAll&gt;</literal></para>
  +          </entry>
  +          <entry valign="top">
  +            <para><emphasis>Description</emphasis></para>
                          <para>
  -                           <literal>styleClass</literal> &mdash; The control's style class
  +              A non-visual control, validates all child JSF input fields against their bound
  +              properties using Hibernate Validator.
                          </para>
  -                       </listitem>
  -                   </itemizedlist>
  -                    <para>
  -<emphasis>Usage</emphasis>
  -</para>
  +            <para><emphasis>Attributes</emphasis></para>
                       <para>
  -                        <programlisting>
  -<![CDATA[
  -]]></programlisting>
  +              None.
                       </para>
  +            <para><emphasis>Usage</emphasis></para>
  +            <programlisting><![CDATA[
  +<s:validateAll>
  +  <div class="entry">
  +    <h:outputLabel for="username">Username:</h:outputLabel>
  +    <h:inputText id="username" value="#{user.username}" required="true"/>
  +    <h:message for="username" styleClass="error" />
  +  </div>
  +  <div class="entry">
  +    <h:outputLabel for="password">Password:</h:outputLabel>
  +    <h:inputSecret id="password" value="#{user.password}" required="true"/>
  +    <h:message for="password" styleClass="error" />
  +  </div>
  +  <div class="entry">
  +    <h:outputLabel for="verify">Verify Password:</h:outputLabel>
  +    <h:inputSecret id="verify" value="#{register.verify}" required="true"/>
  +    <h:message for="verify" styleClass="error" />
  +  </div>
  +</s:validateAll>]]></programlisting>
                   </entry>
                 </row>
   
               </tbody>
           </tgroup>
  -
       </table>
   
   </chapter>
  
  
  



More information about the jboss-cvs-commits mailing list