JBoss Rich Faces SVN: r10034 - Plan and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: tkuprevich
Date: 2008-08-11 12:53:59 -0400 (Mon, 11 Aug 2008)
New Revision: 10034
Modified:
trunk/test-applications/qa/Test Plan/ComponentsAssignment3.2.2.BETA4.xls
Log:
Modified: trunk/test-applications/qa/Test Plan/ComponentsAssignment3.2.2.BETA4.xls
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Rich Faces SVN: r10033 - trunk/ui/calendar/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2008-08-11 12:53:38 -0400 (Mon, 11 Aug 2008)
New Revision: 10033
Modified:
trunk/ui/calendar/src/main/config/component/calendar.xml
Log:
RF-696 - "correct calendar attribute - boundaryDatesMode description, the first sentence is misleading." - done
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2008-08-11 16:51:57 UTC (rev 10032)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2008-08-11 16:53:38 UTC (rev 10033)
@@ -217,7 +217,8 @@
<name>boundaryDatesMode</name>
<classname>java.lang.String</classname>
<description>
- Used for the dates boundaries in the list. Valid values
+ This attribute is responsible for behaviour of dates
+ from the previous and next months which are displayed in the current month. Valid values
are "inactive" (Default) dates inactive and
gray colored, "scroll" boundaries work as
month scrolling controls, and "select"
16 years, 5 months
JBoss Rich Faces SVN: r10032 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-11 12:51:57 -0400 (Mon, 11 Aug 2008)
New Revision: 10032
Added:
trunk/docs/userguide/en/src/main/resources/images/ajaxValidator1.png
trunk/docs/userguide/en/src/main/resources/images/ajaxValidator2.png
Log:
https://jira.jboss.org/jira/browse/RF-3903
Pictures for validators
Added: trunk/docs/userguide/en/src/main/resources/images/ajaxValidator1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/ajaxValidator1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/ajaxValidator2.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/ajaxValidator2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 5 months
JBoss Rich Faces SVN: r10031 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-11 12:51:05 -0400 (Mon, 11 Aug 2008)
New Revision: 10031
Added:
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
Log:
https://jira.jboss.org/jira/browse/RF-3903
Validators
Added: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.desc.xml 2008-08-11 16:51:05 UTC (rev 10031)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:ajaxValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>The<emphasis role="bold">
+ <property><rich:ajaxGraph></property>
+ </emphasis>is a component designed to provide ajax validation inside for JSF inputs.</para>
+
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem><para>Skips all JSF processing except validation</para></listitem>
+
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2008-08-11 16:51:05 UTC (rev 10031)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:graphValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+
+ <entry>org.richfaces.graphValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlgraphValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.graphValidator</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.graphValidatorRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.graphValidatorTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on a page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:graphValidator event="onblur"/>
+ </h:inputText>
+...]]></programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
+...
+HtmlgraphValidator mygraphValidator= new HtmlgraphValidator();
+...
+]]></programlisting>
+ </section>
+
+
+
16 years, 5 months
JBoss Rich Faces SVN: r10030 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-11 12:50:55 -0400 (Mon, 11 Aug 2008)
New Revision: 10030
Added:
trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
Log:
https://jira.jboss.org/jira/browse/RF-3903
Validators
Added: trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.desc.xml 2008-08-11 16:50:55 UTC (rev 10030)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:ajaxValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>The<emphasis role="bold">
+ <property><rich:ajaxValidator></property>
+ </emphasis>is a component designed to provide ajax validation inside for JSF inputs.</para>
+
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem><para>Skips all JSF processing except validation</para></listitem>
+ <listitem><para>Possibility to use both standard and custom validation</para></listitem>
+ <listitem><para>Possibility to use Hibernate Validation</para></listitem>
+ <listitem><para>Event based validation triggering</para></listitem>
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2008-08-11 16:50:55 UTC (rev 10030)
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:ajaxValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+
+ <entry>org.richfaces.ajaxValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlajaxValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.ajaxValidator</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.ajaxValidatorRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.ajaxValidatorTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on a page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:ajaxValidator event="onblur"/>
+ </h:inputText>
+...]]></programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
+...
+HtmlAjaxValidator myAjaxValidator= new HtmlAjaxValidator();
+...
+]]></programlisting>
+ </section>
+ <section>
+ <title>Details of Usage</title>
+
+ <para>The <emphasis role="bold"><property><rich:ajaxValidator></property></emphasis> component should
+ be added as a child component to an input JSF tag which data
+ should be validated and an event that triggers validation should be specified as well.
+ The component is ajaxSingle by default so only the current field will be validated.</para>
+
+
+ <para>The following example demonstrates how the <emphasis role="bold"><property><rich:ajaxValidator></property></emphasis> adds AJAX functionality to standard JSF validators.
+ The request is sent when the input field loses focus,
+ the action is determined by the <emphasis><property>"event"</property></emphasis> attribute that is set to <code>"onblur"</code>.
+ </para>
+
+
+
+ <programlisting role="XML"><![CDATA[...
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Info:" />
+ </f:facet>
+ <h:panelGrid columns="3">
+
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:ajaxValidator event="onblur"/>
+ </h:inputText>
+ <rich:message for="name" />
+
+ <h:outputText value="Age:" />
+ <h:inputText value="#{userBean.age}" id="age" required="true">
+ <f:convertNumber integerOnly="true"/>
+ <f:validateLongRange minimum="18" maximum="99"/>
+ <rich:ajaxValidator event="onblur"/>
+ </h:inputText>
+ <rich:message for="age"/>
+
+ </h:panelGrid>
+ </rich:panel>
+ </h:form>
+ ...]]></programlisting>
+
+ <para>This is the result of the snippet. </para>
+
+
+ <figure>
+ <title>Simple example of <emphasis role="bold"><property><rich:ajaxValidator></property></emphasis>with
+</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/ajaxValidator1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>In the example above it's show how to work with standard JSF validators.
+ The <emphasis role="bold"><property><rich:ajaxValidator></property></emphasis> component also works perfectly with
+ custom validators enhancing their usage with AJAX.
+ </para>
+
+ <para>
+ Custom validation can be performed in two ways:
+ </para>
+
+ <itemizedlist>
+ <listitem><para>Using JSF Validation API is available in javax.faces.validator package</para></listitem>
+ <listitem><para>Using Hibernate Validator, specifying a constraint for the data to be validated. A reference on Hibernate Validator can be found <ulink url="http://www.hibernate.org/hib_docs/validator/reference/en/html_single/">here</ulink>.</para></listitem>
+ </itemizedlist>
+
+ <para>
+ The following example shows how the data entered by user can be validated using Hibernate Validator.
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="User Info:" />
+ </f:facet>
+ <h:panelGrid columns="3">
+
+ <h:outputText value="Name:" />
+ <h:inputText value="#{validationBean.name}" id="name" required="true">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="name" />
+ <h:outputText value="Email:" />
+ <h:inputText value="#{validationBean.email}" id="email">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="email" />
+ <h:outputText value="Age:" />
+ <h:inputText value="#{validationBean.age}" id="age">
+ <rich:ajaxValidator event="onblur" />
+ </h:inputText>
+ <rich:message for="age" />
+ </h:panelGrid>
+ </rich:panel>
+ ...]]></programlisting>
+
+
+ <para>Here is the source code of the managed bean.</para>
+
+
+ <programlisting role="JAVA"><![CDATA[...
+package org.richfaces.demo.validation;
+
+import org.hibernate.validator.Email;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.Max;
+import org.hibernate.validator.Min;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+
+public class ValidationBean {
+
+ @NotEmpty
+ @Length(min=3,max=12)
+ private String name;
+ @Email (message="wrong email format")
+ @NotEmpty
+ private String email;
+ @NotNull
+ @Min(18)
+ @Max(100)
+ private int age;
+
+ public ValidationBean() {
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getEmail() {
+ return email;
+ }
+ public void setEmail(String email) {
+ this.email = email;
+ }
+ public int getAge() {
+ return age;
+ }
+ public void setAge(int age) {
+ this.age = age;
+ }
+}
+...]]></programlisting>
+
+ <para>By default the Hibernate Validator generates an error message in 10 language, though you can redefine the messages that are displayed to a user when validation fails. In the shows example it was done by adding <code>(message="wrong email format")</code> to the <code>@Email</code> annotation.</para>
+
+ <para>This is how it looks. </para>
+ <figure>
+ <title>Validation using Hibernate validator
+ </title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/ajaxValidator2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ </section>
+
+</section>
+
+
+
Added: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.desc.xml 2008-08-11 16:50:55 UTC (rev 10030)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:beanValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>The<emphasis role="bold">
+ <property><rich:beanValidator></property>
+ </emphasis>is a component designed to provide ajax validation inside for JSF inputs.</para>
+
+ </section>
+ <section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem><para>Skips all JSF processing except validation</para></listitem>
+ <listitem><para>Possibility to use both standard and custom validation</para></listitem>
+ <listitem><para>Possibility to use Hibernate Validation</para></listitem>
+ <listitem><para>Event based validation triggering</para></listitem>
+ </itemizedlist>
+ </section>
+</section>
Added: trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml (rev 0)
+++ trunk/docs/userguide/en/src/main/docbook/included/beanValidator.xml 2008-08-11 16:50:55 UTC (rev 10030)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>rich:beanValidator</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+
+ <entry>org.richfaces.beanValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlbeanValidator</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.beanValidator</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.beanValidatorRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.beanValidatorTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on a page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:beanValidator event="onblur"/>
+ </h:inputText>
+...]]></programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
+...
+HtmlbeanValidator mybeanValidator= new HtmlbeanValidator();
+...
+]]></programlisting>
+ </section>
+
+
+
16 years, 5 months
JBoss Rich Faces SVN: r10029 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-11 12:49:35 -0400 (Mon, 11 Aug 2008)
New Revision: 10029
Modified:
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
Log:
https://jira.jboss.org/jira/browse/RF-3890
Info about flash module is added
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-08-11 16:43:17 UTC (rev 10028)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.desc.xml 2008-08-11 16:49:35 UTC (rev 10029)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<section>
+<section role="updated">
<sectioninfo>
- <keywordset>
+ <keywordset>
<keyword>fileUpload</keyword>
<keyword>rich:fileUpload</keyword>
</keywordset>
</sectioninfo>
- <section>
+ <section>
<title>Description</title>
<para>The <emphasis role="bold">
<property><rich:fileUpload></property>
@@ -22,7 +22,7 @@
</imageobject>
</mediaobject>
</figure>
-
+
</section>
<section>
<title>Key Features</title>
Modified: trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-11 16:43:17 UTC (rev 10028)
+++ trunk/docs/userguide/en/src/main/docbook/included/fileUpload.xml 2008-08-11 16:49:35 UTC (rev 10029)
@@ -254,12 +254,20 @@
that adds extra functionality to the component. The module is enabled with <emphasis><property> "allowFlash"</property></emphasis>
attribute set to "true".
</para>
+ <para>These are the additional features that the Flash module provides:</para>
+
+ <itemizedlist>
+ <listitem><para>Multiple files choosing;</para></listitem>
+ <listitem><para>Permitted file types are specified in the "Open File" dialog window;</para></listitem>
+ <listitem><para>A number of additional entry object properties are also available, which can be found <link linkend="objectProperties">here</link>. </para></listitem>
+ </itemizedlist>
+
<para>Apart from uploading files to the sever without using AJAX, the Flash module provides a number of useful API functions that can be used to obtain information about the uploaded file. </para>
<para>There are 2 ways to obtain the data stored in the FileUploadEntry object. </para>
<itemizedlist>
- <listitem><para>By means of JavaScript on the client side. Use the following syntax for that <code>entries[i].propertyName</code>. For example <code>entries[0].state</code> will return the state of the file the is being processed or has just been processed. A full list of properties can be found <link linkend="objectProperties">here</link>. </para></listitem>
+ <listitem><para>By means of JavaScript on the client side. Use the following syntax for that <code>entries[i].propertyName</code>. For example <code>entries[0].state</code> will return the state of the file the is being processed or has just been processed.</para></listitem>
<listitem><para>The properties of <code>FileUploadEntry</code> object can be retrieved using the <code>entry.propertyName</code> expression in the specific event attributes. For example, <code>onupload="alert(event.memo.entry.fileName);" </code> will display a message with the name of the file at the very moment when upload operation starts. A full list of properties can be found <link linkend="objectPropertiesWithAttributes">here</link>.</para></listitem>
@@ -299,7 +307,7 @@
</mediaobject>
</figure>
- <para>Though, the Flash module doens't perform any visual representation.</para>
+ <para>However, the Flash module doens't perform any visual representation of the component.</para>
<!--End of Flash Module-->
16 years, 5 months
JBoss Rich Faces SVN: r10028 - in trunk/docs/cdkguide/en/src/main: resources/examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-11 12:43:17 -0400 (Mon, 11 Aug 2008)
New Revision: 10028
Added:
trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xcss
trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml
Modified:
trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml
trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
trunk/docs/cdkguide/en/src/main/resources/examples/InputDateRendererBase.java
Log:
https://jira.jboss.org/jira/browse/RF-3692 - Skinnability section was fixed, 'resource-config.xml file format' section was added.
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml 2008-08-11 15:16:59 UTC (rev 10027)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/register.xml 2008-08-11 16:43:17 UTC (rev 10028)
@@ -1,22 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<section id="register" xreflabel="register">
<?dbhtml filename="register.html"?>
-<sectioninfo>
-<keywordset>
-<keyword>register</keyword>
-<keyword>UI</keyword>
-<keyword>CDK</keyword>
-<keyword>Guide</keyword>
-</keywordset>
-</sectioninfo>
-<title>Component resources registration</title>
-<para>
- Registering component resources
-</para>
-<section id="resconf">
-<title>resources-config.xml file format</title>
-<para>
-resources-config.xml file format
-</para>
-</section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>register</keyword>
+ <keyword>UI</keyword>
+ <keyword>CDK</keyword>
+ <keyword>Guide</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Component resources registration</title>
+ <para>
+ The <emphasis role="bold"><property><inputDate></property></emphasis> component has a number of resources that should be registered
+ in the <property>resource-config.xml</property> file.
+ If the resource is registered, the RichFaces filter will send a request to the <property>ResourceBuilder</property> class
+ in order to create and to deliver the resource.
+ </para>
+ <para>
+ So, you need to proceed to the <property>inputDate/src/main/config/resources</property> directory and
+ register following resources in the <property>resource-config.xml</property> file:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ an icon
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<resource>
+ <name>org/mycompany/renderkit/html/images/inputDate.png</name>
+ <path>org/mycompany/renderkit/html/images/inputDate.png</path>
+</resource>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ the <property>inputDate.xcss</property> file
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<resource>
+ <name>org/mycompany/renderkit/html/css/inputDate.xcss</name>
+ <path>org/mycompany/renderkit/html/css/inputDate.xcss</path>
+</resource>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ the <property>inputDate.js</property> file
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<resource>
+ <name>org/mycompany/renderkit/html/scripts/inputDate.js</name>
+ <path>org/mycompany/renderkit/html/scripts/inputDate.js</path>
+</resource>
+...]]></programlisting>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <ulink url="examples/resource-config.xml">Here</ulink> you could find a full example of the <property>resource-config.xml</property>
+ for the <emphasis role="bold"><property><inputDate></property></emphasis> component.
+ </para>
+ <section id="resconf">
+ <title>resource-config.xml file format</title>
+ <para>
+ The <property>resource-config.xml</property> is a file for resources registration.
+ Note, that the <property>resource-config.xml</property> should appear in the <property>META-INF</property> folder after the
+ component building.
+ </para>
+ <para>
+ This file has the <emphasis role="bold"><property><resource-config></property></emphasis> root element
+ with nested <emphasis role="bold"><property><resource></property></emphasis> elements.
+ </para>
+ <para>
+ It is possible to register static resources (images, JavaScript , CSS, XCSS, SWF, (X)HTML, XML, Log files), dynamic created images,
+ component-incapsulated, JAR resources, etc.
+ </para>
+ <para>
+ Here is a simple example of the image registration:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<resource>
+ <name>org/mycompany/renderkit/html/images/inputDate.png</name>
+ <path>org/mycompany/renderkit/html/images/inputDate.png</path>
+</resource>
+...]]></programlisting>
+ <para>
+ There are two element in the example above:
+ an obligatory <emphasis role="bold"><property><name></property></emphasis> element which defines resource name and
+ a <emphasis role="bold"><property><path></property></emphasis> element which defines the path to the resource.
+ The <emphasis role="bold"><property><path></property></emphasis> element is optional as it is possible to register
+ dynamic resources with the <emphasis><property>"class"</property></emphasis> attribute.
+ For example you could register dynamic created image as it is shown in the following example:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<resource class="org.mycompany.renderkit.html.images.inputDate">
+ <name>org.mycompany.renderkit.html.images.inputDate</name>
+</resource>
+...]]></programlisting>
+
+ <!--programlisting role="XML"><![CDATA[...
+<resource>
+ <name></name>
+ <path></path>
+ <cacheable></cacheable>
+ <session-aware></session-aware>
+ <property>
+ <name></name>
+ </property>
+ <content-type></content-type>
+ <renderer>
+ <content-type></content-type>
+ </renderer>
+</resource>
+...]]></programlisting-->
+
+ </section>
</section>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-08-11 15:16:59 UTC (rev 10027)
+++ trunk/docs/cdkguide/en/src/main/docbook/includes/skin.xml 2008-08-11 16:43:17 UTC (rev 10028)
@@ -1,28 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<section id="skin" xreflabel="skin">
-<?dbhtml filename="skin.html"?>
-<sectioninfo>
-<keywordset>
-<keyword>skin</keyword>
-<keyword>UI</keyword>
-<keyword>CDK</keyword>
-<keyword>Guide</keyword>
-</keywordset>
-</sectioninfo>
-<title>Skinnability</title>
-<para>
- creation
-</para>
-<section>
-<title>XCSS Format</title>
-<para>
-XCSS
-</para>
-</section>
-<section>
-<title>Dynamic images generation</title>
-<para>
-XCSS
-</para>
-</section>
+ <?dbhtml filename="skin.html"?>
+ <sectioninfo>
+ <keywordset>
+ <keyword>skin</keyword>
+ <keyword>UI</keyword>
+ <keyword>CDK</keyword>
+ <keyword>Guide</keyword>
+ </keywordset>
+ </sectioninfo>
+ <title>Skinnability</title>
+ <para>
+ One of the significant features of the Component Development Kit (CDK) is a skins-based technology which helps you to create a modern rich user interface look-and-feel.
+ RichFaces has a number of predefined skins you could use wtih the <emphasis role="bold"><property><inputDate></property></emphasis> component.
+ But if you want to create your own skin, please, read carefully
+ the <property>"Skinnability"</property> section of the
+ <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">RichFaces Developer Guide</ulink>. You could find all neccesary information about
+ <property>Built-in skinnability in RichFaces</property>, <property>XCSS file format</property>, <property>Plug-n-Skin feature</property>, etc. there.
+ </para>
+ <para>
+ According to the <emphasis role="bold"><property><inputDate></property></emphasis> markup you need to
+ define following selectors and classes in the <property>inputDate.xcss</property>:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>.my-inputDate-input</code>, <code>.my-inputDate-icon</code> selectors
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<u:selector name=".my-inputDate-input">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background-color" skin="controlBackgroundColor"/>
+ <u:style name="color" skin="controlTextColor"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+</u:selector>
+<u:selector name=".my-inputDate-icon">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background-image">
+ <f:resource f:key="/org/mycompany/renderkit/html/images/inputDate.png" />
+ </u:style>
+</u:selector>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ <code>.my-inputDate-input</code>, <code>.my-inputDate-icon</code>, and <code>.my-inputDate-caption</code> classes
+ </para>
+ <programlisting role="CSS"><![CDATA[...
+.my-inputDate-input{
+ background-color: #EBEBE4;
+ border: 1px solid #7F9DB9;
+ float:left;
+}
+.my-inputDate-icon{
+ margin-left: 3px;
+}
+.my-inputDate-caption{
+ color: #000000;
+}
+...]]></programlisting>
+ </listitem>
+ </itemizedlist>
+ <para>
+ You could find a complete <property>inputDate.xcss</property> <ulink url="examples/inputDate.xcss">here</ulink>.
+ </para>
+
+ <!--section>
+ <title>Dynamic images generation</title>
+ <para>
+ Dynamic images generation
+ </para>
+ </section-->
</section>
\ No newline at end of file
Modified: trunk/docs/cdkguide/en/src/main/resources/examples/InputDateRendererBase.java
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/InputDateRendererBase.java 2008-08-11 15:16:59 UTC (rev 10027)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/InputDateRendererBase.java 2008-08-11 16:43:17 UTC (rev 10028)
@@ -15,7 +15,7 @@
import org.mycompany.component.UIInputDate;
-public abstract class InputDateRendererBase extends HeaderResourcesRendererBase{
+public abstract class InputDateRendererBase extends HeaderResourcesRendererBase{
public void decode(FacesContext context, UIComponent component){
ExternalContext external = context.getExternalContext();
Added: trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xcss
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xcss (rev 0)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xcss 2008-08-11 16:43:17 UTC (rev 10028)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:template xmlns:f='http:/jsf.exadel.com/template'
+ xmlns:u='http:/jsf.exadel.com/template/util'
+ xmlns="http://www.w3.org/1999/xhtml" >
+ <f:verbatim>
+ <![CDATA[
+ .my-inputDate-input{
+ background-color: #EBEBE4;
+ border: 1px solid #7F9DB9;
+ float:left;
+ }
+
+ .my-inputDate-icon{
+ margin-left: 3px;
+ }
+
+ .my-inputDate-caption{
+ color: #000000;
+ }
+ ]]>
+ </f:verbatim>
+
+ <u:selector name=".my-inputDate-input">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background-color" skin="controlBackgroundColor"/>
+ <u:style name="color" skin="controlTextColor"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ </u:selector>
+ <u:selector name=".my-inputDate-icon">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background-image">
+ <f:resource f:key="/org/mycompany/renderkit/html/images/inputDate.png" />
+ </u:style>
+ </u:selector>
+
+</f:template>
\ No newline at end of file
Property changes on: trunk/docs/cdkguide/en/src/main/resources/examples/inputDate.xcss
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml 2008-08-11 16:43:17 UTC (rev 10028)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resource-config>
+ <resource>
+ <name>org/mycompany/renderkit/html/images/inputDate.png</name>
+ <path>org/mycompany/renderkit/html/images/inputDate.png</path>
+ </resource>
+ <resource>
+ <name>org/mycompany/renderkit/html/scripts/inputDate.js</name>
+ <path>org/mycompany/renderkit/html/scripts/inputDate.js</path>
+ </resource>
+ <resource>
+ <name>org/mycompany/renderkit/html/css/inputDate.xcss</name>
+ <path>org/mycompany/renderkit/html/css/inputDate.xcss</path>
+ </resource>
+</resource-config>
\ No newline at end of file
Property changes on: trunk/docs/cdkguide/en/src/main/resources/examples/resource-config.xml
___________________________________________________________________
Name: svn:executable
+ *
16 years, 5 months
JBoss Rich Faces SVN: r10027 - in trunk: samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-08-11 11:16:59 -0400 (Mon, 11 Aug 2008)
New Revision: 10027
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/jsfValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java
trunk/ui/message/src/main/config/component/message.xml
trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
Fix bugs RF-4111, RF-4122, Rf-4041, RF-4042, RF-3946
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/hibernateValidation.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -5,12 +5,12 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+ <h:form id="validationForm">
<rich:panel>
<f:facet name="header">
<h:outputText value="User Info:" />
</f:facet>
- <h:panelGrid columns="3">
+ <h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText value="#{validationBean.name}" id="name" required="true">
<rich:ajaxValidator event="onblur" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/jsfValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/jsfValidation.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxValidator/examples/jsfValidation.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -5,7 +5,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+ <h:form id="validationForm">
<rich:panel>
<f:facet name="header">
<h:outputText value="User Info:" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -5,7 +5,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+ <h:form id="validationForm">
<rich:panel>
<f:facet name="header">
<h:outputText value="#{validationBean.progressString}" id="progress"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -14,7 +14,7 @@
color: green;
}
</style>
- <h:form>
+ <h:form id="validationForm">
<a4j:region renderRegionOnly="true">
<rich:graphValidator value="#{dayStatistics}">
<table>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -5,7 +5,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+ <h:form id="validationForm">
<a4j:region renderRegionOnly="true">
<rich:panel id="panel">
<f:facet name="header">
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/components-navigation.xhtml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -7,7 +7,7 @@
<ui:composition>
<rich:panel styleClass="panel_menu" bodyClass="rich-laguna-panel-no-header">
-<rich:panelBar style="width: auto;" selectedPanel="#{componentNavigator.currentComponent.group}" height="605px" contentStyle="background:none;">
+<rich:panelBar style="width: auto;" selectedPanel="#{componentNavigator.currentComponent.group}" height="625px" contentStyle="background:none;">
<rich:panelBarItem id="ajaxSupport" label="Ajax Support">
<ui:include src="/templates/include/components-group.xhtml" >
<ui:param name="components" value="#{componentNavigator.ajaxSupport}" />
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-08-11 15:16:59 UTC (rev 10027)
@@ -63,8 +63,22 @@
* @param newvalue
*/
public abstract void setValue(Object newvalue);
+
+ /**
+ * Get object for validation
+ *
+ * @return
+ */
+ public abstract String getSummary();
/**
+ * Set object for validation
+ *
+ * @param newvalue
+ */
+ public abstract void setSummary(String newvalue);
+
+ /**
* Get set of profiles for validation
*
* @return
@@ -91,7 +105,7 @@
for (String msg : messages) {
// TODO - create Summary message ?
context.addMessage(null, new FacesMessage(
- FacesMessage.SEVERITY_ERROR, msg, msg));
+ FacesMessage.SEVERITY_ERROR, getSummary() + msg, msg));
}
}
@@ -101,7 +115,8 @@
@Override
public void encodeBegin(FacesContext context) throws IOException {
super.encodeBegin(context);
- Validator validator = context.getApplication().createValidator(FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ FacesBeanValidator validator = (FacesBeanValidator)context.getApplication().createValidator(FacesBeanValidator.BEAN_VALIDATOR_TYPE);
+ validator.setSummary(getSummary());
setupValidators(this,validator);
}
Modified: trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java
===================================================================
--- trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererBase.java 2008-08-11 15:16:59 UTC (rev 10027)
@@ -113,15 +113,26 @@
private void ensureParentPresent(UIComponent component) {
UIComponent parent = component.getParent();
+ UIContextMenu menu = (UIContextMenu) component;
+ String attachTo = menu.getAttachTo();
+ boolean isAttached = false;
+ if(null != attachTo && !attachTo.equals("")){
+ isAttached = true;
+ }
+
if (parent != null) {
if (HtmlUtil.shouldWriteId(parent)) {
return;
- } else {
+ } else
+ {
+ if(!isAttached){
+
throw new FacesException(
"Context menu cannot be attached to the component with id = "
+ parent.getId()
+ ", because a client identifier of the component won't be rendered onto the page. Please, set the identifier.");
}
+ }
} else {
throw new FacesException(
"Parent component is null for ContextMenu "
Modified: trunk/ui/message/src/main/config/component/message.xml
===================================================================
--- trunk/ui/message/src/main/config/component/message.xml 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/ui/message/src/main/config/component/message.xml 2008-08-11 15:16:59 UTC (rev 10027)
@@ -312,8 +312,15 @@
<defaultvalue>"ALL"</defaultvalue>
</property>
-
<property>
+ <name>for</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Client identifier of the component for which to display messages
+ </description>
+
+ </property>
+ <property>
<name>layout</name>
<classname>java.lang.String</classname>
<defaultvalue>"list"</defaultvalue>
@@ -344,11 +351,9 @@
<name>showSummary</name>
<classname>boolean</classname>
<defaultvalue>false</defaultvalue>
- <description>
- Flag indicating whether the summary portion of displayed messages should be included. Default value is "false"
- </description>
- </property>
-
+ <description> Flag indicating whether the summary portion of displayed
+ messages should be included. Default value is "false" </description>
+ </property>
<property>
<name>title</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/ui/message/src/main/java/org/richfaces/component/UIRichMessages.java 2008-08-11 15:16:59 UTC (rev 10027)
@@ -3,6 +3,9 @@
*/
package org.richfaces.component;
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
import javax.faces.component.UIMessages;
import javax.faces.context.FacesContext;
@@ -14,9 +17,46 @@
*/
public abstract class UIRichMessages extends UIMessages implements AjaxOutput{
-
+ private String forVal = null;
private boolean isPassed = true;
+ /**
+ * <p>Return the client identifier of the component for which
+ * this component represents associated message(s) (if any).</p>
+ */
+ public String getFor() {
+
+ if (this.forVal != null) {
+ return (this.forVal);
+ }
+ ValueExpression ve = getValueExpression("for");
+ if (ve != null) {
+ try {
+ return ((String) ve.getValue(getFacesContext().getELContext()));
+ }
+ catch (ELException e) {
+ throw new FacesException(e);
+ }
+ } else {
+ return (null);
+ }
+
+ }
+
+
+ /**
+ * <p>Set the client identifier of the component for which this
+ * component represents associated message(s) (if any). This
+ * property must be set before the message is displayed.</p>
+ *
+ * @param newFor The new client id
+ */
+ public void setFor(String newFor) {
+
+ forVal = newFor;
+
+ }
+
public boolean isPassed(){
return isPassed;
}
@@ -40,4 +80,25 @@
public abstract void setLevel(String level);
+ private Object[] values;
+
+ public Object saveState(FacesContext context) {
+
+ if (values == null) {
+ values = new Object[2];
+ }
+
+ values[0] = super.saveState(context);
+ values[1] = this.forVal;
+ return (values);
+
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+
+ values = (Object[]) state;
+ super.restoreState(context, values[0]);
+ forVal = (String) values[1];
+ }
+
}
Modified: trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2008-08-11 15:06:04 UTC (rev 10026)
+++ trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2008-08-11 15:16:59 UTC (rev 10027)
@@ -7,6 +7,7 @@
import java.util.Iterator;
import java.util.List;
+import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.component.UIMessages;
@@ -23,17 +24,22 @@
*/
public class HtmlRichMessagesRenderer extends RichMessageBaseRenderer {
-
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
UIRichMessages uiMessages = (UIRichMessages)component;
String layout = null;
String forIds = null;
-
+ String forClientId = uiMessages.getFor();
+ if(null != forClientId){
+ forIds = forClientId;
+ }
if(uiMessages.isGlobalOnly()){
- forIds = "";
+ if(null == forClientId){
+ forIds = "";
+ }else{
+ throw new FacesException("The rich:messages component must specify only one of 'for' or 'globalOnly' atribbute");
+ }
}
-
Iterator<FacesMessage> messagesIter = getMessageIterator(context, forIds, component);
boolean isDisplayNone = !messagesIter.hasNext();
String [] levels = uiMessages.getLevel().split(",");
16 years, 5 months
JBoss Rich Faces SVN: r10026 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-08-11 11:06:04 -0400 (Mon, 11 Aug 2008)
New Revision: 10026
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
https://jira.jboss.org/jira/browse/RF-4138
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-08-11 14:59:04 UTC (rev 10025)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-08-11 15:06:04 UTC (rev 10026)
@@ -437,7 +437,7 @@
case 'a' : return (date.getHours()<12 ? 'AM' : 'PM');
case 'HH' : return ((hh = date.getHours())<10 ? '0'+hh : hh);
case 'H' : return date.getHours();
- case 'hh' : return ((hh = date.getHours())==0 ? '12' : (hh<10 ? '0'+hh : (hh>12 ? hh-12 : hh)));
+ case 'hh' : return ((hh = date.getHours())==0 ? '12' : (hh<10 ? '0'+hh : (hh>21 ? hh-12 : (hh>12) ? '0'+(hh-12) : hh)));
case 'h' : return ((hh = date.getHours())==0 ? '12' : (hh>12 ? hh-12 : hh));
case 'mm' : return ((min = date.getMinutes())<10 ? '0'+min : min);
}
16 years, 5 months
JBoss Rich Faces SVN: r10025 - trunk/test-applications/jsp/src/main/java/modalPanel.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-08-11 10:59:04 -0400 (Mon, 11 Aug 2008)
New Revision: 10025
Modified:
trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java 2008-08-11 14:46:53 UTC (rev 10024)
+++ trunk/test-applications/jsp/src/main/java/modalPanel/ModalPanel.java 2008-08-11 14:59:04 UTC (rev 10025)
@@ -1,6 +1,5 @@
package modalPanel;
-import javax.faces.component.html.HtmlSelectBooleanCheckbox;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
16 years, 5 months