Author: SeanRogers
Date: 2010-03-10 01:10:36 -0500 (Wed, 10 Mar 2010)
New Revision: 16545
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessage-richmessage_example.xml_sample
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessages-richmessages_example.xml_sample
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessage-richmessage_component.png
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessages-richmessages_component.png
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
Log:
Worked on rich:message and rich:messages, fixed image resizing in Developer Guide
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml
===================================================================
---
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml 2010-03-09
23:46:13 UTC (rev 16544)
+++
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Output_and_messages.xml 2010-03-10
06:10:36 UTC (rev 16545)
@@ -4,20 +4,210 @@
<chapter id="chap-Component_Reference-Output_and_messages">
<title>Output and messages</title>
<para>
- Incomplete
+ Read this chapter for details on components that display messages and other feedback to
the user.
</para>
<section id="sect-Component_Reference-Output_and_messages-richmessage">
<title><sgmltag><rich:message></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.richfaces.RichMessage</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.richfaces.component.html.HtmlRichMessage</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family:
<classname>org.richfaces.component.RichMessage</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.richfaces.RichMessageRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.richfaces.taglib.RichMessageTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><rich:message></sgmltag> component renders a
single for message relating to another specific component. The message consists of two
parts, both of which are optional: the marker icon and the textual label. The appearance
of the message can be customized, and tool-tips can be used for further information about
the message.
</para>
+ <figure
id="figu-Component_Reference-richmessage-richmessage_component">
+ <title>rich:message component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richmessage-richmessage_component.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <sgmltag><rich:message></sgmltag> component
displaying a message warning that a minimum of five characters is required for an
associated text input field. It features both a marker icon in the form of a red and white
cross, and a red textual label.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The <varname>passedLabel</varname> attribute contains a message to display
when there are no errors; that is, when validation passes successfully. The
<varname>showSummary</varname> attribute specifies whether to display only a
summary of the full message. The full message can be displayed in a tool-tip when hovering
the mouse over the summary.
+ </para>
+ <para>
+ The <sgmltag><a4j:message></sgmltag> component is
automatically rendered after an Ajax request, even without the use of an
<sgmltag><a4j:outputPanel></sgmltag> component.
+ </para>
+ <para>
+ Facets are used to define the marker icons for different message states:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>errorMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>error</literal>
severity class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>fatalMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>fatal</literal>
severity class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>infoMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>info</literal> severity
class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>passedMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages that are not of the
<literal>error</literal>, <literal>fatal</literal>,
<literal>info</literal>, or <literal>warn</literal> severity
classes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>warnMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>warn</literal> severity
class.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <example
id="exam-Component_Reference-richmessage-richmessage_example">
+ <title>rich:message example</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richmessage-richmessage_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
</section>
<section
id="sect-Component_Reference-Output_and_messages-richmessages">
<title><sgmltag><rich:messages></sgmltag></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type:
<classname>org.richfaces.component.RichMessages</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class:
<classname>org.richfaces.component.html.HtmlRichMessages</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family:
<classname>org.richfaces.component.RichMessages</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type:
<classname>org.richfaces.RichMessagesRenderer</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.richfaces.taglib.RichMessagesTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><rich:messages></sgmltag> components works
similarly to the <sgmltag><rich:message></sgmltag> component,
but can display validation messages for a group of components instead of just a single
component. Refer to <xref
linkend="sect-Component_Reference-Output_and_messages-richmessage" /> for
details on the <sgmltag><rich:message></sgmltag> component.
</para>
+ <figure
id="figu-Component_Reference-richmessages-richmessages_component">
+ <title>rich:messages component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/figu-Component_Reference-richmessages-richmessages_component.png"
format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <sgmltag><rich:messages></sgmltag> component
displaying two messages both warning of insufficient characters in two different input
controls. Both messages feature a marker icon in the form of a red and white cross.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The <sgmltag><rich:messages></sgmltag> component displays
error messages for each validating component in the same container. The
<varname>passedLabel</varname> attribute contains a message to display when
there are no errors; that is, when validation for all components passes successfully. The
<varname>layout</varname> attribute defines how the messages are presented:
either using <literal>list</literal> for a list layout, or
<literal>table</literal> for a tabular layout.
+ </para>
+ <para>
+ The <sgmltag><a4j:message></sgmltag> component is
automatically rendered after an Ajax request, even without the use of an
<sgmltag><a4j:outputPanel></sgmltag> component.
+ </para>
+ <para>
+ All messages use the same state icons, specified by using facets in the same way as
for the <sgmltag><rich:message></sgmltag> component:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>errorMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>error</literal>
severity class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>fatalMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>fatal</literal>
severity class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>infoMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>info</literal> severity
class.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>passedMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages that are not of the
<literal>error</literal>, <literal>fatal</literal>,
<literal>info</literal>, or <literal>warn</literal> severity
classes.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>warnMarker</literal></term>
+ <listitem>
+ <para>
+ Defines the icon for messages with the <literal>warn</literal> severity
class.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <example
id="exam-Component_Reference-richmessages-richmessages_example">
+ <title>rich:messages example</title>
+ <programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/exam-Component_Reference-richmessages-richmessages_example.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </example>
</section>
<section id="sect-Component_Reference-Output_and_messages-richpaint2D">
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessage-richmessage_example.xml_sample
===================================================================
---
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessage-richmessage_example.xml_sample
(rev 0)
+++
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessage-richmessage_example.xml_sample 2010-03-10
06:10:36 UTC (rev 16545)
@@ -0,0 +1,8 @@
+<rich:message for="id" passedLabel="No errors"
showSummary="true">
+ <f:facet name="errorMarker">
+ <h:graphicImage url="/image/error.png"/>
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:graphicImage url="/image/passed.png"/>
+ </f:facet>
+</rich:message>
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessages-richmessages_example.xml_sample
===================================================================
---
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessages-richmessages_example.xml_sample
(rev 0)
+++
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-richmessages-richmessages_example.xml_sample 2010-03-10
06:10:36 UTC (rev 16545)
@@ -0,0 +1,35 @@
+<h:form>
+ <rich:messages passedLabel="Data validated."
layout="list">
+ <f:facet name="header">
+ <h:outputText value="Entered Data
Status:"></h:outputText>
+ </f:facet>
+ <f:facet name="passedMarker">
+ <h:graphicImage value="/images/ajax/passed.gif" />
+ </f:facet>
+ <f:facet name="errorMarker">
+ <h:graphicImage value="/images/ajax/error.gif" />
+ </f:facet>
+ </rich:messages>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="Name:" />
+ <h:inputText label="Name" id="name"
required="true" value="#{userBean.name}">
+ <f:validateLength minimum="3" />
+ </h:inputText>
+ <h:outputText value="Job:" />
+ <h:inputText label="Job" id="job"
required="true" value="#{userBean.job}">
+ <f:validateLength minimum="3" maximum="50" />
+ </h:inputText>
+ <h:outputText value="Address:" />
+ <h:inputText label="Address" id="address"
required="true" value="#{userBean.address}">
+ <f:validateLength minimum="10" />
+ </h:inputText>
+ <h:outputText value="Zip:" />
+ <h:inputText label="Zip" id="zip"
required="true" value="#{userBean.zip}">
+ <f:validateLength minimum="4" maximum="9" />
+ </h:inputText>
+ <f:facet name="footer">
+ <a4j:commandButton value="Validate" />
+ </f:facet>
+ </h:panelGrid>
+</h:form>
Added:
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessage-richmessage_component.png
===================================================================
(Binary files differ)
Property changes on:
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessage-richmessage_component.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessages-richmessages_component.png
===================================================================
(Binary files differ)
Property changes on:
root/docs/trunk/Component_Reference/en-US/images/figu-Component_Reference-richmessages-richmessages_component.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-03-09
23:46:13 UTC (rev 16544)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_overview.xml 2010-03-10
06:10:36 UTC (rev 16545)
@@ -12,9 +12,12 @@
<figure
id="figu-Developer_Guide-RichFaces_overview-Request_processing_flow">
<title>Request processing flow</title>
<mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_flow.png"
format="PNG" width="450" contentwidth="150mm" />
+ <imageobject role="html">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_flow.png"
format="PNG" contentwidth="660px" />
</imageobject>
+ <imageobject role="fo">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_flow.png"
format="PNG" contentwidth="150mm" />
+ </imageobject>
<textobject>
<para>
The RichFaces request processing flow.
@@ -66,9 +69,12 @@
<figure
id="figu-Developer_Guide-Ajax_Filter-Request_processing_sequences">
<title>Request processing sequences</title>
<mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_sequences.png"
format="PNG" width="450" contentwidth="150mm" />
+ <imageobject role="html">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_sequences.png"
format="PNG" contentwidth="660px" />
</imageobject>
+ <imageobject role="fo">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Request_processing_sequences.png"
format="PNG" contentwidth="150mm" />
+ </imageobject>
<textobject>
<para>
The difference between processing a regular JSF request and an Ajax request with a
filter.
@@ -82,9 +88,12 @@
<figure
id="figu-Developer_Guide-Ajax_Filter-Resource_request_sequence">
<title>Resource request sequence</title>
<mediaobject>
- <imageobject>
- <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Resource_request_sequence.png"
format="PNG" width="450" contentwidth="150mm" />
+ <imageobject role="html">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Resource_request_sequence.png"
format="PNG" contentwidth="660px" />
</imageobject>
+ <imageobject role="fo">
+ <imagedata
fileref="images/figu-Developer_Guide-RichFaces_overview-Resource_request_sequence.png"
format="PNG" contentwidth="150mm" />
+ </imageobject>
<textobject>
<para>
The difference between resource requests for a regular JSF request and an Ajax
request with a filter.