[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><s:validate></literal>
+ <literal><s:button></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> — the label.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>action</literal> — a method binding that specified
+ the action listener.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>view</literal> — the JSF view id to link to.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>fragment</literal> — the fragment identifier to link to.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>disabled</literal> — is the link disabled?
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>propagation</literal> — 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> — 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><s:validateAll></literal></para>
+ <para>
+ <literal><s:cache></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><s:cache></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> — 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> — a value expression that determines
+ if the cache should be used.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>region</literal> — 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><s:formattedText></literal></para>
+ <para>
+ <literal><s:conversationId></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> — 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><s:convertDateTime></literal></para>
+ <para>
+ <literal><s:conversationPropagation></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> — 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> — 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><s:convertEnum></literal></para>
+ <para><literal><s:convertDateTime></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><s:enumItem></literal>
- </para>
+ <para><literal><s:convertEnum></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><s:decorate></literal>
+ </para>
+ </entry>
+ <entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
- <literal>enumValue</literal> — 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> — the label to be used when rendering the <literal>SelectItem</literal>.
+ <literal>template</literal> — 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><s:selectItems></literal>
+ <literal><s:div></literal>
</para>
</entry>
<entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
-<emphasis>Description</emphasis>
-</para>
- <para>
- Creates a <literal>List<SelectItem></literal> from a List, Set, DataModel or Array.
- </para>
- <para>
-<emphasis>Attributes</emphasis>
-</para>
- <itemizedlist>
- <listitem>
- <para>
- <literal>value</literal> — an EL expression specifying the data that backs the <literal>List<SelectItem></literal>
+ Render a HTML <literal><div></literal>.
</para>
- </listitem>
- <listitem>
+ <para><emphasis>Attributes</emphasis></para>
<para>
- <literal>var</literal> — 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> — the label to be used when rendering the <literal>SelectItem</literal>. Can reference
- the <literal>var</literal> variable
+ <literal><s:enumItem></literal>
</para>
- </listitem>
- <listitem>
+ </entry>
+ <entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
- <literal>disabled</literal> — 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> — 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> — the string representation of the enum
+ value.
</para>
</listitem>
<listitem>
<para>
- <literal>hideNoSelectionLabel</literal> — if true, the <literal>noSelectionLabel</literal> will be hidden
- when a value is selected
+ <literal>label</literal> — 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><s:graphicImage></literal>
+ <literal><s:fileUpload></literal>
</para>
</entry>
<entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
-<emphasis>Description</emphasis>
-</para>
- <para>
- An extended <literal><h:graphicImage></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><h:graphicImage></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> — 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> — 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> — 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> — 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><s:transformImageSize></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> — new width of the image
+ <literal>data</literal> — 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> — new height of the image
+ <literal>contentType</literal> — this value binding receives the file's
+ content type (optional).
</para>
</listitem>
<listitem>
<para>
- <literal>maintainRatio</literal> — 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> — this value binding receives the filename (optional).
</para>
</listitem>
<listitem>
<para>
- <literal>factor</literal> — scale the image by the given factor
+ <literal>accept</literal> — 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><s:transformImageBlur></literal>
-</term>
- <listitem>
- <itemizedlist>
<listitem>
<para>
- <literal>radius</literal> — perform a convolution blur with the given radius
+ <literal>style</literal> — The control's style
</para>
</listitem>
- </itemizedlist>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
-<literal><s:transformImageType></literal>
-</term>
- <listitem>
- <itemizedlist>
<listitem>
<para>
- <literal>contentType</literal> — alter the type of the image to either <literal>image/jpeg</literal> or <literal>image/png</literal>
+ <literal>styleClass</literal> — 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><s:decorate></literal>
- </para>
+ <para><literal><s:formattedText></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> — the facelets template to use to decorate the component
+ <literal>value</literal> — 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><s:message></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><s:span></literal>
+ <literal><s:fragment></literal>
</para>
</entry>
<entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
-<emphasis>Description</emphasis>
-</para>
- <para>
- Render a HTML <literal><span></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><s:div></literal>
+ <literal><s:graphicImage></literal>
</para>
</entry>
<entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
-<emphasis>Description</emphasis>
-</para>
- <para>
- Render a HTML <literal><div></literal>.
- </para>
- <para>
-<emphasis>Attributes</emphasis>
-</para>
- <para>
- None.
+ An extended <literal><h:graphicImage></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><h:graphicImage></literal> are supported, as well as:
</para>
- </entry>
- </row>
-
- <row>
- <entry valign="top">
+ <para><emphasis>Attributes</emphasis></para>
+ <itemizedlist>
+ <listitem>
<para>
- <literal><s:fragment></literal>
+ <literal>value</literal> — 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> — 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><s:transformImageSize></literal></term>
+ <listitem>
+ <itemizedlist>
+ <listitem>
<para>
-<emphasis>Usage</emphasis>
-</para>
- <para>
- <programlisting>
-<![CDATA[
-]]></programlisting>
+ <literal>width</literal> — new width of the image
</para>
- </entry>
- </row>
-
- <row>
- <entry valign="top">
+ </listitem>
+ <listitem>
<para>
- <literal><s:cache></literal>
+ <literal>height</literal> — 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><s:cache></literal> actually uses the instance
- of JBoss Cache managed by the built-in <literal>pojoCache</literal>
- component.
+ <literal>maintainRatio</literal> — 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> — 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> — scale the image by the given factor
</para>
</listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal><s:transformImageBlur></literal></term>
+ <listitem>
+ <itemizedlist>
<listitem>
<para>
- <literal>enabled</literal> — a value expression that determines
- if the cache should be used.
+ <literal>radius</literal> — perform a convolution blur with the given radius
</para>
</listitem>
+ </itemizedlist>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal><s:transformImageType></literal></term>
+ <listitem>
+ <itemizedlist>
<listitem>
<para>
- <literal>region</literal> — a JBoss Cache node to use (different
- nodes can have different expiry policies).
+ <literal>contentType</literal> — 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><s:button></literal>
+ <literal><s:message></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> — the label.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>action</literal> — a method binding that specified
- the action listener.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>view</literal> — the JSF view id to link to.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fragment</literal> — the fragment identifier to link to.
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>disabled</literal> — is the link disabled?
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>propagation</literal> — 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> — 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><s:conversationPropagation></literal>
+ <literal><s:selectItems></literal>
</para>
</entry>
<entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
-<emphasis>Description</emphasis>
-</para>
+ Creates a <literal>List<SelectItem></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> — an EL expression specifying the data that backs the <literal>List<SelectItem></literal>
</para>
+ </listitem>
+ <listitem>
<para>
-<emphasis>Attributes</emphasis>
-</para>
- <itemizedlist>
+ <literal>var</literal> — defines the name of the local variable that holds the current object during iteration
+ </para>
+ </listitem>
<listitem>
<para>
- <literal>propagation</literal> — determines the conversation
- propagation style: <literal>begin</literal>, <literal>join</literal>,
- <literal>nest</literal>, <literal>none</literal> or <literal>end</literal>.
+ <literal>label</literal> — 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> — a pageflow definition to begin.
- (This is only useful when <literal>propagation="begin"</literal> or
- <literal>propagation="join"</literal>.)
+ <literal>disabled</literal> — 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> — 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> — 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><s:conversationId></literal>
+ <literal><s:span></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><span></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><s:fileUpload></literal>
+ <literal><s:validate></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> — 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> — 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> — 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> — this value binding receives the file's
- content type (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>fileName</literal> — this value binding receives the filename (optional).
- </para>
- </listitem>
- <listitem>
- <para>
- <literal>accept</literal> — 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> — The control's style
- </para>
- </listitem>
- <listitem>
+ <row>
+ <entry valign="top">
+ <para><literal><s:validateAll></literal></para>
+ </entry>
+ <entry valign="top">
+ <para><emphasis>Description</emphasis></para>
<para>
- <literal>styleClass</literal> — 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