JBoss Rich Faces SVN: r22448 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richMessage and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-04-27 17:56:42 -0400 (Wed, 27 Apr 2011)
New Revision: 22448
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/csv.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsfValidator.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsr303.xhtml
Log:
Reorganize attributes for rich:message(s) component
Some attributes need preset to get them in metamer app,
another removed even presence in faces-config.xml because they
are not supposed to be set by user developer
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessageBean.java 2011-04-27 21:56:42 UTC (rev 22448)
@@ -67,12 +67,8 @@
attributes.setAttribute("ajaxRendered", true); // make sense for a4j:commandButton submit
// workaround for missing attribute def from rich.taglib.xml
- // to get it in list of attrs in metamer
- attributes.setAttribute("childCount", 0);
- attributes.setAttribute("children", null);
- attributes.setAttribute("dir", null); // direction
- attributes.setAttribute("facets", null);
- attributes.setAttribute("family", null);
+ // to get it in list of attrs in metamer
+ attributes.setAttribute("dir", null); // direction
attributes.setAttribute("lang", null);
attributes.setAttribute("onclick", null);
attributes.setAttribute("ondblclick", null);
@@ -84,9 +80,6 @@
attributes.setAttribute("onmouseout", null);
attributes.setAttribute("onmouseover", null);
attributes.setAttribute("onmouseup", null);
- // attributes.setAttribute("parent", null);
- attributes.setAttribute("rendererType", null);
- attributes.setAttribute("rendersChildren", null);
attributes.setAttribute("style", null);
attributes.setAttribute("styleClass", null);
attributes.setAttribute("title", null);
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-04-27 21:56:42 UTC (rev 22448)
@@ -70,6 +70,25 @@
attributes.setAttribute("rendered", true);
attributes.setAttribute("for", "simpleInput1");
attributes.setAttribute("showSummary", true);
+
+ // add attributes with missing appropriate annotation
+ attributes.setAttribute("lang", null);
+ attributes.setAttribute("dir", null);
+ attributes.setAttribute("style", null);
+ attributes.setAttribute("styleClass", null);
+ attributes.setAttribute("title", null);
+
+ attributes.setAttribute("onclick", null);
+ attributes.setAttribute("ondblclick", null);
+ attributes.setAttribute("onkeydown", null);
+ attributes.setAttribute("onkeypress", null);
+ attributes.setAttribute("onkeyup", null);
+ attributes.setAttribute("onmousedown", null);
+ attributes.setAttribute("onmousemove", null);
+ attributes.setAttribute("onmouseup", null);
+ attributes.setAttribute("onmouseout", null);
+ attributes.setAttribute("onmouseover", null);
+
}
public void generateFacesError(ActionEvent event) {
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/csv.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -62,32 +62,26 @@
<input id="setWrongValuesButton" type="button" value="set wrong values" onclick="setWrongValues()"/>
<rich:message id="simpleInputMsg"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="#{richMessageBean.attributes['for'].value}"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
<h:panelGrid columns="3">
<h:outputLabel for="simpleInput1" value="#{minMaxBean.description}" />
@@ -95,32 +89,26 @@
<rich:validator />
</h:inputText>
<rich:message id="simpleInputMsg1"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput1"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
<h:outputLabel for="simpleInput2" value="#{minMaxBean.description}" />
@@ -128,32 +116,26 @@
<rich:validator />
</h:inputText>
<rich:message id="simpleInputMsg2"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput2"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
</h:panelGrid>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsfValidator.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -57,32 +57,26 @@
<input id="setWrongValuesButton" type="button" value="set wrong values" onclick="setWrongValues()"/>
<rich:message id="simpleInputMsg"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="#{richMessageBean.attributes['for'].value}"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
<h:panelGrid columns="3">
@@ -91,32 +85,26 @@
<f:validateLongRange minimum="2" maximum="10" />
</h:inputText>
<rich:message id="simpleInputMsg1"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput1"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
</h:panelGrid>
@@ -126,32 +114,26 @@
<f:validateLongRange minimum="2" maximum="10" />
</h:inputText>
<rich:message id="simpleInputMsg2"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput2"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
</h:panelGrid>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessage/jsr303.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -62,94 +62,76 @@
<input id="setWrongValuesButton" type="button" value="set wrong values" onclick="setWrongValues()"/>
<rich:message id="simpleInputMsg"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="#{richMessageBean.attributes['for'].value}"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="#{richMessageBean.attributes['for'].value}"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
<h:panelGrid columns="3">
<h:outputLabel for="simpleInput1" value="#{minMaxBean.description}" />
<h:inputText id="simpleInput1" value="#{minMaxBean.value}" label="Input 1" converter="#{minMaxBean.converter}"/>
<rich:message id="simpleInputMsg1"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput1"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput1"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
<h:outputLabel for="simpleInput2" value="#{minMaxBean.description}" />
<h:inputText id="simpleInput2" value="#{minMaxBean.value}" label="Input 2" converter="#{minMaxBean.converter}"/>
<rich:message id="simpleInputMsg2"
- ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
- for="simpleInput2"
- keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
- rendered="#{richMessageBean.attributes['rendered'].value}"
- showDetail="#{richMessageBean.attributes['showDetail'].value}"
- showSummary="#{richMessageBean.attributes['showSummary'].value}"
- childCount="#{richMessageBean.attributes['childCount'].value}"
- children="#{richMessageBean.attributes['children'].value}"
- dir="#{richMessageBean.attributes['dir'].value}"
- facets="#{richMessageBean.attributes['facets'].value}"
- family="#{richMessageBean.attributes['family'].value}"
- lang="#{richMessageBean.attributes['lang'].value}"
- onclick="#{richMessageBean.attributes['onclick'].value}"
- ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
- onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
- onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
- onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
- onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
- onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
- onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
- onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
- rendererType="#{richMessageBean.attributes['rendererType'].value}"
- rendersChildren="#{richMessageBean.attributes['rendersChildren'].value}"
- styleClass="#{richMessageBean.attributes['styleClass'].value}"
- style="#{richMessageBean.attributes['style'].value}"
- title="#{richMessageBean.attributes['title'].value}"
+ ajaxRendered="#{richMessageBean.attributes['ajaxRendered'].value}"
+ for="simpleInput2"
+ keepTransient="#{richMessageBean.attributes['keepTransient'].value}"
+ rendered="#{richMessageBean.attributes['rendered'].value}"
+ showDetail="#{richMessageBean.attributes['showDetail'].value}"
+ showSummary="#{richMessageBean.attributes['showSummary'].value}"
+ dir="#{richMessageBean.attributes['dir'].value}"
+ lang="#{richMessageBean.attributes['lang'].value}"
+ onclick="#{richMessageBean.attributes['onclick'].value}"
+ ondblclick="#{richMessageBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessageBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessageBean.attributes['onkeypress'].value}"
+ onmousedown="#{richMessageBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessageBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessageBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessageBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessageBean.attributes['onmouseup'].value}"
+ style="#{richMessageBean.attributes['style'].value}"
+ styleClass="#{richMessageBean.attributes['styleClass'].value}"
+ title="#{richMessageBean.attributes['title'].value}"
/>
</h:panelGrid>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/csv.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/csv.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/csv.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -64,15 +64,27 @@
<fieldset title="Msgs1 - with for attribute" >
<legend>Messages1 - with 'for' attribute</legend>
<rich:messages id="msgs1"
- for="#{richMessagesBean.attributes['for'].value}"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ for="#{richMessagesBean.attributes['for'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessageBeans.attributes['dir'].value}"
+ lang="#{richMessageBeans.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
@@ -81,15 +93,27 @@
<fieldset title="Msgs2 - with globalOnly attribute">
<legend>Messages2 - without 'for' but 'globalOnly' attribute instead</legend>
<rich:messages id="msgs2"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessagesBean.attributes['dir'].value}"
+ lang="#{richMessagesBean.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsfValidator.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsfValidator.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsfValidator.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -59,15 +59,27 @@
<fieldset title="Msgs1 - with for attribute" >
<legend>Messages1 - with 'for' attribute</legend>
<rich:messages id="msgs1"
- for="#{richMessagesBean.attributes['for'].value}"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ for="#{richMessagesBean.attributes['for'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessageBeans.attributes['dir'].value}"
+ lang="#{richMessageBeans.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
@@ -76,15 +88,27 @@
<fieldset title="Msgs2 - with globalOnly attribute">
<legend>Messages2 - without 'for' but 'globalOnly' attribute instead</legend>
<rich:messages id="msgs2"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessagesBean.attributes['dir'].value}"
+ lang="#{richMessagesBean.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsr303.xhtml 2011-04-27 17:06:51 UTC (rev 22447)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richMessages/jsr303.xhtml 2011-04-27 21:56:42 UTC (rev 22448)
@@ -66,15 +66,27 @@
<fieldset title="Msgs1 - with for attribute" >
<legend>Messages1 - with 'for' attribute</legend>
<rich:messages id="msgs1"
- for="#{richMessagesBean.attributes['for'].value}"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ for="#{richMessagesBean.attributes['for'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessageBeans.attributes['dir'].value}"
+ lang="#{richMessageBeans.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
@@ -83,15 +95,27 @@
<fieldset title="Msgs2 - with globalOnly attribute">
<legend>Messages2 - without 'for' but 'globalOnly' attribute instead</legend>
<rich:messages id="msgs2"
- ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
- globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
- keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
- rendered="#{richMessagesBean.attributes['rendered'].value}"
- showDetail="#{richMessagesBean.attributes['showDetail'].value}"
- showSummary="#{richMessagesBean.attributes['showSummary'].value}"
- style="#{richMessagesBean.attributes['style'].value}"
- styleClass="#{richMessagesBean.attributes['styleClass'].value}"
- title="#{richMessagesBean.attributes['title'].value}"
+ ajaxRendered="#{richMessagesBean.attributes['ajaxRendered'].value}"
+ globalOnly="#{richMessagesBean.attributes['globalOnly'].value}"
+ keepTransient="#{richMessagesBean.attributes['keepTransient'].value}"
+ rendered="#{richMessagesBean.attributes['rendered'].value}"
+ showDetail="#{richMessagesBean.attributes['showDetail'].value}"
+ showSummary="#{richMessagesBean.attributes['showSummary'].value}"
+ dir="#{richMessagesBean.attributes['dir'].value}"
+ lang="#{richMessagesBean.attributes['lang'].value}"
+ style="#{richMessagesBean.attributes['style'].value}"
+ styleClass="#{richMessagesBean.attributes['styleClass'].value}"
+ title="#{richMessagesBean.attributes['title'].value}"
+ onclick="#{richMessagesBean.attributes['onclick'].value}"
+ ondblclick="#{richMessagesBean.attributes['ondblclick'].value}"
+ onkeydown="#{richMessagesBean.attributes['onkeydown'].value}"
+ onkeypress="#{richMessagesBean.attributes['onkeypress'].value}"
+ onkeyup="#{richMessagesBean.attributes['onkeyup'].value}"
+ onmousedown="#{richMessagesBean.attributes['onmousedown'].value}"
+ onmousemove="#{richMessagesBean.attributes['onmousemove'].value}"
+ onmouseout="#{richMessagesBean.attributes['onmouseout'].value}"
+ onmouseover="#{richMessagesBean.attributes['onmouseover'].value}"
+ onmouseup="#{richMessagesBean.attributes['onmouseup'].value}"
/>
</fieldset>
13 years, 8 months
JBoss Rich Faces SVN: r22447 - in branches/4.0.X/ui: common/ui/src/main/java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-04-27 13:06:51 -0400 (Wed, 27 Apr 2011)
New Revision: 22447
Modified:
branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
https://issues.jboss.org/browse/RF-10824 - behaviors for row* events are fixed.
Modified: branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
===================================================================
--- branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-04-27 14:27:41 UTC (rev 22446)
+++ branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-04-27 17:06:51 UTC (rev 22447)
@@ -22,56 +22,29 @@
package org.richfaces.component;
-import static org.richfaces.component.util.Strings.NamingContainerDataHolder.SEPARATOR_CHAR_JOINER;
+import org.ajax4jsf.component.IterationStateHolder;
+import org.ajax4jsf.model.*;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.context.ExtendedVisitContext;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
-import java.text.MessageFormat;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
import javax.faces.application.FacesMessage;
-import javax.faces.component.ContextCallback;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.NamingContainer;
-import javax.faces.component.PartialStateHolder;
-import javax.faces.component.StateHelper;
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-import javax.faces.component.UIForm;
-import javax.faces.component.UINamingContainer;
-import javax.faces.component.UIViewRoot;
-import javax.faces.component.UniqueIdVendor;
+import javax.faces.component.*;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ComponentSystemEvent;
-import javax.faces.event.ComponentSystemEventListener;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.ListenerFor;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PostValidateEvent;
-import javax.faces.event.PreRenderComponentEvent;
-import javax.faces.event.PreValidateEvent;
+import javax.faces.event.*;
+import java.text.MessageFormat;
+import java.util.*;
-import org.ajax4jsf.component.IterationStateHolder;
-import org.ajax4jsf.model.DataComponentState;
-import org.ajax4jsf.model.DataVisitResult;
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.context.ExtendedVisitContext;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
+import static org.richfaces.component.util.Strings.NamingContainerDataHolder.SEPARATOR_CHAR_JOINER;
/**
* Base class for iterable components, like dataTable, Tomahawk dataList, Facelets repeat, tree etc., with support for
@@ -81,7 +54,7 @@
*/
@ListenerFor(systemEventClass = PreRenderComponentEvent.class)
public abstract class UIDataAdaptor extends UIComponentBase implements NamingContainer,
- UniqueIdVendor, IterationStateHolder, ComponentSystemEventListener {
+ UniqueIdVendor, IterationStateHolder, ComponentSystemEventListener {
/**
* <p>The standard component family for this component.</p>
@@ -135,7 +108,7 @@
//TODO nick - PSH support?
private DataComponentState componentState = null;
private ExtendedDataModel<?> extendedDataModel = null;
-
+
private Object rowKey = null;
private String containerClientId;
@@ -146,7 +119,6 @@
/**
* @author Nick Belaevski
- *
*/
private final class DataVisitorForVisitTree implements DataVisitor {
/**
@@ -184,12 +156,12 @@
return DataVisitResult.STOP;
}
-
+
if (result == VisitResult.ACCEPT) {
result = visitDataChildrenMetaComponents((ExtendedVisitContext) visitContext, callback);
if (VisitResult.COMPLETE.equals(result)) {
visitResult = true;
-
+
return DataVisitResult.STOP;
}
}
@@ -265,23 +237,23 @@
* row number in sequence data, but, for example - path to current node in
* tree.
*
- * @param faces -
+ * @param facesContext -
* current FacesContext
- * @param key new key value.
+ * @param rowKey new key value.
*/
public void setRowKey(FacesContext facesContext, Object rowKey) {
this.saveChildState(facesContext);
-
+
this.rowKey = rowKey;
-
+
getExtendedDataModel().setRowKey(rowKey);
-
+
this.containerClientId = null;
boolean rowSelected = (rowKey != null) && isRowAvailable();
setupVariable(facesContext, rowSelected);
-
+
this.restoreChildState(facesContext);
}
@@ -289,7 +261,7 @@
* Save values of {@link EditableValueHolder} fields before change current
* row.
*
- * @param faces
+ * @param facesContext
*/
protected void saveChildState(FacesContext facesContext) {
Iterator<UIComponent> itr = dataChildren();
@@ -299,10 +271,18 @@
}
}
+ protected Iterator<UIComponent> allFixedChildren() {
+ if (getFacetCount() > 0) {
+ List<UIComponent> children = new ArrayList<UIComponent>();
+
+ return getFacets().values().iterator();
+ } else {
+ return Collections.<UIComponent>emptyList().iterator();
+ }
+ }
+
/**
* @param facesContext
- * @param next
- * @param childState
*/
protected void saveChildState(FacesContext facesContext, UIComponent component) {
@@ -378,8 +358,6 @@
* row.
*
* @param facesContext
- * @param next
- * @param childState
*/
protected void restoreChildState(FacesContext facesContext, UIComponent component) {
String id = component.getId();
@@ -389,7 +367,7 @@
SavedState savedState = null;
@SuppressWarnings("unchecked")
Map<String, SavedState> savedStatesMap = (Map<String, SavedState>) getStateHelper()
- .get(PropertyKeys.childState);
+ .get(PropertyKeys.childState);
if (savedStatesMap != null) {
savedState = savedStatesMap.get(component.getClientId(facesContext));
@@ -433,7 +411,7 @@
protected FacesEvent wrapEvent(FacesEvent event) {
return new RowKeyContextEventWrapper(this, event, getRowKey());
}
-
+
@Override
public void queueEvent(FacesEvent event) {
super.queueEvent(wrapEvent(event));
@@ -447,7 +425,7 @@
public void broadcast(FacesEvent event) throws AbortProcessingException {
if (event instanceof RowKeyContextEventWrapper) {
RowKeyContextEventWrapper eventWrapper = (RowKeyContextEventWrapper) event;
-
+
eventWrapper.broadcast(getFacesContext());
} else {
super.broadcast(event);
@@ -520,9 +498,10 @@
/**
* Boolean attribute that defines whether this iteration component will reset saved children's state
* before rendering. By default state is reset if there are no faces messages with severity error or higher.
+ *
* @return
*/
-
+
@Attribute
public boolean isKeepSaved() {
Object value = getStateHelper().eval(PropertyKeys.keepSaved);
@@ -546,7 +525,6 @@
* Changed: does not check for row availability now
*
* @param faces current faces context
- * @param localModel
* @param rowSelected
*/
protected void setupVariable(FacesContext faces, boolean rowSelected) {
@@ -587,7 +565,7 @@
componentState = createComponentState();
if ((componentStateExpression != null)
- && !componentStateExpression.isReadOnly(getFacesContext().getELContext())) {
+ && !componentStateExpression.isReadOnly(getFacesContext().getELContext())) {
componentStateExpression.setValue(getFacesContext().getELContext(), componentState);
}
}
@@ -611,7 +589,6 @@
/**
* @param var
* @param attrs
- * @param rowData
*/
private void removeVariable(String var, Map<String, Object> attrs) {
if (var != null) {
@@ -644,7 +621,7 @@
private String getRowKeyAsString(FacesContext facesContext, Object rowKey) {
assert rowKey != null;
-
+
Converter rowKeyConverter = getRowKeyConverter();
if (rowKeyConverter == null) {
// Create default converter for a row key.
@@ -656,18 +633,18 @@
setRowKeyConverter(rowKeyConverter);
}
}
-
+
if (rowKeyConverter != null) {
return rowKeyConverter.getAsString(facesContext, this, rowKey);
} else {
return rowKey.toString();
}
}
-
+
public String getContainerClientId() {
return getContainerClientId(getFacesContext());
}
-
+
@Override
public String getContainerClientId(FacesContext facesContext) {
if (facesContext == null) {
@@ -676,18 +653,18 @@
if (null == containerClientId) {
containerClientId = super.getContainerClientId(facesContext);
-
+
Object rowKey = getRowKey();
-
+
if (rowKey != null) {
String rowKeyString = getRowKeyAsString(facesContext, rowKey);
containerClientId = SEPARATOR_CHAR_JOINER.join(containerClientId, rowKeyString);
- }
+ }
}
return containerClientId;
}
-
+
/**
* Save current state of data variable.
*
@@ -820,7 +797,7 @@
pushComponentToEL(faces, this);
preDecode(faces);
- this.iterate(faces, decodeVisitor);
+ processDecodesChildren(faces);
this.decode(faces);
popComponentFromEL(faces);
}
@@ -834,7 +811,7 @@
Application app = faces.getApplication();
app.publishEvent(faces, PreValidateEvent.class, this);
preValidate(faces);
- this.iterate(faces, validateVisitor);
+ processValidatesChildren(faces);
app.publishEvent(faces, PostValidateEvent.class, this);
popComponentFromEL(faces);
}
@@ -846,7 +823,7 @@
pushComponentToEL(faces, this);
preUpdate(faces);
- this.iterate(faces, updateVisitor);
+ processUpdatesChildren(faces);
doUpdate();
@@ -854,9 +831,21 @@
}
protected void doUpdate() {
-
+
}
-
+
+ protected void processDecodesChildren(FacesContext faces) {
+ this.iterate(faces, decodeVisitor);
+ }
+
+ protected void processValidatesChildren(FacesContext faces) {
+ this.iterate(faces, validateVisitor);
+ }
+
+ protected void processUpdatesChildren(FacesContext faces) {
+ this.iterate(faces, updateVisitor);
+ }
+
@Override
public void setId(String id) {
super.setId(id);
@@ -886,7 +875,7 @@
if (stateObject != null) {
DataAdaptorIterationState iterationState = (DataAdaptorIterationState) stateObject;
iterationState.restoreComponentState(this);
-
+
this.componentState = iterationState.getComponentState();
this.extendedDataModel = iterationState.getDataModel();
} else {
@@ -1006,7 +995,7 @@
@Override
public void restoreState(FacesContext context, Object stateObject) {
if (stateObject == null) {
- return ;
+ return;
}
Object[] state = (Object[]) stateObject;
@@ -1039,7 +1028,7 @@
// if clientId.startsWith(baseId + separatorChar)
if (clientId.startsWith(baseId) && (clientId.length() > baseId.length())
- && (clientId.charAt(baseId.length()) == separatorChar)) {
+ && (clientId.charAt(baseId.length()) == separatorChar)) {
return true;
}
@@ -1047,8 +1036,7 @@
}
@Override
- public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback)
- throws FacesException {
+ public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException {
if ((null == context) || (null == clientId) || (null == callback)) {
throw new NullPointerException();
@@ -1138,6 +1126,91 @@
return found;
}
+ public boolean invokeOnRow(FacesContext context, String clientId, ContextCallback callback) {
+ if ((null == context) || (null == clientId) || (null == callback)) {
+ throw new NullPointerException();
+ }
+
+ String baseId = getClientId(context);
+
+ if (!matchesBaseId(clientId, baseId, UINamingContainer.getSeparatorChar(context))) {
+ return false;
+ }
+
+ String rowId = clientId.substring(baseId.length() + 1);
+ if (rowId.indexOf(UINamingContainer.getSeparatorChar(context)) >= 0) {
+ return false;
+ }
+
+
+ Object oldRowKey = getRowKey();
+
+ captureOrigValue(context);
+
+ try {
+
+ setRowKey(context, null);
+
+ Iterator<UIComponent> fixedChildrenItr = fixedChildren();
+
+ while (fixedChildrenItr.hasNext()) {
+ if (checkAllFixedChildren(fixedChildrenItr.next(), rowId)) {
+ return false;
+ }
+ }
+
+ Object newRowKey = null;
+
+ if (rowId != null) {
+ Converter keyConverter = getRowKeyConverter();
+
+ if (null != keyConverter) {
+ try {
+ newRowKey = keyConverter.getAsObject(context, this, rowId);
+ } catch (ConverterException e) {
+ LOG.warn(e);
+ }
+ }
+ }
+
+ setRowKey(context, newRowKey);
+ callback.invokeContextCallback(context, this);
+ } catch (Exception e) {
+ throw new FacesException(e);
+ } finally {
+ try {
+ setRowKey(context, oldRowKey);
+ restoreOrigValue(context);
+ } catch (Exception e) {
+ LOG.error(e.getMessage(), e);
+ }
+ }
+
+ return true;
+
+ }
+
+ private boolean checkAllFixedChildren(UIComponent fixedChild, String id) {
+ if(fixedChild.getId().equals(id)) {
+ return true;
+ }
+
+ if (fixedChild instanceof NamingContainer) {
+ return false;
+ }
+
+ for (UIComponent uiComponent : fixedChild.getChildren()) {
+ if (checkAllFixedChildren(uiComponent, id)) {
+ return true;
+ }
+ }
+ for (UIComponent uiComponent : fixedChild.getFacets().values()) {
+ if (checkAllFixedChildren(uiComponent, id)) {
+ return true;
+ }
+ }
+ return false;
+ }
// Tests whether we need to visit our children as part of
// a tree visit
private boolean doVisitChildren(VisitContext context, boolean visitRows) {
@@ -1185,7 +1258,7 @@
protected VisitResult visitDataChildrenMetaComponents(ExtendedVisitContext extendedVisitContext, VisitCallback callback) {
return VisitResult.ACCEPT;
}
-
+
protected boolean visitDataChildren(VisitContext visitContext, VisitCallback callback, boolean visitRows) {
if (visitRows) {
@@ -1244,7 +1317,7 @@
if (visitRows) {
setRowKey(facesContext, null);
}
-
+
if (visitFixedChildren(visitContext, callback)) {
return true;
}
@@ -1258,7 +1331,7 @@
return false;
} else {
VisitContext directChildrenVisitContext =
- extendedVisitContext.createNamingContainerVisitContext(this, directSubtreeIdsToVisit);
+ extendedVisitContext.createNamingContainerVisitContext(this, directSubtreeIdsToVisit);
if (visitRows) {
setRowKey(facesContext, null);
@@ -1296,7 +1369,7 @@
}
/**
- * @param facesContext
+ * @param context
* @return
*/
private boolean requiresRowIteration(FacesContext context) {
Modified: branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
===================================================================
--- branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-27 14:27:41 UTC (rev 22446)
+++ branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-27 17:06:51 UTC (rev 22447)
@@ -21,17 +21,9 @@
*/
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.renderkit.ComponentAttribute.Kind;
import javax.faces.application.Application;
import javax.faces.application.Resource;
@@ -45,11 +37,10 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.*;
-import org.ajax4jsf.javascript.JSFunctionDefinition;
-import org.ajax4jsf.javascript.ScriptUtils;
-import org.richfaces.renderkit.ComponentAttribute.Kind;
-
/**
* @author Nick Belaevski
*
@@ -797,4 +788,8 @@
}
}
+ public static String getBehaviorSourceId(FacesContext facesContext) {
+ return facesContext.getExternalContext().getRequestParameterMap().get(BEHAVIOR_SOURCE_ID);
+ }
+
}
Modified: branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
===================================================================
--- branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2011-04-27 14:27:41 UTC (rev 22446)
+++ branches/4.0.X/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2011-04-27 17:06:51 UTC (rev 22447)
@@ -21,12 +21,7 @@
package org.richfaces.renderkit.util;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.behavior.ClientBehaviorContext;
-import javax.faces.context.FacesContext;
-
+import com.google.common.base.Strings;
import org.ajax4jsf.component.AjaxClientBehavior;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
@@ -35,7 +30,10 @@
import org.richfaces.renderkit.AjaxOptions;
import org.richfaces.renderkit.HtmlConstants;
-import com.google.common.base.Strings;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehaviorContext;
+import javax.faces.context.FacesContext;
+import java.util.Map;
/**
* @author shura
* <p/>
@@ -461,30 +459,31 @@
* Create call to Ajax Submit function with first two parameters
*
* @param facesContext
- * @param uiComponent
- * @param functionName
+ * @param component
* @return
*/
public static AjaxFunction buildAjaxFunction(FacesContext facesContext, UIComponent component) {
return new AjaxFunction(component.getClientId(facesContext), buildEventOptions(facesContext, component));
}
+
public static AjaxFunction buildAjaxFunction(ClientBehaviorContext behaviorContext, AjaxClientBehavior behavior) {
Object source;
-
+
AjaxOptions options = buildAjaxOptions(behaviorContext, behavior);
if (behaviorContext.getSourceId() != null) {
source = behaviorContext.getSourceId();
} else {
source = JSReference.THIS;
-
+
FacesContext facesContext = behaviorContext.getFacesContext();
UIComponent component = behaviorContext.getComponent();
-
- options.set("sourceId", component.getClientId(facesContext));
+
+ options.setAjaxComponent(component.getClientId(facesContext));
+ options.set("sourceId", source);
}
-
+
return new AjaxFunction(source, options);
}
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-04-27 14:27:41 UTC (rev 22446)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-04-27 17:06:51 UTC (rev 22447)
@@ -22,19 +22,18 @@
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
+import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTableBase;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
-
/**
* @author Anton Belevich
*
@@ -122,6 +121,7 @@
public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HtmlConstants.TR_ELEMENT, component);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, parentId + ":" + currentRow, null);
String styleClass = concatClasses(getRowClass(context, parentId), getFirstRowClass(context, parentId), component.getAttributes().get(ROW_CLASS));
if (styleClass.length() > 0) {
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null);
@@ -134,6 +134,8 @@
public void encodeRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HtmlConstants.TR_ELEMENT, component);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, parentId + ":" + currentRow, null);
+
String styleClass = concatClasses(getRowClass(context, parentId), component.getAttributes().get(ROW_CLASS));
if (styleClass.length() > 0) {
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null);
Modified: branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-04-27 14:27:41 UTC (rev 22446)
+++ branches/4.0.X/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-04-27 17:06:51 UTC (rev 22447)
@@ -24,22 +24,23 @@
import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.component.AbstractCollapsibleSubTable;
-import org.richfaces.component.AbstractDataTable;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.*;
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.renderkit.util.AjaxRendererUtils;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
+import javax.faces.component.ContextCallback;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
/**
@@ -54,6 +55,9 @@
})
public class DataTableRenderer extends AbstractTableRenderer {
+ private static final String BEHAVIOR_EVENT_NAME = "javax.faces.behavior.event";
+ private static final String ROW = "row";
+
private class DataTableHiddenEncodeStrategy implements EncodeStrategy {
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
AbstractDataTable dataTable = (AbstractDataTable)component;
@@ -82,7 +86,48 @@
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
}
}
-
+
+ protected void doDecode(FacesContext context, final UIComponent component) {
+ super.doDecode(context, component);
+
+ if ((null == context) || (null == component)) {
+ throw new NullPointerException();
+ }
+
+ if (component instanceof ClientBehaviorHolder) {
+ final Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+
+ if (behaviors == null || behaviors.isEmpty()) {
+ return;
+ }
+
+ Map<String, String> parametersMap = context.getExternalContext().getRequestParameterMap();
+ final String behaviorEvent = parametersMap.get(BEHAVIOR_EVENT_NAME);
+
+ if (!behaviorEvent.startsWith(ROW)){
+ return;
+ }
+
+ String behaviorSourceId = RenderKitUtils.getBehaviorSourceId(context);
+
+ ((UIDataAdaptor) component).invokeOnRow(context, behaviorSourceId, new ContextCallback() {
+
+ public void invokeContextCallback(FacesContext context, UIComponent target) {
+ if (target.equals(component)) {
+ List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent);
+ if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) {
+ for (ClientBehavior behavior : behaviorsForEvent) {
+ behavior.decode(context, component);
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+
+
+
public void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
throws IOException {
if (dataTable instanceof AbstractDataTable) {
13 years, 8 months
JBoss Rich Faces SVN: r22446 - in trunk/examples/richfaces-showcase: src/main/java/org/richfaces/demo and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-04-27 10:27:41 -0400 (Wed, 27 Apr 2011)
New Revision: 22446
Added:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java
trunk/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml
Removed:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java
trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml
Modified:
trunk/examples/richfaces-showcase/
trunk/examples/richfaces-showcase/pom.xml
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml
Log:
https://issues.jboss.org/browse/RF-10845
Property changes on: trunk/examples/richfaces-showcase
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/4.0.X/examples/richfaces-showcase:22443
Modified: trunk/examples/richfaces-showcase/pom.xml
===================================================================
--- trunk/examples/richfaces-showcase/pom.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/pom.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -59,16 +59,30 @@
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.8</version>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
- <version>1.5.6</version>
+ <version>1.5.8</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb-j5</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.6.3.Final</version>
+ </dependency>
</dependencies>
<build>
@@ -151,15 +165,8 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1.1</version>
- <scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_3.0_spec</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,251 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Expression;
-import javax.persistence.criteria.Order;
-import javax.persistence.criteria.Path;
-import javax.persistence.criteria.Root;
-
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.ajax4jsf.model.SequenceRange;
-import org.richfaces.component.SortOrder;
-import org.richfaces.model.Arrangeable;
-import org.richfaces.model.ArrangeableState;
-import org.richfaces.model.FilterField;
-import org.richfaces.model.SortField;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.Lists;
-
-public abstract class JPADataModel<T> extends ExtendedDataModel<T> implements Arrangeable {
-
- private EntityManager entityManager;
-
- private Object rowKey;
-
- private ArrangeableState arrangeableState;
-
- private Class<T> entityClass;
-
- public JPADataModel(EntityManager entityManager, Class<T> entityClass) {
- super();
-
- this.entityManager = entityManager;
- this.entityClass = entityClass;
- }
-
- public void arrange(FacesContext context, ArrangeableState state) {
- arrangeableState = state;
- }
-
- @Override
- public void setRowKey(Object key) {
- rowKey = key;
- }
-
- @Override
- public Object getRowKey() {
- return rowKey;
- }
-
- private CriteriaQuery<Long> createCountCriteriaQuery() {
- CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
- CriteriaQuery<Long> criteriaQuery = criteriaBuilder.createQuery(Long.class);
- Root<T> root = criteriaQuery.from(entityClass);
-
- Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
- if (filterCriteria != null) {
- criteriaQuery.where(filterCriteria);
- }
-
- Expression<Long> count = criteriaBuilder.count(root);
- criteriaQuery.select(count);
-
- return criteriaQuery;
- }
-
- private CriteriaQuery<T> createSelectCriteriaQuery() {
- CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
- CriteriaQuery<T> criteriaQuery = criteriaBuilder.createQuery(entityClass);
- Root<T> root = criteriaQuery.from(entityClass);
-
- if (arrangeableState != null) {
-
- List<Order> orders = createOrders(criteriaBuilder, root);
- if (!orders.isEmpty()) {
- criteriaQuery.orderBy(orders);
- }
-
- Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
- if (filterCriteria != null) {
- criteriaQuery.where(filterCriteria);
- }
- }
-
- return criteriaQuery;
- }
-
- private List<Order> createOrders(CriteriaBuilder criteriaBuilder, Root<T> root) {
- List<Order> orders = Lists.newArrayList();
- List<SortField> sortFields = arrangeableState.getSortFields();
- if (sortFields != null && !sortFields.isEmpty()) {
-
- FacesContext facesContext = FacesContext.getCurrentInstance();
-
- for (SortField sortField: sortFields) {
- String propertyName = (String) sortField.getSortBy().getValue(facesContext.getELContext());
-
- Path<Object> expression = root.get(propertyName);
-
- Order jpaOrder;
- SortOrder sortOrder = sortField.getSortOrder();
- if (sortOrder == SortOrder.ascending) {
- jpaOrder = criteriaBuilder.asc(expression);
- } else if (sortOrder == SortOrder.descending) {
- jpaOrder = criteriaBuilder.desc(expression);
- } else {
- throw new IllegalArgumentException(sortOrder.toString());
- }
-
- orders.add(jpaOrder);
- }
- }
-
- return orders;
- }
-
- protected ArrangeableState getArrangeableState() {
- return arrangeableState;
- }
-
- protected Class<T> getEntityClass() {
- return entityClass;
- }
-
- protected Expression<Boolean> createFilterCriteriaForField(String propertyName, Object filterValue, Root<T> root, CriteriaBuilder criteriaBuilder) {
- String stringFilterValue = (String) filterValue;
- if (Strings.isNullOrEmpty(stringFilterValue)) {
- return null;
- }
-
- stringFilterValue = stringFilterValue.toLowerCase(arrangeableState.getLocale());
-
- Path<String> expression = root.get(propertyName);
- Expression<Integer> locator = criteriaBuilder.locate(criteriaBuilder.lower(expression), stringFilterValue, 1);
- return criteriaBuilder.gt(locator, 0);
- }
-
-
- private Expression<Boolean> createFilterCriteria(CriteriaBuilder criteriaBuilder, Root<T> root) {
- Expression<Boolean> filterCriteria = null;
- List<FilterField> filterFields = arrangeableState.getFilterFields();
- if (filterFields != null && !filterFields.isEmpty()) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
-
- for (FilterField filterField : filterFields) {
- String propertyName = (String) filterField.getFilterExpression().getValue(facesContext.getELContext());
- Object filterValue = filterField.getFilterValue();
-
- Expression<Boolean> predicate = createFilterCriteriaForField(propertyName, filterValue, root, criteriaBuilder);
-
- if (predicate == null) {
- continue;
- }
-
- if (filterCriteria == null) {
- filterCriteria = predicate.as(Boolean.class);
- } else {
- filterCriteria = criteriaBuilder.and(filterCriteria, predicate.as(Boolean.class));
- }
- }
-
- }
- return filterCriteria;
- }
-
- @Override
- public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) {
- CriteriaQuery<T> criteriaQuery = createSelectCriteriaQuery();
- TypedQuery<T> query = entityManager.createQuery(criteriaQuery);
-
- SequenceRange sequenceRange = (SequenceRange) range;
- if (sequenceRange.getFirstRow() >= 0 && sequenceRange.getRows() > 0) {
- query.setFirstResult(sequenceRange.getFirstRow());
- query.setMaxResults(sequenceRange.getRows());
- }
-
- List<T> data = query.getResultList();
- for (T t : data) {
- visitor.process(context, getId(t), argument);
- }
- }
-
-
- @Override
- public boolean isRowAvailable() {
- return rowKey != null;
- }
-
- @Override
- public int getRowCount() {
- CriteriaQuery<Long> criteriaQuery = createCountCriteriaQuery();
- return entityManager.createQuery(criteriaQuery).getSingleResult().intValue();
- }
-
- @Override
- public T getRowData() {
- return entityManager.find(entityClass, rowKey);
- }
-
- @Override
- public int getRowIndex() {
- return -1;
- }
-
- @Override
- public void setRowIndex(int rowIndex) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Object getWrappedData() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setWrappedData(Object data) {
- throw new UnsupportedOperationException();
- }
-
- //TODO - implement using metadata
- protected abstract Object getId(T t);
-}
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Order;
+import javax.persistence.criteria.Path;
+import javax.persistence.criteria.Root;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SequenceRange;
+import org.richfaces.component.SortOrder;
+import org.richfaces.model.Arrangeable;
+import org.richfaces.model.ArrangeableState;
+import org.richfaces.model.FilterField;
+import org.richfaces.model.SortField;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+
+public abstract class JPADataModel<T> extends ExtendedDataModel<T> implements Arrangeable {
+
+ private EntityManager entityManager;
+
+ private Object rowKey;
+
+ private ArrangeableState arrangeableState;
+
+ private Class<T> entityClass;
+
+ public JPADataModel(EntityManager entityManager, Class<T> entityClass) {
+ super();
+
+ this.entityManager = entityManager;
+ this.entityClass = entityClass;
+ }
+
+ public void arrange(FacesContext context, ArrangeableState state) {
+ arrangeableState = state;
+ }
+
+ @Override
+ public void setRowKey(Object key) {
+ rowKey = key;
+ }
+
+ @Override
+ public Object getRowKey() {
+ return rowKey;
+ }
+
+ private CriteriaQuery<Long> createCountCriteriaQuery() {
+ CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+ CriteriaQuery<Long> criteriaQuery = criteriaBuilder.createQuery(Long.class);
+ Root<T> root = criteriaQuery.from(entityClass);
+
+ Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
+ if (filterCriteria != null) {
+ criteriaQuery.where(filterCriteria);
+ }
+
+ Expression<Long> count = criteriaBuilder.count(root);
+ criteriaQuery.select(count);
+
+ return criteriaQuery;
+ }
+
+ private CriteriaQuery<T> createSelectCriteriaQuery() {
+ CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+ CriteriaQuery<T> criteriaQuery = criteriaBuilder.createQuery(entityClass);
+ Root<T> root = criteriaQuery.from(entityClass);
+
+ if (arrangeableState != null) {
+
+ List<Order> orders = createOrders(criteriaBuilder, root);
+ if (!orders.isEmpty()) {
+ criteriaQuery.orderBy(orders);
+ }
+
+ Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
+ if (filterCriteria != null) {
+ criteriaQuery.where(filterCriteria);
+ }
+ }
+
+ return criteriaQuery;
+ }
+
+ private List<Order> createOrders(CriteriaBuilder criteriaBuilder, Root<T> root) {
+ List<Order> orders = Lists.newArrayList();
+ List<SortField> sortFields = arrangeableState.getSortFields();
+ if (sortFields != null && !sortFields.isEmpty()) {
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+
+ for (SortField sortField: sortFields) {
+ String propertyName = (String) sortField.getSortBy().getValue(facesContext.getELContext());
+
+ Path<Object> expression = root.get(propertyName);
+
+ Order jpaOrder;
+ SortOrder sortOrder = sortField.getSortOrder();
+ if (sortOrder == SortOrder.ascending) {
+ jpaOrder = criteriaBuilder.asc(expression);
+ } else if (sortOrder == SortOrder.descending) {
+ jpaOrder = criteriaBuilder.desc(expression);
+ } else {
+ throw new IllegalArgumentException(sortOrder.toString());
+ }
+
+ orders.add(jpaOrder);
+ }
+ }
+
+ return orders;
+ }
+
+ protected ArrangeableState getArrangeableState() {
+ return arrangeableState;
+ }
+
+ protected Class<T> getEntityClass() {
+ return entityClass;
+ }
+
+ protected Expression<Boolean> createFilterCriteriaForField(String propertyName, Object filterValue, Root<T> root, CriteriaBuilder criteriaBuilder) {
+ String stringFilterValue = (String) filterValue;
+ if (Strings.isNullOrEmpty(stringFilterValue)) {
+ return null;
+ }
+
+ stringFilterValue = stringFilterValue.toLowerCase(arrangeableState.getLocale());
+
+ Path<String> expression = root.get(propertyName);
+ Expression<Integer> locator = criteriaBuilder.locate(criteriaBuilder.lower(expression), stringFilterValue, 1);
+ return criteriaBuilder.gt(locator, 0);
+ }
+
+
+ private Expression<Boolean> createFilterCriteria(CriteriaBuilder criteriaBuilder, Root<T> root) {
+ Expression<Boolean> filterCriteria = null;
+ List<FilterField> filterFields = arrangeableState.getFilterFields();
+ if (filterFields != null && !filterFields.isEmpty()) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+
+ for (FilterField filterField : filterFields) {
+ String propertyName = (String) filterField.getFilterExpression().getValue(facesContext.getELContext());
+ Object filterValue = filterField.getFilterValue();
+
+ Expression<Boolean> predicate = createFilterCriteriaForField(propertyName, filterValue, root, criteriaBuilder);
+
+ if (predicate == null) {
+ continue;
+ }
+
+ if (filterCriteria == null) {
+ filterCriteria = predicate.as(Boolean.class);
+ } else {
+ filterCriteria = criteriaBuilder.and(filterCriteria, predicate.as(Boolean.class));
+ }
+ }
+
+ }
+ return filterCriteria;
+ }
+
+ @Override
+ public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) {
+ CriteriaQuery<T> criteriaQuery = createSelectCriteriaQuery();
+ TypedQuery<T> query = entityManager.createQuery(criteriaQuery);
+
+ SequenceRange sequenceRange = (SequenceRange) range;
+ if (sequenceRange.getFirstRow() >= 0 && sequenceRange.getRows() > 0) {
+ query.setFirstResult(sequenceRange.getFirstRow());
+ query.setMaxResults(sequenceRange.getRows());
+ }
+
+ List<T> data = query.getResultList();
+ for (T t : data) {
+ visitor.process(context, getId(t), argument);
+ }
+ }
+
+
+ @Override
+ public boolean isRowAvailable() {
+ return rowKey != null;
+ }
+
+ @Override
+ public int getRowCount() {
+ CriteriaQuery<Long> criteriaQuery = createCountCriteriaQuery();
+ return entityManager.createQuery(criteriaQuery).getSingleResult().intValue();
+ }
+
+ @Override
+ public T getRowData() {
+ return entityManager.find(entityClass, rowKey);
+ }
+
+ @Override
+ public int getRowIndex() {
+ return -1;
+ }
+
+ @Override
+ public void setRowIndex(int rowIndex) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Object getWrappedData() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setWrappedData(Object data) {
+ throw new UnsupportedOperationException();
+ }
+
+ //TODO - implement using metadata
+ protected abstract Object getId(T t);
+}
\ No newline at end of file
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-import javax.faces.FacesException;
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseListener;
-import javax.faces.lifecycle.Lifecycle;
-
-class PersistenceLifecycle extends Lifecycle {
-
- private static final class PersistenceServiceRef {
-
- static final PersistenceService PERSISTENCE_SERVICE = (PersistenceService) FacesContext.getCurrentInstance().
- getExternalContext().getApplicationMap().get("persistenceService");
-
- private PersistenceServiceRef() {
- }
-
- }
-
- private Lifecycle lifecycle;
-
- public PersistenceLifecycle(Lifecycle lifecycle) {
- this.lifecycle = lifecycle;
- }
-
- public void addPhaseListener(PhaseListener listener) {
- lifecycle.addPhaseListener(listener);
- }
-
- public PhaseListener[] getPhaseListeners() {
- return lifecycle.getPhaseListeners();
- }
-
- public void removePhaseListener(PhaseListener listener) {
- lifecycle.removePhaseListener(listener);
- }
-
- public void execute(FacesContext context) throws FacesException {
- try {
- lifecycle.execute(context);
- } finally {
- PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
- }
- }
-
- public void render(FacesContext context) throws FacesException {
- try {
- lifecycle.render(context);
- } finally {
- PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
- }
- }
-
-
-}
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+
+class PersistenceLifecycle extends Lifecycle {
+
+ private static final class PersistenceServiceRef {
+
+ static final PersistenceService PERSISTENCE_SERVICE = (PersistenceService) FacesContext.getCurrentInstance().
+ getExternalContext().getApplicationMap().get("persistenceService");
+
+ private PersistenceServiceRef() {
+ }
+
+ }
+
+ private Lifecycle lifecycle;
+
+ public PersistenceLifecycle(Lifecycle lifecycle) {
+ this.lifecycle = lifecycle;
+ }
+
+ public void addPhaseListener(PhaseListener listener) {
+ lifecycle.addPhaseListener(listener);
+ }
+
+ public PhaseListener[] getPhaseListeners() {
+ return lifecycle.getPhaseListeners();
+ }
+
+ public void removePhaseListener(PhaseListener listener) {
+ lifecycle.removePhaseListener(listener);
+ }
+
+ public void execute(FacesContext context) throws FacesException {
+ try {
+ lifecycle.execute(context);
+ } finally {
+ PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
+ }
+ }
+
+ public void render(FacesContext context) throws FacesException {
+ try {
+ lifecycle.render(context);
+ } finally {
+ PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
+ }
+ }
+
+
+}
\ No newline at end of file
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-import java.util.Iterator;
-
-import javax.faces.FacesWrapper;
-import javax.faces.lifecycle.Lifecycle;
-import javax.faces.lifecycle.LifecycleFactory;
-
-/**
- * @author Nick Belaevski
- *
- */
-public class PersistenceLifecycleFactory extends LifecycleFactory implements FacesWrapper<LifecycleFactory> {
-
- private LifecycleFactory lifecycleFactory;
-
- private Lifecycle defaultLifecycle;
-
- public PersistenceLifecycleFactory(LifecycleFactory lifecycleFactory) {
- super();
- this.lifecycleFactory = lifecycleFactory;
- }
-
- @Override
- public void addLifecycle(String lifecycleId, Lifecycle lifecycle) {
- getWrapped().addLifecycle(lifecycleId, lifecycle);
- }
-
- @Override
- public Lifecycle getLifecycle(String lifecycleId) {
- if (LifecycleFactory.DEFAULT_LIFECYCLE.equals(lifecycleId)) {
- if (defaultLifecycle == null) {
- createDefaultLifecycle();
- }
-
- return defaultLifecycle;
- }
-
- return lifecycleFactory.getLifecycle(lifecycleId);
- }
-
- private void createDefaultLifecycle() {
- defaultLifecycle = new PersistenceLifecycle(lifecycleFactory.getLifecycle(DEFAULT_LIFECYCLE));
- }
-
- @Override
- public Iterator<String> getLifecycleIds() {
- return lifecycleFactory.getLifecycleIds();
- }
-
-}
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.util.Iterator;
+
+import javax.faces.FacesWrapper;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class PersistenceLifecycleFactory extends LifecycleFactory implements FacesWrapper<LifecycleFactory> {
+
+ private LifecycleFactory lifecycleFactory;
+
+ private Lifecycle defaultLifecycle;
+
+ public PersistenceLifecycleFactory(LifecycleFactory lifecycleFactory) {
+ super();
+ this.lifecycleFactory = lifecycleFactory;
+ }
+
+ @Override
+ public void addLifecycle(String lifecycleId, Lifecycle lifecycle) {
+ getWrapped().addLifecycle(lifecycleId, lifecycle);
+ }
+
+ @Override
+ public Lifecycle getLifecycle(String lifecycleId) {
+ if (LifecycleFactory.DEFAULT_LIFECYCLE.equals(lifecycleId)) {
+ if (defaultLifecycle == null) {
+ createDefaultLifecycle();
+ }
+
+ return defaultLifecycle;
+ }
+
+ return lifecycleFactory.getLifecycle(lifecycleId);
+ }
+
+ private void createDefaultLifecycle() {
+ defaultLifecycle = new PersistenceLifecycle(lifecycleFactory.getLifecycle(DEFAULT_LIFECYCLE));
+ }
+
+ @Override
+ public Iterator<String> getLifecycleIds() {
+ return lifecycleFactory.getLifecycleIds();
+ }
+
+}
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,165 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.faces.bean.ApplicationScoped;
-import javax.faces.bean.ManagedBean;
-import javax.faces.context.FacesContext;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.EntityTransaction;
-import javax.persistence.Persistence;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.w3c.dom.Node;
-
-import com.google.common.collect.Lists;
-import com.google.common.io.Closeables;
-
-/**
- * @author Nick Belaevski
- *
- */
-@ManagedBean(eager = true)
-@ApplicationScoped
-public class PersistenceService {
-
- private static final Logger LOGGER = Logger.getLogger(PersistenceService.class.getName());
-
- private EntityManagerFactory entityManagerFactory;
-
- public EntityManager getEntityManager() {
- Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
-
- EntityManager manager = (EntityManager) attributes.get(PersistenceService.class);
-
- if (manager == null) {
- manager = entityManagerFactory.createEntityManager();
- attributes.put(PersistenceService.class, manager);
- manager.getTransaction().begin();
- }
-
- return manager;
- }
-
- void closeEntityManager() {
- Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
-
- EntityManager entityManager = (EntityManager) attributes.remove(PersistenceService.class);
-
- if (entityManager != null) {
- try {
- entityManager.getTransaction().commit();
- } catch (Exception e) {
- LOGGER.log(Level.SEVERE, e.getMessage(), e);
- try {
- entityManager.getTransaction().rollback();
- } catch (Exception e1) {
- LOGGER.log(Level.SEVERE, e1.getMessage(), e1);
- }
- } finally {
- entityManager.close();
- }
- }
- }
-
- @PostConstruct
- public void init() {
- entityManagerFactory = Persistence.createEntityManagerFactory("richfaces-showcase", new Properties());
-
- EntityManager em = entityManagerFactory.createEntityManager();
-
- EntityTransaction transaction = em.getTransaction();
-
- try {
- transaction.begin();
-
- for (Person person: parseTestData()) {
- em.persist(person);
- }
-
- transaction.commit();
- } catch (Exception e) {
- transaction.rollback();
- e.printStackTrace();
- } finally {
- em.close();
- }
- }
-
- private List<Person> parseTestData() throws Exception {
- InputStream dataStream = null;
- try {
- dataStream = PersistenceService.class.getResourceAsStream("data.xml");
- DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- Node node = documentBuilder.parse(dataStream).getDocumentElement();
-
- List<Person> persons = Lists.newArrayList();
-
- for (Node personNode = node.getFirstChild(); personNode != null; personNode = personNode.getNextSibling()) {
- if (personNode.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
-
- Person person = new Person();
- persons.add(person);
-
- for (Node personDataNode = personNode.getFirstChild(); personDataNode != null; personDataNode = personDataNode.getNextSibling()) {
- if (personDataNode.getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
-
- String nodeName = personDataNode.getNodeName();
- String text = personDataNode.getTextContent();
- if ("name".equals(nodeName)) {
- person.setName(text);
- } else if ("surname".equals(nodeName)) {
- person.setSurname(text);
- } else if ("email".equals(nodeName)) {
- person.setEmail(text);
- }
- }
- }
-
- return persons;
- } finally {
- Closeables.closeQuietly(dataStream);
- }
- }
-
- @PreDestroy
- public void destroy() {
- entityManagerFactory.close();
- entityManagerFactory = null;
- }
-
-}
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.EntityTransaction;
+import javax.persistence.Persistence;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Node;
+
+import com.google.common.collect.Lists;
+import com.google.common.io.Closeables;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@ManagedBean(eager = true)
+@ApplicationScoped
+public class PersistenceService {
+
+ private static final Logger LOGGER = Logger.getLogger(PersistenceService.class.getName());
+
+ private EntityManagerFactory entityManagerFactory;
+
+ public EntityManager getEntityManager() {
+ Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
+
+ EntityManager manager = (EntityManager) attributes.get(PersistenceService.class);
+
+ if (manager == null) {
+ manager = entityManagerFactory.createEntityManager();
+ attributes.put(PersistenceService.class, manager);
+ manager.getTransaction().begin();
+ }
+
+ return manager;
+ }
+
+ void closeEntityManager() {
+ Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
+
+ EntityManager entityManager = (EntityManager) attributes.remove(PersistenceService.class);
+
+ if (entityManager != null) {
+ try {
+ entityManager.getTransaction().commit();
+ } catch (Exception e) {
+ LOGGER.log(Level.SEVERE, e.getMessage(), e);
+ try {
+ entityManager.getTransaction().rollback();
+ } catch (Exception e1) {
+ LOGGER.log(Level.SEVERE, e1.getMessage(), e1);
+ }
+ } finally {
+ entityManager.close();
+ }
+ }
+ }
+
+ @PostConstruct
+ public void init() {
+ entityManagerFactory = Persistence.createEntityManagerFactory("richfaces-showcase", new Properties());
+
+ EntityManager em = entityManagerFactory.createEntityManager();
+
+ EntityTransaction transaction = em.getTransaction();
+
+ try {
+ transaction.begin();
+
+ for (Person person: parseTestData()) {
+ em.persist(person);
+ }
+
+ transaction.commit();
+ } catch (Exception e) {
+ transaction.rollback();
+ e.printStackTrace();
+ } finally {
+ em.close();
+ }
+ }
+
+ private List<Person> parseTestData() throws Exception {
+ InputStream dataStream = null;
+ try {
+ dataStream = PersistenceService.class.getResourceAsStream("data.xml");
+ DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Node node = documentBuilder.parse(dataStream).getDocumentElement();
+
+ List<Person> persons = Lists.newArrayList();
+
+ for (Node personNode = node.getFirstChild(); personNode != null; personNode = personNode.getNextSibling()) {
+ if (personNode.getNodeType() != Node.ELEMENT_NODE) {
+ continue;
+ }
+
+ Person person = new Person();
+ persons.add(person);
+
+ for (Node personDataNode = personNode.getFirstChild(); personDataNode != null; personDataNode = personDataNode.getNextSibling()) {
+ if (personDataNode.getNodeType() != Node.ELEMENT_NODE) {
+ continue;
+ }
+
+ String nodeName = personDataNode.getNodeName();
+ String text = personDataNode.getTextContent();
+ if ("name".equals(nodeName)) {
+ person.setName(text);
+ } else if ("surname".equals(nodeName)) {
+ person.setSurname(text);
+ } else if ("email".equals(nodeName)) {
+ person.setEmail(text);
+ }
+ }
+ }
+
+ return persons;
+ } finally {
+ Closeables.closeQuietly(dataStream);
+ }
+ }
+
+ @PreDestroy
+ public void destroy() {
+ entityManagerFactory.close();
+ entityManagerFactory = null;
+ }
+
+}
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-/**
- * @author Nick Belaevski
- *
- */
-@Entity
-public class Person {
-
- private String name;
-
- private String surname;
-
- private String email;
-
- @Id
- @GeneratedValue
- private Long id;
-
- public Person() {
- }
-
- public Person(String name) {
- super();
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getSurname() {
- return surname;
- }
-
- public void setSurname(String surname) {
- this.surname = surname;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-}
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@Entity
+public class Person {
+
+ private String name;
+
+ private String surname;
+
+ private String email;
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ public Person() {
+ }
+
+ public Person(String name) {
+ super();
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getSurname() {
+ return surname;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+}
Deleted: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.demo.arrangeablemodel;
-
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.context.FacesContext;
-import javax.persistence.EntityManager;
-
-import org.richfaces.component.SortOrder;
-
-import com.google.common.collect.Maps;
-
-
-
-/**
- * @author Nick Belaevski
- *
- */
-@ManagedBean
-@SessionScoped
-public class PersonBean implements Serializable {
-
- private static final long serialVersionUID = -5156711102367948040L;
-
- private static final class PersonDataModel extends JPADataModel<Person> {
-
- private PersonDataModel(EntityManager entityManager) {
- super(entityManager, Person.class);
- }
-
- @Override
- protected Object getId(Person t) {
- return t.getId();
- }
- }
-
- private Map<String, SortOrder> sortOrders = Maps.newHashMapWithExpectedSize(1);
-
- private Map<String, String> filterValues = Maps.newHashMap();
-
- private String sortProperty;
-
- public PersonBean() {
- sortOrders.put("name", SortOrder.unsorted);
- sortOrders.put("surname", SortOrder.unsorted);
- sortOrders.put("email", SortOrder.unsorted);
- }
-
- private EntityManager lookupEntityManager() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- PersistenceService persistenceService = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{persistenceService}", PersistenceService.class);
- return persistenceService.getEntityManager();
- }
-
- public Map<String, SortOrder> getSortOrders() {
- return sortOrders;
- }
-
- public Map<String, String> getFilterValues() {
- return filterValues;
- }
-
- public String getSortProperty() {
- return sortProperty;
- }
-
- public void setSortProperty(String sortPropety) {
- this.sortProperty = sortPropety;
- }
-
- public void toggleSort() {
- for (Entry<String, SortOrder> entry : sortOrders.entrySet()) {
- SortOrder newOrder;
-
- if (entry.getKey().equals(sortProperty)) {
- if (entry.getValue() == SortOrder.ascending) {
- newOrder = SortOrder.descending;
- } else {
- newOrder = SortOrder.ascending;
- }
- } else {
- newOrder = SortOrder.unsorted;
- }
-
- entry.setValue(newOrder);
- }
- }
-
- public Object getDataModel() {
- return new PersonDataModel(lookupEntityManager());
- }
-}
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+
+import org.richfaces.component.SortOrder;
+
+import com.google.common.collect.Maps;
+
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@ManagedBean
+@SessionScoped
+public class PersonBean implements Serializable {
+
+ private static final long serialVersionUID = -5156711102367948040L;
+
+ private static final class PersonDataModel extends JPADataModel<Person> {
+
+ private PersonDataModel(EntityManager entityManager) {
+ super(entityManager, Person.class);
+ }
+
+ @Override
+ protected Object getId(Person t) {
+ return t.getId();
+ }
+ }
+
+ private Map<String, SortOrder> sortOrders = Maps.newHashMapWithExpectedSize(1);
+
+ private Map<String, String> filterValues = Maps.newHashMap();
+
+ private String sortProperty;
+
+ public PersonBean() {
+ sortOrders.put("name", SortOrder.unsorted);
+ sortOrders.put("surname", SortOrder.unsorted);
+ sortOrders.put("email", SortOrder.unsorted);
+ }
+
+ private EntityManager lookupEntityManager() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ PersistenceService persistenceService = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{persistenceService}", PersistenceService.class);
+ return persistenceService.getEntityManager();
+ }
+
+ public Map<String, SortOrder> getSortOrders() {
+ return sortOrders;
+ }
+
+ public Map<String, String> getFilterValues() {
+ return filterValues;
+ }
+
+ public String getSortProperty() {
+ return sortProperty;
+ }
+
+ public void setSortProperty(String sortPropety) {
+ this.sortProperty = sortPropety;
+ }
+
+ public void toggleSort() {
+ for (Entry<String, SortOrder> entry : sortOrders.entrySet()) {
+ SortOrder newOrder;
+
+ if (entry.getKey().equals(sortProperty)) {
+ if (entry.getValue() == SortOrder.ascending) {
+ newOrder = SortOrder.descending;
+ } else {
+ newOrder = SortOrder.ascending;
+ }
+ } else {
+ newOrder = SortOrder.unsorted;
+ }
+
+ entry.setValue(newOrder);
+ }
+ }
+
+ public Object getDataModel() {
+ return new PersonDataModel(lookupEntityManager());
+ }
+}
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="richfaces-showcase"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <class>org.richfaces.demo.arrangeablemodel.Person</class>
+ <properties>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:richfaces_showcase" />
+ <property name="javax.persistence.jdbc.user" value="sa" />
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <property name="javax.persistence.validation.mode" value="NONE" />
+ <property name="hibernate.validator.apply_to_ddl" value="false" />
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Deleted: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,1003 +0,0 @@
-<persons>
- <person>
- <name>Savannah</name>
- <surname>Dickerson</surname>
- <email>ac.sem(a)Phasellus.com</email>
- </person>
- <person>
- <name>Melyssa</name>
- <surname>Scott</surname>
- <email>orci(a)at.com</email>
- </person>
- <person>
- <name>Jemima</name>
- <surname>Workman</surname>
- <email>ac.mattis.semper(a)eget.org</email>
- </person>
- <person>
- <name>Evelyn</name>
- <surname>Santiago</surname>
- <email>consectetuer.cursus(a)nonmagna.com</email>
- </person>
- <person>
- <name>Blossom</name>
- <surname>Diaz</surname>
- <email>non.leo(a)mattisvelit.ca</email>
- </person>
- <person>
- <name>Miriam</name>
- <surname>Gonzales</surname>
- <email>velit(a)urna.com</email>
- </person>
- <person>
- <name>Jada</name>
- <surname>Dennis</surname>
- <email>lectus.ante(a)lectus.com</email>
- </person>
- <person>
- <name>Jessica</name>
- <surname>Cotton</surname>
- <email>in(a)purus.com</email>
- </person>
- <person>
- <name>Henry</name>
- <surname>Blackburn</surname>
- <email>amet.risus.Donec(a)semper.com</email>
- </person>
- <person>
- <name>Raymond</name>
- <surname>Estrada</surname>
- <email>vitae(a)eutellus.ca</email>
- </person>
- <person>
- <name>Rhiannon</name>
- <surname>Dodson</surname>
- <email>dictum(a)Nullamscelerisque.edu</email>
- </person>
- <person>
- <name>Nigel</name>
- <surname>Ferrell</surname>
- <email>dictum.Phasellus(a)velitin.ca</email>
- </person>
- <person>
- <name>Kane</name>
- <surname>Cook</surname>
- <email>massa.Vestibulum(a)eu.com</email>
- </person>
- <person>
- <name>Leandra</name>
- <surname>Macias</surname>
- <email>erat.Vivamus.nisi(a)NullainterdumCurabitur.ca</email>
- </person>
- <person>
- <name>Ivory</name>
- <surname>Sanchez</surname>
- <email>Cras.lorem(a)non.org</email>
- </person>
- <person>
- <name>Kelly</name>
- <surname>Palmer</surname>
- <email>dolor.egestas.rhoncus(a)risusDonecegestas.com</email>
- </person>
- <person>
- <name>Jenna</name>
- <surname>Willis</surname>
- <email>ipsum.dolor(a)luctus.ca</email>
- </person>
- <person>
- <name>Ivana</name>
- <surname>Wolf</surname>
- <email>ac(a)infelis.com</email>
- </person>
- <person>
- <name>Graiden</name>
- <surname>Hall</surname>
- <email>purus(a)Integer.edu</email>
- </person>
- <person>
- <name>Daria</name>
- <surname>Petty</surname>
- <email>tortor.dictum(a)egestasrhoncus.edu</email>
- </person>
- <person>
- <name>Holmes</name>
- <surname>Lang</surname>
- <email>adipiscing.enim(a)Nullamscelerisque.ca</email>
- </person>
- <person>
- <name>Michelle</name>
- <surname>Miranda</surname>
- <email>Nam.consequat.dolor(a)Naminterdum.edu</email>
- </person>
- <person>
- <name>Calista</name>
- <surname>Everett</surname>
- <email>Donec.nibh(a)laoreetlibero.com</email>
- </person>
- <person>
- <name>September</name>
- <surname>Nicholson</surname>
- <email>iaculis.odio(a)sollicitudincommodo.ca</email>
- </person>
- <person>
- <name>Rosalyn</name>
- <surname>Cline</surname>
- <email>Fusce.fermentum.fermentum(a)gravidanuncsed.edu</email>
- </person>
- <person>
- <name>Christen</name>
- <surname>Cleveland</surname>
- <email>Duis.volutpat.nunc(a)metusvitaevelit.ca</email>
- </person>
- <person>
- <name>Igor</name>
- <surname>Sears</surname>
- <email>non(a)eu.edu</email>
- </person>
- <person>
- <name>Plato</name>
- <surname>Johnston</surname>
- <email>suscipit.est(a)Lorem.org</email>
- </person>
- <person>
- <name>Kelsie</name>
- <surname>Peterson</surname>
- <email>lacus.Aliquam(a)dolorelitpellentesque.org</email>
- </person>
- <person>
- <name>Lionel</name>
- <surname>Puckett</surname>
- <email>mi.lacinia.mattis(a)lacusEtiambibendum.org</email>
- </person>
- <person>
- <name>Orlando</name>
- <surname>Hayes</surname>
- <email>Mauris.quis(a)fringilla.org</email>
- </person>
- <person>
- <name>Fuller</name>
- <surname>Keller</surname>
- <email>In.nec.orci(a)utmolestiein.org</email>
- </person>
- <person>
- <name>Brandon</name>
- <surname>Woodward</surname>
- <email>eget.magna(a)etnuncQuisque.edu</email>
- </person>
- <person>
- <name>Lyle</name>
- <surname>George</surname>
- <email>lacus.Mauris(a)risus.edu</email>
- </person>
- <person>
- <name>Abbot</name>
- <surname>Valdez</surname>
- <email>tincidunt.Donec.vitae(a)velit.ca</email>
- </person>
- <person>
- <name>Kessie</name>
- <surname>Carr</surname>
- <email>Suspendisse.commodo(a)nonbibendum.ca</email>
- </person>
- <person>
- <name>Louis</name>
- <surname>Mitchell</surname>
- <email>condimentum.Donec(a)convallisconvallis.com</email>
- </person>
- <person>
- <name>Francesca</name>
- <surname>Walters</surname>
- <email>non.leo(a)eu.edu</email>
- </person>
- <person>
- <name>Giacomo</name>
- <surname>Cross</surname>
- <email>Morbi(a)nunc.edu</email>
- </person>
- <person>
- <name>Iris</name>
- <surname>Curtis</surname>
- <email>nec.euismod.in(a)Nullamsuscipit.ca</email>
- </person>
- <person>
- <name>Abdul</name>
- <surname>Atkins</surname>
- <email>Donec.non.justo(a)lobortismauris.com</email>
- </person>
- <person>
- <name>Dominique</name>
- <surname>Knight</surname>
- <email>suscipit.est.ac(a)odioNam.org</email>
- </person>
- <person>
- <name>Odysseus</name>
- <surname>Barnett</surname>
- <email>nisi.a.odio(a)tempor.com</email>
- </person>
- <person>
- <name>Hammett</name>
- <surname>Ray</surname>
- <email>eu.sem(a)purusactellus.ca</email>
- </person>
- <person>
- <name>Gage</name>
- <surname>Branch</surname>
- <email>ac.libero(a)neque.ca</email>
- </person>
- <person>
- <name>Quinn</name>
- <surname>Wilcox</surname>
- <email>Fusce(a)ipsumdolor.org</email>
- </person>
- <person>
- <name>Ursa</name>
- <surname>Bishop</surname>
- <email>montes(a)tempor.org</email>
- </person>
- <person>
- <name>Gray</name>
- <surname>Riddle</surname>
- <email>Suspendisse(a)magnanec.org</email>
- </person>
- <person>
- <name>Jorden</name>
- <surname>Christensen</surname>
- <email>a.feugiat(a)id.edu</email>
- </person>
- <person>
- <name>Hashim</name>
- <surname>Knight</surname>
- <email>Mauris(a)aliquetProin.edu</email>
- </person>
- <person>
- <name>Whitney</name>
- <surname>Hansen</surname>
- <email>nibh.Phasellus.nulla(a)ullamcorperDuis.org</email>
- </person>
- <person>
- <name>Lacy</name>
- <surname>Thompson</surname>
- <email>justo(a)egestasurnajusto.org</email>
- </person>
- <person>
- <name>Chelsea</name>
- <surname>Blanchard</surname>
- <email>magna(a)dictum.org</email>
- </person>
- <person>
- <name>Kaseem</name>
- <surname>Melendez</surname>
- <email>sem.semper.erat(a)mattis.edu</email>
- </person>
- <person>
- <name>Lillian</name>
- <surname>Conway</surname>
- <email>mattis(a)egetmetus.com</email>
- </person>
- <person>
- <name>Allistair</name>
- <surname>Britt</surname>
- <email>tellus.faucibus.leo(a)Aenean.org</email>
- </person>
- <person>
- <name>Merritt</name>
- <surname>Melton</surname>
- <email>blandit(a)enimdiamvel.org</email>
- </person>
- <person>
- <name>Vivien</name>
- <surname>Baker</surname>
- <email>accumsan(a)velitegestas.com</email>
- </person>
- <person>
- <name>Quinn</name>
- <surname>Lowery</surname>
- <email>vitae.erat(a)ridiculusmusDonec.ca</email>
- </person>
- <person>
- <name>Fleur</name>
- <surname>Rios</surname>
- <email>ullamcorper.viverra(a)egetvolutpatornare.ca</email>
- </person>
- <person>
- <name>Suki</name>
- <surname>Leach</surname>
- <email>luctus.Curabitur(a)nibh.com</email>
- </person>
- <person>
- <name>Scarlet</name>
- <surname>Cannon</surname>
- <email>dictum.eu.placerat(a)imperdiet.edu</email>
- </person>
- <person>
- <name>Ross</name>
- <surname>Reid</surname>
- <email>in.hendrerit(a)tincidunt.ca</email>
- </person>
- <person>
- <name>Amethyst</name>
- <surname>Pennington</surname>
- <email>Mauris.nulla.Integer(a)Fuscemollis.org</email>
- </person>
- <person>
- <name>Gregory</name>
- <surname>Lyons</surname>
- <email>nisl.sem.consequat(a)Phasellus.ca</email>
- </person>
- <person>
- <name>Constance</name>
- <surname>Thomas</surname>
- <email>accumsan(a)ipsum.ca</email>
- </person>
- <person>
- <name>Cleo</name>
- <surname>Chandler</surname>
- <email>massa(a)penatibusetmagnis.org</email>
- </person>
- <person>
- <name>Cruz</name>
- <surname>Paul</surname>
- <email>ornare.In(a)temporbibendum.org</email>
- </person>
- <person>
- <name>Tyrone</name>
- <surname>Nunez</surname>
- <email>arcu.Nunc(a)nisi.org</email>
- </person>
- <person>
- <name>Evan</name>
- <surname>Erickson</surname>
- <email>Etiam(a)nibh.org</email>
- </person>
- <person>
- <name>Claudia</name>
- <surname>Nash</surname>
- <email>Cras.sed(a)estacmattis.com</email>
- </person>
- <person>
- <name>Pascale</name>
- <surname>Cherry</surname>
- <email>mi(a)nonjustoProin.edu</email>
- </person>
- <person>
- <name>Evelyn</name>
- <surname>Baxter</surname>
- <email>ante.ipsum.primis(a)adlitoratorquent.org</email>
- </person>
- <person>
- <name>Wing</name>
- <surname>Gill</surname>
- <email>per(a)semperet.ca</email>
- </person>
- <person>
- <name>Raja</name>
- <surname>Smith</surname>
- <email>euismod.in(a)Duisa.com</email>
- </person>
- <person>
- <name>Gail</name>
- <surname>Fisher</surname>
- <email>Integer.mollis.Integer(a)nullaInteger.edu</email>
- </person>
- <person>
- <name>Garth</name>
- <surname>Kaufman</surname>
- <email>Suspendisse(a)conguea.ca</email>
- </person>
- <person>
- <name>Donna</name>
- <surname>Holman</surname>
- <email>orci.luctus(a)Integerinmagna.com</email>
- </person>
- <person>
- <name>Harriet</name>
- <surname>Rhodes</surname>
- <email>eu(a)ametultricies.edu</email>
- </person>
- <person>
- <name>Brody</name>
- <surname>Jacobs</surname>
- <email>magna.sed(a)Vivamusmolestiedapibus.org</email>
- </person>
- <person>
- <name>Colton</name>
- <surname>Duffy</surname>
- <email>id.magna(a)nullaIntegervulputate.edu</email>
- </person>
- <person>
- <name>Edan</name>
- <surname>Baxter</surname>
- <email>Cras(a)orciUt.ca</email>
- </person>
- <person>
- <name>Desirae</name>
- <surname>Thomas</surname>
- <email>et(a)hendreritDonec.ca</email>
- </person>
- <person>
- <name>Drew</name>
- <surname>Dixon</surname>
- <email>lectus.a.sollicitudin(a)rutrumurnanec.ca</email>
- </person>
- <person>
- <name>Jasper</name>
- <surname>Stein</surname>
- <email>Nunc.commodo(a)Duis.edu</email>
- </person>
- <person>
- <name>Stacy</name>
- <surname>Taylor</surname>
- <email>turpis.non(a)maurisblanditmattis.org</email>
- </person>
- <person>
- <name>Indigo</name>
- <surname>Ballard</surname>
- <email>pellentesque.massa(a)odioEtiamligula.com</email>
- </person>
- <person>
- <name>Leroy</name>
- <surname>Golden</surname>
- <email>ultrices(a)Aliquamnec.com</email>
- </person>
- <person>
- <name>Erasmus</name>
- <surname>Mcguire</surname>
- <email>fermentum(a)Donecporttitor.com</email>
- </person>
- <person>
- <name>Lev</name>
- <surname>Mccray</surname>
- <email>lectus.convallis.est(a)blanditenim.org</email>
- </person>
- <person>
- <name>Ima</name>
- <surname>Petersen</surname>
- <email>egestas(a)acmieleifend.org</email>
- </person>
- <person>
- <name>Murphy</name>
- <surname>Mcintosh</surname>
- <email>tempus.risus.Donec(a)dolorquamelementum.edu</email>
- </person>
- <person>
- <name>Kelsie</name>
- <surname>Cantrell</surname>
- <email>ut.aliquam(a)commodohendreritDonec.org</email>
- </person>
- <person>
- <name>Claudia</name>
- <surname>Carlson</surname>
- <email>fringilla(a)fermentumconvallisligula.com</email>
- </person>
- <person>
- <name>Cole</name>
- <surname>Walsh</surname>
- <email>quis.pede.Praesent(a)intempus.org</email>
- </person>
- <person>
- <name>Hu</name>
- <surname>Baker</surname>
- <email>Aliquam(a)Vivamusnibh.com</email>
- </person>
- <person>
- <name>Lara</name>
- <surname>Wong</surname>
- <email>a.dui(a)leo.ca</email>
- </person>
- <person>
- <name>Simone</name>
- <surname>Lancaster</surname>
- <email>netus.et(a)egettincidunt.ca</email>
- </person>
- <person>
- <name>Heather</name>
- <surname>Harrison</surname>
- <email>tellus(a)lacus.edu</email>
- </person>
- <person>
- <name>Zenia</name>
- <surname>Curtis</surname>
- <email>faucibus.lectus.a(a)fringilla.org</email>
- </person>
- <person>
- <name>Stuart</name>
- <surname>Pugh</surname>
- <email>nulla.Cras.eu(a)asollicitudinorci.org</email>
- </person>
- <person>
- <name>Shelley</name>
- <surname>Goodman</surname>
- <email>quam.dignissim(a)habitantmorbitristique.ca</email>
- </person>
- <person>
- <name>Keegan</name>
- <surname>Olson</surname>
- <email>dolor.dapibus(a)tortor.org</email>
- </person>
- <person>
- <name>Hop</name>
- <surname>Rodriguez</surname>
- <email>vitae.semper.egestas(a)natoque.ca</email>
- </person>
- <person>
- <name>Deanna</name>
- <surname>Frye</surname>
- <email>Vivamus(a)risus.org</email>
- </person>
- <person>
- <name>Rebecca</name>
- <surname>Medina</surname>
- <email>sociis(a)etmagnisdis.com</email>
- </person>
- <person>
- <name>Sarah</name>
- <surname>Patton</surname>
- <email>ullamcorper(a)ettristique.com</email>
- </person>
- <person>
- <name>Jenette</name>
- <surname>Martin</surname>
- <email>tempor.lorem.eget(a)etrutrum.com</email>
- </person>
- <person>
- <name>Gil</name>
- <surname>Brady</surname>
- <email>tellus(a)inmagna.org</email>
- </person>
- <person>
- <name>Jena</name>
- <surname>Merritt</surname>
- <email>litora(a)eu.ca</email>
- </person>
- <person>
- <name>Christine</name>
- <surname>Brennan</surname>
- <email>ac(a)lectusasollicitudin.com</email>
- </person>
- <person>
- <name>Clark</name>
- <surname>Contreras</surname>
- <email>natoque.penatibus.et(a)orciUtsagittis.org</email>
- </person>
- <person>
- <name>Bo</name>
- <surname>Becker</surname>
- <email>est.vitae.sodales(a)Fusce.edu</email>
- </person>
- <person>
- <name>Lacey</name>
- <surname>Guerrero</surname>
- <email>Fusce.dolor.quam(a)Aliquamvulputateullamcorper.com</email>
- </person>
- <person>
- <name>Cullen</name>
- <surname>Mason</surname>
- <email>bibendum(a)purusin.com</email>
- </person>
- <person>
- <name>Jenette</name>
- <surname>Stuart</surname>
- <email>sociis.natoque.penatibus(a)penatibus.com</email>
- </person>
- <person>
- <name>Selma</name>
- <surname>Zamora</surname>
- <email>pede.Suspendisse.dui(a)fermentum.com</email>
- </person>
- <person>
- <name>Clinton</name>
- <surname>Peterson</surname>
- <email>odio.Etiam(a)ornare.ca</email>
- </person>
- <person>
- <name>Axel</name>
- <surname>Henderson</surname>
- <email>a(a)pedeCumsociis.org</email>
- </person>
- <person>
- <name>Margaret</name>
- <surname>Roy</surname>
- <email>Sed(a)vehicularisusNulla.ca</email>
- </person>
- <person>
- <name>Price</name>
- <surname>Lyons</surname>
- <email>magna(a)habitantmorbi.org</email>
- </person>
- <person>
- <name>Logan</name>
- <surname>Sharp</surname>
- <email>In.at.pede(a)auctorodio.org</email>
- </person>
- <person>
- <name>Marvin</name>
- <surname>Ramirez</surname>
- <email>Donec.tincidunt(a)et.edu</email>
- </person>
- <person>
- <name>Briar</name>
- <surname>Short</surname>
- <email>nunc.interdum.feugiat(a)sedhendrerit.ca</email>
- </person>
- <person>
- <name>Flynn</name>
- <surname>York</surname>
- <email>non.nisi(a)purusmauris.org</email>
- </person>
- <person>
- <name>Benjamin</name>
- <surname>Stevenson</surname>
- <email>consectetuer(a)Aeneaneuismodmauris.org</email>
- </person>
- <person>
- <name>Dieter</name>
- <surname>Nicholson</surname>
- <email>risus(a)enimgravida.org</email>
- </person>
- <person>
- <name>Lacy</name>
- <surname>Baker</surname>
- <email>eu.neque.pellentesque(a)duiFuscealiquam.com</email>
- </person>
- <person>
- <name>Kaseem</name>
- <surname>Holder</surname>
- <email>non.quam(a)Loremipsum.ca</email>
- </person>
- <person>
- <name>Yeo</name>
- <surname>Sanchez</surname>
- <email>nisi.a(a)Namnullamagna.ca</email>
- </person>
- <person>
- <name>Heidi</name>
- <surname>Black</surname>
- <email>tempus(a)faucibuslectusa.org</email>
- </person>
- <person>
- <name>Cameron</name>
- <surname>Vang</surname>
- <email>turpis(a)tinciduntnuncac.com</email>
- </person>
- <person>
- <name>Ryan</name>
- <surname>Harris</surname>
- <email>nec.ligula.consectetuer(a)risusInmi.edu</email>
- </person>
- <person>
- <name>Debra</name>
- <surname>Cortez</surname>
- <email>luctus(a)pede.com</email>
- </person>
- <person>
- <name>Neville</name>
- <surname>Mcintyre</surname>
- <email>egestas(a)placeratvelitQuisque.ca</email>
- </person>
- <person>
- <name>Hope</name>
- <surname>Romero</surname>
- <email>dignissim.tempor(a)nonmagnaNam.com</email>
- </person>
- <person>
- <name>Mechelle</name>
- <surname>Kidd</surname>
- <email>orci.Ut.sagittis(a)nonenimcommodo.ca</email>
- </person>
- <person>
- <name>Nora</name>
- <surname>Rivera</surname>
- <email>gravida(a)consequatdolorvitae.edu</email>
- </person>
- <person>
- <name>Zeph</name>
- <surname>Snyder</surname>
- <email>Donec.est(a)enimEtiam.ca</email>
- </person>
- <person>
- <name>Britanni</name>
- <surname>Williamson</surname>
- <email>nulla.ante(a)sempereratin.edu</email>
- </person>
- <person>
- <name>Jermaine</name>
- <surname>Jones</surname>
- <email>sapien.Aenean(a)Quisquenonummyipsum.org</email>
- </person>
- <person>
- <name>Steel</name>
- <surname>Newton</surname>
- <email>cursus.et(a)Curabiturut.org</email>
- </person>
- <person>
- <name>Hyatt</name>
- <surname>Manning</surname>
- <email>eget.massa.Suspendisse(a)aptenttaciti.edu</email>
- </person>
- <person>
- <name>Stone</name>
- <surname>Sloan</surname>
- <email>adipiscing.elit.Curabitur(a)estvitaesodales.org</email>
- </person>
- <person>
- <name>Lewis</name>
- <surname>Guthrie</surname>
- <email>neque.Nullam(a)Nuncpulvinararcu.edu</email>
- </person>
- <person>
- <name>Sandra</name>
- <surname>Cannon</surname>
- <email>lobortis.nisi.nibh(a)luctuslobortisClass.com</email>
- </person>
- <person>
- <name>Daria</name>
- <surname>Page</surname>
- <email>Aenean.sed.pede(a)facilisis.edu</email>
- </person>
- <person>
- <name>Mohammad</name>
- <surname>Soto</surname>
- <email>blandit(a)aliquamarcuAliquam.org</email>
- </person>
- <person>
- <name>Kerry</name>
- <surname>Lowery</surname>
- <email>vitae(a)mauriserateget.edu</email>
- </person>
- <person>
- <name>Quinlan</name>
- <surname>Roy</surname>
- <email>est.ac(a)mollisvitaeposuere.com</email>
- </person>
- <person>
- <name>Patricia</name>
- <surname>Kirkland</surname>
- <email>ipsum.dolor(a)orci.org</email>
- </person>
- <person>
- <name>Janna</name>
- <surname>Banks</surname>
- <email>id.mollis.nec(a)eteuismodet.org</email>
- </person>
- <person>
- <name>Lucius</name>
- <surname>William</surname>
- <email>sem(a)Nullamlobortis.com</email>
- </person>
- <person>
- <name>Ira</name>
- <surname>Buck</surname>
- <email>pede.nonummy(a)dapibusgravidaAliquam.ca</email>
- </person>
- <person>
- <name>Shellie</name>
- <surname>Charles</surname>
- <email>est(a)lobortisultricesVivamus.org</email>
- </person>
- <person>
- <name>Stewart</name>
- <surname>Cabrera</surname>
- <email>libero(a)feugiat.com</email>
- </person>
- <person>
- <name>April</name>
- <surname>Sheppard</surname>
- <email>sit(a)seddictumeleifend.ca</email>
- </person>
- <person>
- <name>Gail</name>
- <surname>Rollins</surname>
- <email>odio(a)Proinnonmassa.ca</email>
- </person>
- <person>
- <name>Ross</name>
- <surname>Levy</surname>
- <email>sit.amet.ultricies(a)Quisqueliberolacus.com</email>
- </person>
- <person>
- <name>Hadley</name>
- <surname>Mccormick</surname>
- <email>vitae.posuere.at(a)enimnonnisi.org</email>
- </person>
- <person>
- <name>Susan</name>
- <surname>Banks</surname>
- <email>interdum(a)nislsemconsequat.org</email>
- </person>
- <person>
- <name>Nash</name>
- <surname>Nolan</surname>
- <email>convallis.dolor(a)enimSed.ca</email>
- </person>
- <person>
- <name>Gretchen</name>
- <surname>Carson</surname>
- <email>elit.dictum.eu(a)temporarcuVestibulum.ca</email>
- </person>
- <person>
- <name>Harper</name>
- <surname>Hull</surname>
- <email>eget(a)imperdiet.edu</email>
- </person>
- <person>
- <name>Porter</name>
- <surname>Benson</surname>
- <email>tempus.non(a)Aenean.org</email>
- </person>
- <person>
- <name>Xenos</name>
- <surname>Tate</surname>
- <email>blandit(a)antebibendum.org</email>
- </person>
- <person>
- <name>Ali</name>
- <surname>Carver</surname>
- <email>Nulla.aliquet(a)ornare.org</email>
- </person>
- <person>
- <name>Zachery</name>
- <surname>Shepherd</surname>
- <email>vitae.erat(a)sed.edu</email>
- </person>
- <person>
- <name>Garrett</name>
- <surname>Leach</surname>
- <email>risus(a)quisurna.org</email>
- </person>
- <person>
- <name>Mufutau</name>
- <surname>Greer</surname>
- <email>bibendum(a)luctus.com</email>
- </person>
- <person>
- <name>Ryan</name>
- <surname>Bryant</surname>
- <email>turpis(a)purus.edu</email>
- </person>
- <person>
- <name>Lacey</name>
- <surname>Riley</surname>
- <email>sed.turpis.nec(a)molestieSed.ca</email>
- </person>
- <person>
- <name>Tiger</name>
- <surname>Ryan</surname>
- <email>lorem(a)vel.com</email>
- </person>
- <person>
- <name>Upton</name>
- <surname>Sullivan</surname>
- <email>amet(a)Proin.com</email>
- </person>
- <person>
- <name>Juliet</name>
- <surname>Tate</surname>
- <email>pede.Cum(a)eu.edu</email>
- </person>
- <person>
- <name>Dieter</name>
- <surname>Bowman</surname>
- <email>lorem.eu(a)pellentesqueegetdictum.com</email>
- </person>
- <person>
- <name>Jelani</name>
- <surname>Knapp</surname>
- <email>Nulla(a)Morbi.org</email>
- </person>
- <person>
- <name>Martena</name>
- <surname>Leblanc</surname>
- <email>arcu.Vestibulum.ut(a)quamquis.edu</email>
- </person>
- <person>
- <name>Megan</name>
- <surname>Hull</surname>
- <email>eu.nulla(a)amalesuada.com</email>
- </person>
- <person>
- <name>Ginger</name>
- <surname>Mcpherson</surname>
- <email>dui.augue(a)Innecorci.com</email>
- </person>
- <person>
- <name>Kylan</name>
- <surname>Gilmore</surname>
- <email>urna.Ut.tincidunt(a)aliquetsemut.com</email>
- </person>
- <person>
- <name>Carlos</name>
- <surname>King</surname>
- <email>fermentum(a)lacus.com</email>
- </person>
- <person>
- <name>Irma</name>
- <surname>Blake</surname>
- <email>Aliquam.nec(a)adipiscingelit.com</email>
- </person>
- <person>
- <name>Tad</name>
- <surname>Allen</surname>
- <email>rhoncus.Proin.nisl(a)vehiculaaliquet.ca</email>
- </person>
- <person>
- <name>Fiona</name>
- <surname>Kline</surname>
- <email>risus(a)gravidasagittisDuis.ca</email>
- </person>
- <person>
- <name>Nell</name>
- <surname>Franco</surname>
- <email>blandit(a)viverraMaecenasiaculis.org</email>
- </person>
- <person>
- <name>Scarlet</name>
- <surname>Hall</surname>
- <email>tincidunt(a)Nullamsuscipit.com</email>
- </person>
- <person>
- <name>Zane</name>
- <surname>Mccray</surname>
- <email>volutpat.Nulla(a)malesuadafringilla.edu</email>
- </person>
- <person>
- <name>Connor</name>
- <surname>Salas</surname>
- <email>Sed.nulla.ante(a)eu.com</email>
- </person>
- <person>
- <name>Carlos</name>
- <surname>Hunt</surname>
- <email>Nam(a)nequevenenatislacus.org</email>
- </person>
- <person>
- <name>Lane</name>
- <surname>Andrews</surname>
- <email>a.sollicitudin(a)inconsequat.org</email>
- </person>
- <person>
- <name>Shana</name>
- <surname>Ballard</surname>
- <email>elementum(a)nibhlacinia.org</email>
- </person>
- <person>
- <name>Conan</name>
- <surname>Bradshaw</surname>
- <email>vel.arcu.Curabitur(a)eratnonummyultricies.ca</email>
- </person>
- <person>
- <name>Colleen</name>
- <surname>Brooks</surname>
- <email>erat.volutpat(a)cubiliaCurae;.edu</email>
- </person>
- <person>
- <name>Francis</name>
- <surname>Hardy</surname>
- <email>sit.amet.luctus(a)dignissimlacus.com</email>
- </person>
- <person>
- <name>Reuben</name>
- <surname>Rodriguez</surname>
- <email>natoque.penatibus.et(a)euaccumsansed.com</email>
- </person>
- <person>
- <name>Iris</name>
- <surname>Reid</surname>
- <email>sed(a)Quisquepurussapien.edu</email>
- </person>
- <person>
- <name>Phillip</name>
- <surname>Schmidt</surname>
- <email>ut(a)tortornibhsit.com</email>
- </person>
- <person>
- <name>Jonas</name>
- <surname>Crane</surname>
- <email>ac.mi(a)luctusCurabitur.org</email>
- </person>
- <person>
- <name>Abbot</name>
- <surname>Terry</surname>
- <email>fringilla(a)Crasconvallisconvallis.com</email>
- </person>
-</persons>
-
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,1003 @@
+<persons>
+ <person>
+ <name>Savannah</name>
+ <surname>Dickerson</surname>
+ <email>ac.sem(a)Phasellus.com</email>
+ </person>
+ <person>
+ <name>Melyssa</name>
+ <surname>Scott</surname>
+ <email>orci(a)at.com</email>
+ </person>
+ <person>
+ <name>Jemima</name>
+ <surname>Workman</surname>
+ <email>ac.mattis.semper(a)eget.org</email>
+ </person>
+ <person>
+ <name>Evelyn</name>
+ <surname>Santiago</surname>
+ <email>consectetuer.cursus(a)nonmagna.com</email>
+ </person>
+ <person>
+ <name>Blossom</name>
+ <surname>Diaz</surname>
+ <email>non.leo(a)mattisvelit.ca</email>
+ </person>
+ <person>
+ <name>Miriam</name>
+ <surname>Gonzales</surname>
+ <email>velit(a)urna.com</email>
+ </person>
+ <person>
+ <name>Jada</name>
+ <surname>Dennis</surname>
+ <email>lectus.ante(a)lectus.com</email>
+ </person>
+ <person>
+ <name>Jessica</name>
+ <surname>Cotton</surname>
+ <email>in(a)purus.com</email>
+ </person>
+ <person>
+ <name>Henry</name>
+ <surname>Blackburn</surname>
+ <email>amet.risus.Donec(a)semper.com</email>
+ </person>
+ <person>
+ <name>Raymond</name>
+ <surname>Estrada</surname>
+ <email>vitae(a)eutellus.ca</email>
+ </person>
+ <person>
+ <name>Rhiannon</name>
+ <surname>Dodson</surname>
+ <email>dictum(a)Nullamscelerisque.edu</email>
+ </person>
+ <person>
+ <name>Nigel</name>
+ <surname>Ferrell</surname>
+ <email>dictum.Phasellus(a)velitin.ca</email>
+ </person>
+ <person>
+ <name>Kane</name>
+ <surname>Cook</surname>
+ <email>massa.Vestibulum(a)eu.com</email>
+ </person>
+ <person>
+ <name>Leandra</name>
+ <surname>Macias</surname>
+ <email>erat.Vivamus.nisi(a)NullainterdumCurabitur.ca</email>
+ </person>
+ <person>
+ <name>Ivory</name>
+ <surname>Sanchez</surname>
+ <email>Cras.lorem(a)non.org</email>
+ </person>
+ <person>
+ <name>Kelly</name>
+ <surname>Palmer</surname>
+ <email>dolor.egestas.rhoncus(a)risusDonecegestas.com</email>
+ </person>
+ <person>
+ <name>Jenna</name>
+ <surname>Willis</surname>
+ <email>ipsum.dolor(a)luctus.ca</email>
+ </person>
+ <person>
+ <name>Ivana</name>
+ <surname>Wolf</surname>
+ <email>ac(a)infelis.com</email>
+ </person>
+ <person>
+ <name>Graiden</name>
+ <surname>Hall</surname>
+ <email>purus(a)Integer.edu</email>
+ </person>
+ <person>
+ <name>Daria</name>
+ <surname>Petty</surname>
+ <email>tortor.dictum(a)egestasrhoncus.edu</email>
+ </person>
+ <person>
+ <name>Holmes</name>
+ <surname>Lang</surname>
+ <email>adipiscing.enim(a)Nullamscelerisque.ca</email>
+ </person>
+ <person>
+ <name>Michelle</name>
+ <surname>Miranda</surname>
+ <email>Nam.consequat.dolor(a)Naminterdum.edu</email>
+ </person>
+ <person>
+ <name>Calista</name>
+ <surname>Everett</surname>
+ <email>Donec.nibh(a)laoreetlibero.com</email>
+ </person>
+ <person>
+ <name>September</name>
+ <surname>Nicholson</surname>
+ <email>iaculis.odio(a)sollicitudincommodo.ca</email>
+ </person>
+ <person>
+ <name>Rosalyn</name>
+ <surname>Cline</surname>
+ <email>Fusce.fermentum.fermentum(a)gravidanuncsed.edu</email>
+ </person>
+ <person>
+ <name>Christen</name>
+ <surname>Cleveland</surname>
+ <email>Duis.volutpat.nunc(a)metusvitaevelit.ca</email>
+ </person>
+ <person>
+ <name>Igor</name>
+ <surname>Sears</surname>
+ <email>non(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Plato</name>
+ <surname>Johnston</surname>
+ <email>suscipit.est(a)Lorem.org</email>
+ </person>
+ <person>
+ <name>Kelsie</name>
+ <surname>Peterson</surname>
+ <email>lacus.Aliquam(a)dolorelitpellentesque.org</email>
+ </person>
+ <person>
+ <name>Lionel</name>
+ <surname>Puckett</surname>
+ <email>mi.lacinia.mattis(a)lacusEtiambibendum.org</email>
+ </person>
+ <person>
+ <name>Orlando</name>
+ <surname>Hayes</surname>
+ <email>Mauris.quis(a)fringilla.org</email>
+ </person>
+ <person>
+ <name>Fuller</name>
+ <surname>Keller</surname>
+ <email>In.nec.orci(a)utmolestiein.org</email>
+ </person>
+ <person>
+ <name>Brandon</name>
+ <surname>Woodward</surname>
+ <email>eget.magna(a)etnuncQuisque.edu</email>
+ </person>
+ <person>
+ <name>Lyle</name>
+ <surname>George</surname>
+ <email>lacus.Mauris(a)risus.edu</email>
+ </person>
+ <person>
+ <name>Abbot</name>
+ <surname>Valdez</surname>
+ <email>tincidunt.Donec.vitae(a)velit.ca</email>
+ </person>
+ <person>
+ <name>Kessie</name>
+ <surname>Carr</surname>
+ <email>Suspendisse.commodo(a)nonbibendum.ca</email>
+ </person>
+ <person>
+ <name>Louis</name>
+ <surname>Mitchell</surname>
+ <email>condimentum.Donec(a)convallisconvallis.com</email>
+ </person>
+ <person>
+ <name>Francesca</name>
+ <surname>Walters</surname>
+ <email>non.leo(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Giacomo</name>
+ <surname>Cross</surname>
+ <email>Morbi(a)nunc.edu</email>
+ </person>
+ <person>
+ <name>Iris</name>
+ <surname>Curtis</surname>
+ <email>nec.euismod.in(a)Nullamsuscipit.ca</email>
+ </person>
+ <person>
+ <name>Abdul</name>
+ <surname>Atkins</surname>
+ <email>Donec.non.justo(a)lobortismauris.com</email>
+ </person>
+ <person>
+ <name>Dominique</name>
+ <surname>Knight</surname>
+ <email>suscipit.est.ac(a)odioNam.org</email>
+ </person>
+ <person>
+ <name>Odysseus</name>
+ <surname>Barnett</surname>
+ <email>nisi.a.odio(a)tempor.com</email>
+ </person>
+ <person>
+ <name>Hammett</name>
+ <surname>Ray</surname>
+ <email>eu.sem(a)purusactellus.ca</email>
+ </person>
+ <person>
+ <name>Gage</name>
+ <surname>Branch</surname>
+ <email>ac.libero(a)neque.ca</email>
+ </person>
+ <person>
+ <name>Quinn</name>
+ <surname>Wilcox</surname>
+ <email>Fusce(a)ipsumdolor.org</email>
+ </person>
+ <person>
+ <name>Ursa</name>
+ <surname>Bishop</surname>
+ <email>montes(a)tempor.org</email>
+ </person>
+ <person>
+ <name>Gray</name>
+ <surname>Riddle</surname>
+ <email>Suspendisse(a)magnanec.org</email>
+ </person>
+ <person>
+ <name>Jorden</name>
+ <surname>Christensen</surname>
+ <email>a.feugiat(a)id.edu</email>
+ </person>
+ <person>
+ <name>Hashim</name>
+ <surname>Knight</surname>
+ <email>Mauris(a)aliquetProin.edu</email>
+ </person>
+ <person>
+ <name>Whitney</name>
+ <surname>Hansen</surname>
+ <email>nibh.Phasellus.nulla(a)ullamcorperDuis.org</email>
+ </person>
+ <person>
+ <name>Lacy</name>
+ <surname>Thompson</surname>
+ <email>justo(a)egestasurnajusto.org</email>
+ </person>
+ <person>
+ <name>Chelsea</name>
+ <surname>Blanchard</surname>
+ <email>magna(a)dictum.org</email>
+ </person>
+ <person>
+ <name>Kaseem</name>
+ <surname>Melendez</surname>
+ <email>sem.semper.erat(a)mattis.edu</email>
+ </person>
+ <person>
+ <name>Lillian</name>
+ <surname>Conway</surname>
+ <email>mattis(a)egetmetus.com</email>
+ </person>
+ <person>
+ <name>Allistair</name>
+ <surname>Britt</surname>
+ <email>tellus.faucibus.leo(a)Aenean.org</email>
+ </person>
+ <person>
+ <name>Merritt</name>
+ <surname>Melton</surname>
+ <email>blandit(a)enimdiamvel.org</email>
+ </person>
+ <person>
+ <name>Vivien</name>
+ <surname>Baker</surname>
+ <email>accumsan(a)velitegestas.com</email>
+ </person>
+ <person>
+ <name>Quinn</name>
+ <surname>Lowery</surname>
+ <email>vitae.erat(a)ridiculusmusDonec.ca</email>
+ </person>
+ <person>
+ <name>Fleur</name>
+ <surname>Rios</surname>
+ <email>ullamcorper.viverra(a)egetvolutpatornare.ca</email>
+ </person>
+ <person>
+ <name>Suki</name>
+ <surname>Leach</surname>
+ <email>luctus.Curabitur(a)nibh.com</email>
+ </person>
+ <person>
+ <name>Scarlet</name>
+ <surname>Cannon</surname>
+ <email>dictum.eu.placerat(a)imperdiet.edu</email>
+ </person>
+ <person>
+ <name>Ross</name>
+ <surname>Reid</surname>
+ <email>in.hendrerit(a)tincidunt.ca</email>
+ </person>
+ <person>
+ <name>Amethyst</name>
+ <surname>Pennington</surname>
+ <email>Mauris.nulla.Integer(a)Fuscemollis.org</email>
+ </person>
+ <person>
+ <name>Gregory</name>
+ <surname>Lyons</surname>
+ <email>nisl.sem.consequat(a)Phasellus.ca</email>
+ </person>
+ <person>
+ <name>Constance</name>
+ <surname>Thomas</surname>
+ <email>accumsan(a)ipsum.ca</email>
+ </person>
+ <person>
+ <name>Cleo</name>
+ <surname>Chandler</surname>
+ <email>massa(a)penatibusetmagnis.org</email>
+ </person>
+ <person>
+ <name>Cruz</name>
+ <surname>Paul</surname>
+ <email>ornare.In(a)temporbibendum.org</email>
+ </person>
+ <person>
+ <name>Tyrone</name>
+ <surname>Nunez</surname>
+ <email>arcu.Nunc(a)nisi.org</email>
+ </person>
+ <person>
+ <name>Evan</name>
+ <surname>Erickson</surname>
+ <email>Etiam(a)nibh.org</email>
+ </person>
+ <person>
+ <name>Claudia</name>
+ <surname>Nash</surname>
+ <email>Cras.sed(a)estacmattis.com</email>
+ </person>
+ <person>
+ <name>Pascale</name>
+ <surname>Cherry</surname>
+ <email>mi(a)nonjustoProin.edu</email>
+ </person>
+ <person>
+ <name>Evelyn</name>
+ <surname>Baxter</surname>
+ <email>ante.ipsum.primis(a)adlitoratorquent.org</email>
+ </person>
+ <person>
+ <name>Wing</name>
+ <surname>Gill</surname>
+ <email>per(a)semperet.ca</email>
+ </person>
+ <person>
+ <name>Raja</name>
+ <surname>Smith</surname>
+ <email>euismod.in(a)Duisa.com</email>
+ </person>
+ <person>
+ <name>Gail</name>
+ <surname>Fisher</surname>
+ <email>Integer.mollis.Integer(a)nullaInteger.edu</email>
+ </person>
+ <person>
+ <name>Garth</name>
+ <surname>Kaufman</surname>
+ <email>Suspendisse(a)conguea.ca</email>
+ </person>
+ <person>
+ <name>Donna</name>
+ <surname>Holman</surname>
+ <email>orci.luctus(a)Integerinmagna.com</email>
+ </person>
+ <person>
+ <name>Harriet</name>
+ <surname>Rhodes</surname>
+ <email>eu(a)ametultricies.edu</email>
+ </person>
+ <person>
+ <name>Brody</name>
+ <surname>Jacobs</surname>
+ <email>magna.sed(a)Vivamusmolestiedapibus.org</email>
+ </person>
+ <person>
+ <name>Colton</name>
+ <surname>Duffy</surname>
+ <email>id.magna(a)nullaIntegervulputate.edu</email>
+ </person>
+ <person>
+ <name>Edan</name>
+ <surname>Baxter</surname>
+ <email>Cras(a)orciUt.ca</email>
+ </person>
+ <person>
+ <name>Desirae</name>
+ <surname>Thomas</surname>
+ <email>et(a)hendreritDonec.ca</email>
+ </person>
+ <person>
+ <name>Drew</name>
+ <surname>Dixon</surname>
+ <email>lectus.a.sollicitudin(a)rutrumurnanec.ca</email>
+ </person>
+ <person>
+ <name>Jasper</name>
+ <surname>Stein</surname>
+ <email>Nunc.commodo(a)Duis.edu</email>
+ </person>
+ <person>
+ <name>Stacy</name>
+ <surname>Taylor</surname>
+ <email>turpis.non(a)maurisblanditmattis.org</email>
+ </person>
+ <person>
+ <name>Indigo</name>
+ <surname>Ballard</surname>
+ <email>pellentesque.massa(a)odioEtiamligula.com</email>
+ </person>
+ <person>
+ <name>Leroy</name>
+ <surname>Golden</surname>
+ <email>ultrices(a)Aliquamnec.com</email>
+ </person>
+ <person>
+ <name>Erasmus</name>
+ <surname>Mcguire</surname>
+ <email>fermentum(a)Donecporttitor.com</email>
+ </person>
+ <person>
+ <name>Lev</name>
+ <surname>Mccray</surname>
+ <email>lectus.convallis.est(a)blanditenim.org</email>
+ </person>
+ <person>
+ <name>Ima</name>
+ <surname>Petersen</surname>
+ <email>egestas(a)acmieleifend.org</email>
+ </person>
+ <person>
+ <name>Murphy</name>
+ <surname>Mcintosh</surname>
+ <email>tempus.risus.Donec(a)dolorquamelementum.edu</email>
+ </person>
+ <person>
+ <name>Kelsie</name>
+ <surname>Cantrell</surname>
+ <email>ut.aliquam(a)commodohendreritDonec.org</email>
+ </person>
+ <person>
+ <name>Claudia</name>
+ <surname>Carlson</surname>
+ <email>fringilla(a)fermentumconvallisligula.com</email>
+ </person>
+ <person>
+ <name>Cole</name>
+ <surname>Walsh</surname>
+ <email>quis.pede.Praesent(a)intempus.org</email>
+ </person>
+ <person>
+ <name>Hu</name>
+ <surname>Baker</surname>
+ <email>Aliquam(a)Vivamusnibh.com</email>
+ </person>
+ <person>
+ <name>Lara</name>
+ <surname>Wong</surname>
+ <email>a.dui(a)leo.ca</email>
+ </person>
+ <person>
+ <name>Simone</name>
+ <surname>Lancaster</surname>
+ <email>netus.et(a)egettincidunt.ca</email>
+ </person>
+ <person>
+ <name>Heather</name>
+ <surname>Harrison</surname>
+ <email>tellus(a)lacus.edu</email>
+ </person>
+ <person>
+ <name>Zenia</name>
+ <surname>Curtis</surname>
+ <email>faucibus.lectus.a(a)fringilla.org</email>
+ </person>
+ <person>
+ <name>Stuart</name>
+ <surname>Pugh</surname>
+ <email>nulla.Cras.eu(a)asollicitudinorci.org</email>
+ </person>
+ <person>
+ <name>Shelley</name>
+ <surname>Goodman</surname>
+ <email>quam.dignissim(a)habitantmorbitristique.ca</email>
+ </person>
+ <person>
+ <name>Keegan</name>
+ <surname>Olson</surname>
+ <email>dolor.dapibus(a)tortor.org</email>
+ </person>
+ <person>
+ <name>Hop</name>
+ <surname>Rodriguez</surname>
+ <email>vitae.semper.egestas(a)natoque.ca</email>
+ </person>
+ <person>
+ <name>Deanna</name>
+ <surname>Frye</surname>
+ <email>Vivamus(a)risus.org</email>
+ </person>
+ <person>
+ <name>Rebecca</name>
+ <surname>Medina</surname>
+ <email>sociis(a)etmagnisdis.com</email>
+ </person>
+ <person>
+ <name>Sarah</name>
+ <surname>Patton</surname>
+ <email>ullamcorper(a)ettristique.com</email>
+ </person>
+ <person>
+ <name>Jenette</name>
+ <surname>Martin</surname>
+ <email>tempor.lorem.eget(a)etrutrum.com</email>
+ </person>
+ <person>
+ <name>Gil</name>
+ <surname>Brady</surname>
+ <email>tellus(a)inmagna.org</email>
+ </person>
+ <person>
+ <name>Jena</name>
+ <surname>Merritt</surname>
+ <email>litora(a)eu.ca</email>
+ </person>
+ <person>
+ <name>Christine</name>
+ <surname>Brennan</surname>
+ <email>ac(a)lectusasollicitudin.com</email>
+ </person>
+ <person>
+ <name>Clark</name>
+ <surname>Contreras</surname>
+ <email>natoque.penatibus.et(a)orciUtsagittis.org</email>
+ </person>
+ <person>
+ <name>Bo</name>
+ <surname>Becker</surname>
+ <email>est.vitae.sodales(a)Fusce.edu</email>
+ </person>
+ <person>
+ <name>Lacey</name>
+ <surname>Guerrero</surname>
+ <email>Fusce.dolor.quam(a)Aliquamvulputateullamcorper.com</email>
+ </person>
+ <person>
+ <name>Cullen</name>
+ <surname>Mason</surname>
+ <email>bibendum(a)purusin.com</email>
+ </person>
+ <person>
+ <name>Jenette</name>
+ <surname>Stuart</surname>
+ <email>sociis.natoque.penatibus(a)penatibus.com</email>
+ </person>
+ <person>
+ <name>Selma</name>
+ <surname>Zamora</surname>
+ <email>pede.Suspendisse.dui(a)fermentum.com</email>
+ </person>
+ <person>
+ <name>Clinton</name>
+ <surname>Peterson</surname>
+ <email>odio.Etiam(a)ornare.ca</email>
+ </person>
+ <person>
+ <name>Axel</name>
+ <surname>Henderson</surname>
+ <email>a(a)pedeCumsociis.org</email>
+ </person>
+ <person>
+ <name>Margaret</name>
+ <surname>Roy</surname>
+ <email>Sed(a)vehicularisusNulla.ca</email>
+ </person>
+ <person>
+ <name>Price</name>
+ <surname>Lyons</surname>
+ <email>magna(a)habitantmorbi.org</email>
+ </person>
+ <person>
+ <name>Logan</name>
+ <surname>Sharp</surname>
+ <email>In.at.pede(a)auctorodio.org</email>
+ </person>
+ <person>
+ <name>Marvin</name>
+ <surname>Ramirez</surname>
+ <email>Donec.tincidunt(a)et.edu</email>
+ </person>
+ <person>
+ <name>Briar</name>
+ <surname>Short</surname>
+ <email>nunc.interdum.feugiat(a)sedhendrerit.ca</email>
+ </person>
+ <person>
+ <name>Flynn</name>
+ <surname>York</surname>
+ <email>non.nisi(a)purusmauris.org</email>
+ </person>
+ <person>
+ <name>Benjamin</name>
+ <surname>Stevenson</surname>
+ <email>consectetuer(a)Aeneaneuismodmauris.org</email>
+ </person>
+ <person>
+ <name>Dieter</name>
+ <surname>Nicholson</surname>
+ <email>risus(a)enimgravida.org</email>
+ </person>
+ <person>
+ <name>Lacy</name>
+ <surname>Baker</surname>
+ <email>eu.neque.pellentesque(a)duiFuscealiquam.com</email>
+ </person>
+ <person>
+ <name>Kaseem</name>
+ <surname>Holder</surname>
+ <email>non.quam(a)Loremipsum.ca</email>
+ </person>
+ <person>
+ <name>Yeo</name>
+ <surname>Sanchez</surname>
+ <email>nisi.a(a)Namnullamagna.ca</email>
+ </person>
+ <person>
+ <name>Heidi</name>
+ <surname>Black</surname>
+ <email>tempus(a)faucibuslectusa.org</email>
+ </person>
+ <person>
+ <name>Cameron</name>
+ <surname>Vang</surname>
+ <email>turpis(a)tinciduntnuncac.com</email>
+ </person>
+ <person>
+ <name>Ryan</name>
+ <surname>Harris</surname>
+ <email>nec.ligula.consectetuer(a)risusInmi.edu</email>
+ </person>
+ <person>
+ <name>Debra</name>
+ <surname>Cortez</surname>
+ <email>luctus(a)pede.com</email>
+ </person>
+ <person>
+ <name>Neville</name>
+ <surname>Mcintyre</surname>
+ <email>egestas(a)placeratvelitQuisque.ca</email>
+ </person>
+ <person>
+ <name>Hope</name>
+ <surname>Romero</surname>
+ <email>dignissim.tempor(a)nonmagnaNam.com</email>
+ </person>
+ <person>
+ <name>Mechelle</name>
+ <surname>Kidd</surname>
+ <email>orci.Ut.sagittis(a)nonenimcommodo.ca</email>
+ </person>
+ <person>
+ <name>Nora</name>
+ <surname>Rivera</surname>
+ <email>gravida(a)consequatdolorvitae.edu</email>
+ </person>
+ <person>
+ <name>Zeph</name>
+ <surname>Snyder</surname>
+ <email>Donec.est(a)enimEtiam.ca</email>
+ </person>
+ <person>
+ <name>Britanni</name>
+ <surname>Williamson</surname>
+ <email>nulla.ante(a)sempereratin.edu</email>
+ </person>
+ <person>
+ <name>Jermaine</name>
+ <surname>Jones</surname>
+ <email>sapien.Aenean(a)Quisquenonummyipsum.org</email>
+ </person>
+ <person>
+ <name>Steel</name>
+ <surname>Newton</surname>
+ <email>cursus.et(a)Curabiturut.org</email>
+ </person>
+ <person>
+ <name>Hyatt</name>
+ <surname>Manning</surname>
+ <email>eget.massa.Suspendisse(a)aptenttaciti.edu</email>
+ </person>
+ <person>
+ <name>Stone</name>
+ <surname>Sloan</surname>
+ <email>adipiscing.elit.Curabitur(a)estvitaesodales.org</email>
+ </person>
+ <person>
+ <name>Lewis</name>
+ <surname>Guthrie</surname>
+ <email>neque.Nullam(a)Nuncpulvinararcu.edu</email>
+ </person>
+ <person>
+ <name>Sandra</name>
+ <surname>Cannon</surname>
+ <email>lobortis.nisi.nibh(a)luctuslobortisClass.com</email>
+ </person>
+ <person>
+ <name>Daria</name>
+ <surname>Page</surname>
+ <email>Aenean.sed.pede(a)facilisis.edu</email>
+ </person>
+ <person>
+ <name>Mohammad</name>
+ <surname>Soto</surname>
+ <email>blandit(a)aliquamarcuAliquam.org</email>
+ </person>
+ <person>
+ <name>Kerry</name>
+ <surname>Lowery</surname>
+ <email>vitae(a)mauriserateget.edu</email>
+ </person>
+ <person>
+ <name>Quinlan</name>
+ <surname>Roy</surname>
+ <email>est.ac(a)mollisvitaeposuere.com</email>
+ </person>
+ <person>
+ <name>Patricia</name>
+ <surname>Kirkland</surname>
+ <email>ipsum.dolor(a)orci.org</email>
+ </person>
+ <person>
+ <name>Janna</name>
+ <surname>Banks</surname>
+ <email>id.mollis.nec(a)eteuismodet.org</email>
+ </person>
+ <person>
+ <name>Lucius</name>
+ <surname>William</surname>
+ <email>sem(a)Nullamlobortis.com</email>
+ </person>
+ <person>
+ <name>Ira</name>
+ <surname>Buck</surname>
+ <email>pede.nonummy(a)dapibusgravidaAliquam.ca</email>
+ </person>
+ <person>
+ <name>Shellie</name>
+ <surname>Charles</surname>
+ <email>est(a)lobortisultricesVivamus.org</email>
+ </person>
+ <person>
+ <name>Stewart</name>
+ <surname>Cabrera</surname>
+ <email>libero(a)feugiat.com</email>
+ </person>
+ <person>
+ <name>April</name>
+ <surname>Sheppard</surname>
+ <email>sit(a)seddictumeleifend.ca</email>
+ </person>
+ <person>
+ <name>Gail</name>
+ <surname>Rollins</surname>
+ <email>odio(a)Proinnonmassa.ca</email>
+ </person>
+ <person>
+ <name>Ross</name>
+ <surname>Levy</surname>
+ <email>sit.amet.ultricies(a)Quisqueliberolacus.com</email>
+ </person>
+ <person>
+ <name>Hadley</name>
+ <surname>Mccormick</surname>
+ <email>vitae.posuere.at(a)enimnonnisi.org</email>
+ </person>
+ <person>
+ <name>Susan</name>
+ <surname>Banks</surname>
+ <email>interdum(a)nislsemconsequat.org</email>
+ </person>
+ <person>
+ <name>Nash</name>
+ <surname>Nolan</surname>
+ <email>convallis.dolor(a)enimSed.ca</email>
+ </person>
+ <person>
+ <name>Gretchen</name>
+ <surname>Carson</surname>
+ <email>elit.dictum.eu(a)temporarcuVestibulum.ca</email>
+ </person>
+ <person>
+ <name>Harper</name>
+ <surname>Hull</surname>
+ <email>eget(a)imperdiet.edu</email>
+ </person>
+ <person>
+ <name>Porter</name>
+ <surname>Benson</surname>
+ <email>tempus.non(a)Aenean.org</email>
+ </person>
+ <person>
+ <name>Xenos</name>
+ <surname>Tate</surname>
+ <email>blandit(a)antebibendum.org</email>
+ </person>
+ <person>
+ <name>Ali</name>
+ <surname>Carver</surname>
+ <email>Nulla.aliquet(a)ornare.org</email>
+ </person>
+ <person>
+ <name>Zachery</name>
+ <surname>Shepherd</surname>
+ <email>vitae.erat(a)sed.edu</email>
+ </person>
+ <person>
+ <name>Garrett</name>
+ <surname>Leach</surname>
+ <email>risus(a)quisurna.org</email>
+ </person>
+ <person>
+ <name>Mufutau</name>
+ <surname>Greer</surname>
+ <email>bibendum(a)luctus.com</email>
+ </person>
+ <person>
+ <name>Ryan</name>
+ <surname>Bryant</surname>
+ <email>turpis(a)purus.edu</email>
+ </person>
+ <person>
+ <name>Lacey</name>
+ <surname>Riley</surname>
+ <email>sed.turpis.nec(a)molestieSed.ca</email>
+ </person>
+ <person>
+ <name>Tiger</name>
+ <surname>Ryan</surname>
+ <email>lorem(a)vel.com</email>
+ </person>
+ <person>
+ <name>Upton</name>
+ <surname>Sullivan</surname>
+ <email>amet(a)Proin.com</email>
+ </person>
+ <person>
+ <name>Juliet</name>
+ <surname>Tate</surname>
+ <email>pede.Cum(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Dieter</name>
+ <surname>Bowman</surname>
+ <email>lorem.eu(a)pellentesqueegetdictum.com</email>
+ </person>
+ <person>
+ <name>Jelani</name>
+ <surname>Knapp</surname>
+ <email>Nulla(a)Morbi.org</email>
+ </person>
+ <person>
+ <name>Martena</name>
+ <surname>Leblanc</surname>
+ <email>arcu.Vestibulum.ut(a)quamquis.edu</email>
+ </person>
+ <person>
+ <name>Megan</name>
+ <surname>Hull</surname>
+ <email>eu.nulla(a)amalesuada.com</email>
+ </person>
+ <person>
+ <name>Ginger</name>
+ <surname>Mcpherson</surname>
+ <email>dui.augue(a)Innecorci.com</email>
+ </person>
+ <person>
+ <name>Kylan</name>
+ <surname>Gilmore</surname>
+ <email>urna.Ut.tincidunt(a)aliquetsemut.com</email>
+ </person>
+ <person>
+ <name>Carlos</name>
+ <surname>King</surname>
+ <email>fermentum(a)lacus.com</email>
+ </person>
+ <person>
+ <name>Irma</name>
+ <surname>Blake</surname>
+ <email>Aliquam.nec(a)adipiscingelit.com</email>
+ </person>
+ <person>
+ <name>Tad</name>
+ <surname>Allen</surname>
+ <email>rhoncus.Proin.nisl(a)vehiculaaliquet.ca</email>
+ </person>
+ <person>
+ <name>Fiona</name>
+ <surname>Kline</surname>
+ <email>risus(a)gravidasagittisDuis.ca</email>
+ </person>
+ <person>
+ <name>Nell</name>
+ <surname>Franco</surname>
+ <email>blandit(a)viverraMaecenasiaculis.org</email>
+ </person>
+ <person>
+ <name>Scarlet</name>
+ <surname>Hall</surname>
+ <email>tincidunt(a)Nullamsuscipit.com</email>
+ </person>
+ <person>
+ <name>Zane</name>
+ <surname>Mccray</surname>
+ <email>volutpat.Nulla(a)malesuadafringilla.edu</email>
+ </person>
+ <person>
+ <name>Connor</name>
+ <surname>Salas</surname>
+ <email>Sed.nulla.ante(a)eu.com</email>
+ </person>
+ <person>
+ <name>Carlos</name>
+ <surname>Hunt</surname>
+ <email>Nam(a)nequevenenatislacus.org</email>
+ </person>
+ <person>
+ <name>Lane</name>
+ <surname>Andrews</surname>
+ <email>a.sollicitudin(a)inconsequat.org</email>
+ </person>
+ <person>
+ <name>Shana</name>
+ <surname>Ballard</surname>
+ <email>elementum(a)nibhlacinia.org</email>
+ </person>
+ <person>
+ <name>Conan</name>
+ <surname>Bradshaw</surname>
+ <email>vel.arcu.Curabitur(a)eratnonummyultricies.ca</email>
+ </person>
+ <person>
+ <name>Colleen</name>
+ <surname>Brooks</surname>
+ <email>erat.volutpat(a)cubiliaCurae;.edu</email>
+ </person>
+ <person>
+ <name>Francis</name>
+ <surname>Hardy</surname>
+ <email>sit.amet.luctus(a)dignissimlacus.com</email>
+ </person>
+ <person>
+ <name>Reuben</name>
+ <surname>Rodriguez</surname>
+ <email>natoque.penatibus.et(a)euaccumsansed.com</email>
+ </person>
+ <person>
+ <name>Iris</name>
+ <surname>Reid</surname>
+ <email>sed(a)Quisquepurussapien.edu</email>
+ </person>
+ <person>
+ <name>Phillip</name>
+ <surname>Schmidt</surname>
+ <email>ut(a)tortornibhsit.com</email>
+ </person>
+ <person>
+ <name>Jonas</name>
+ <surname>Crane</surname>
+ <email>ac.mi(a)luctusCurabitur.org</email>
+ </person>
+ <person>
+ <name>Abbot</name>
+ <surname>Terry</surname>
+ <email>fringilla(a)Crasconvallisconvallis.com</email>
+ </person>
+</persons>
+
\ No newline at end of file
Modified: trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -265,6 +265,10 @@
<id>dataTableEdit</id>
<name>Data Table Edit</name>
</sample>
+ <sample new="true">
+ <id>arrangeableModel</id>
+ <name>Arrangeable Model Sample</name>
+ </sample>
</samples>
</demo>
<demo>
Deleted: trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Deleted: trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Modified: trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -3,13 +3,9 @@
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
version="2.0">
- <application>
- <!-- system-event-listener>
- <system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
- </system-event-listener -->
- </application>
-
+ <factory>
+ <lifecycle-factory>org.richfaces.demo.arrangeablemodel.PersistenceLifecycleFactory</lifecycle-factory>
+ </factory>
<managed-bean>
<managed-bean-name>opBean1</managed-bean-name>
<managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
Copied: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition>
+ <p>DESC</p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+</ui:composition>
+</html>
Copied: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form id="form">
+ <rich:dataTable keepSaved="true" id="richTable" var="record" value="#{personBean.dataModel}" rows="20">
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="name" />
+ </ui:include>
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="surname" />
+ </ui:include>
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="email" />
+ </ui:include>
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller" />
+ </f:facet>
+ </rich:dataTable>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Copied: trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml (from rev 22443, branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml)
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml (rev 0)
+++ trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition>
+ <rich:column sortBy="#{property}"
+ sortOrder="#{bean.sortOrders[property]}"
+ filterValue="#{bean.filterValues[property]}"
+ filterExpression="#{property}">
+
+ <f:facet name="header">
+ <h:commandLink style="color: white;" action="#{bean.toggleSort}">
+ #{bean.sortOrders[property]}
+ <a4j:ajax render="richTable" />
+ <f:setPropertyActionListener target="#{bean.sortProperty}" value="#{property}" />
+ </h:commandLink>
+ <br />
+ <h:inputText value="#{bean.filterValues[property]}">
+ <a4j:ajax render="richTable@body scroller" event="keyup" />
+ </h:inputText>
+ </f:facet>
+
+ <h:outputText value="#{record[property]}" />
+ </rich:column>
+</ui:composition>
+</html>
Modified: trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>travelcurve</application>
- <version>42</version>
+ <version>49</version>
<sessions-enabled>true</sessions-enabled>
<system-properties>
Modified: trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-04-27 14:03:10 UTC (rev 22445)
+++ trunk/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-04-27 14:27:41 UTC (rev 22446)
@@ -1,20 +1,23 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- version="2.0" metadata-complete="true">
-
- <application>
- <!-- system-event-listener>
- <system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
- </system-event-listener -->
- </application>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config metadata-complete="true" version="2.0"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<component>
<component-type>syntaxHighlighter</component-type>
<component-class>org.richfaces.demo.components.sh.SyntaxHighlighter</component-class>
</component>
+ <managed-bean>
+ <managed-bean-name>personBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.arrangeablemodel.PersonBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean eager="true">
+ <managed-bean-name>persistenceService</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.arrangeablemodel.PersistenceService</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
<managed-bean>
<managed-bean-name>functionBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.function.FunctionBean</managed-bean-class>
@@ -253,4 +256,7 @@
<managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <factory>
+ <lifecycle-factory>org.richfaces.demo.arrangeablemodel.PersistenceLifecycleFactory</lifecycle-factory>
+ </factory>
</faces-config>
13 years, 8 months
JBoss Rich Faces SVN: r22445 - in trunk/ui: common/ui/src/main/java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-04-27 10:03:10 -0400 (Wed, 27 Apr 2011)
New Revision: 22445
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
Log:
https://issues.jboss.org/browse/RF-10824 - behaviors for row* events are fixed.
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-04-27 13:56:01 UTC (rev 22444)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/component/UIDataAdaptor.java 2011-04-27 14:03:10 UTC (rev 22445)
@@ -22,56 +22,29 @@
package org.richfaces.component;
-import static org.richfaces.component.util.Strings.NamingContainerDataHolder.SEPARATOR_CHAR_JOINER;
+import org.ajax4jsf.component.IterationStateHolder;
+import org.ajax4jsf.model.*;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.context.ExtendedVisitContext;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
-import java.text.MessageFormat;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
import javax.faces.application.FacesMessage;
-import javax.faces.component.ContextCallback;
-import javax.faces.component.EditableValueHolder;
-import javax.faces.component.NamingContainer;
-import javax.faces.component.PartialStateHolder;
-import javax.faces.component.StateHelper;
-import javax.faces.component.StateHolder;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-import javax.faces.component.UIForm;
-import javax.faces.component.UINamingContainer;
-import javax.faces.component.UIViewRoot;
-import javax.faces.component.UniqueIdVendor;
+import javax.faces.component.*;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ComponentSystemEvent;
-import javax.faces.event.ComponentSystemEventListener;
-import javax.faces.event.FacesEvent;
-import javax.faces.event.ListenerFor;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PostValidateEvent;
-import javax.faces.event.PreRenderComponentEvent;
-import javax.faces.event.PreValidateEvent;
+import javax.faces.event.*;
+import java.text.MessageFormat;
+import java.util.*;
-import org.ajax4jsf.component.IterationStateHolder;
-import org.ajax4jsf.model.DataComponentState;
-import org.ajax4jsf.model.DataVisitResult;
-import org.ajax4jsf.model.DataVisitor;
-import org.ajax4jsf.model.ExtendedDataModel;
-import org.ajax4jsf.model.Range;
-import org.richfaces.cdk.annotations.Attribute;
-import org.richfaces.context.ExtendedVisitContext;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
+import static org.richfaces.component.util.Strings.NamingContainerDataHolder.SEPARATOR_CHAR_JOINER;
/**
* Base class for iterable components, like dataTable, Tomahawk dataList, Facelets repeat, tree etc., with support for
@@ -81,7 +54,7 @@
*/
@ListenerFor(systemEventClass = PreRenderComponentEvent.class)
public abstract class UIDataAdaptor extends UIComponentBase implements NamingContainer,
- UniqueIdVendor, IterationStateHolder, ComponentSystemEventListener {
+ UniqueIdVendor, IterationStateHolder, ComponentSystemEventListener {
/**
* <p>The standard component family for this component.</p>
@@ -135,7 +108,7 @@
//TODO nick - PSH support?
private DataComponentState componentState = null;
private ExtendedDataModel<?> extendedDataModel = null;
-
+
private Object rowKey = null;
private String containerClientId;
@@ -146,7 +119,6 @@
/**
* @author Nick Belaevski
- *
*/
private final class DataVisitorForVisitTree implements DataVisitor {
/**
@@ -184,12 +156,12 @@
return DataVisitResult.STOP;
}
-
+
if (result == VisitResult.ACCEPT) {
result = visitDataChildrenMetaComponents((ExtendedVisitContext) visitContext, callback);
if (VisitResult.COMPLETE.equals(result)) {
visitResult = true;
-
+
return DataVisitResult.STOP;
}
}
@@ -265,23 +237,23 @@
* row number in sequence data, but, for example - path to current node in
* tree.
*
- * @param faces -
+ * @param facesContext -
* current FacesContext
- * @param key new key value.
+ * @param rowKey new key value.
*/
public void setRowKey(FacesContext facesContext, Object rowKey) {
this.saveChildState(facesContext);
-
+
this.rowKey = rowKey;
-
+
getExtendedDataModel().setRowKey(rowKey);
-
+
this.containerClientId = null;
boolean rowSelected = (rowKey != null) && isRowAvailable();
setupVariable(facesContext, rowSelected);
-
+
this.restoreChildState(facesContext);
}
@@ -289,7 +261,7 @@
* Save values of {@link EditableValueHolder} fields before change current
* row.
*
- * @param faces
+ * @param facesContext
*/
protected void saveChildState(FacesContext facesContext) {
Iterator<UIComponent> itr = dataChildren();
@@ -301,8 +273,6 @@
/**
* @param facesContext
- * @param next
- * @param childState
*/
protected void saveChildState(FacesContext facesContext, UIComponent component) {
@@ -362,6 +332,16 @@
}
}
+ protected Iterator<UIComponent> allFixedChildren() {
+ if (getFacetCount() > 0) {
+ List<UIComponent> children = new ArrayList<UIComponent>();
+
+ return getFacets().values().iterator();
+ } else {
+ return Collections.<UIComponent>emptyList().iterator();
+ }
+ }
+
/**
* @param facesContext
*/
@@ -378,8 +358,6 @@
* row.
*
* @param facesContext
- * @param next
- * @param childState
*/
protected void restoreChildState(FacesContext facesContext, UIComponent component) {
String id = component.getId();
@@ -389,7 +367,7 @@
SavedState savedState = null;
@SuppressWarnings("unchecked")
Map<String, SavedState> savedStatesMap = (Map<String, SavedState>) getStateHelper()
- .get(PropertyKeys.childState);
+ .get(PropertyKeys.childState);
if (savedStatesMap != null) {
savedState = savedStatesMap.get(component.getClientId(facesContext));
@@ -433,7 +411,7 @@
protected FacesEvent wrapEvent(FacesEvent event) {
return new RowKeyContextEventWrapper(this, event, getRowKey());
}
-
+
@Override
public void queueEvent(FacesEvent event) {
super.queueEvent(wrapEvent(event));
@@ -447,7 +425,7 @@
public void broadcast(FacesEvent event) throws AbortProcessingException {
if (event instanceof RowKeyContextEventWrapper) {
RowKeyContextEventWrapper eventWrapper = (RowKeyContextEventWrapper) event;
-
+
eventWrapper.broadcast(getFacesContext());
} else {
super.broadcast(event);
@@ -520,9 +498,10 @@
/**
* Boolean attribute that defines whether this iteration component will reset saved children's state
* before rendering. By default state is reset if there are no faces messages with severity error or higher.
+ *
* @return
*/
-
+
@Attribute
public boolean isKeepSaved() {
Object value = getStateHelper().eval(PropertyKeys.keepSaved);
@@ -546,7 +525,6 @@
* Changed: does not check for row availability now
*
* @param faces current faces context
- * @param localModel
* @param rowSelected
*/
protected void setupVariable(FacesContext faces, boolean rowSelected) {
@@ -587,7 +565,7 @@
componentState = createComponentState();
if ((componentStateExpression != null)
- && !componentStateExpression.isReadOnly(getFacesContext().getELContext())) {
+ && !componentStateExpression.isReadOnly(getFacesContext().getELContext())) {
componentStateExpression.setValue(getFacesContext().getELContext(), componentState);
}
}
@@ -611,7 +589,6 @@
/**
* @param var
* @param attrs
- * @param rowData
*/
private void removeVariable(String var, Map<String, Object> attrs) {
if (var != null) {
@@ -644,7 +621,7 @@
private String getRowKeyAsString(FacesContext facesContext, Object rowKey) {
assert rowKey != null;
-
+
Converter rowKeyConverter = getRowKeyConverter();
if (rowKeyConverter == null) {
// Create default converter for a row key.
@@ -656,18 +633,18 @@
setRowKeyConverter(rowKeyConverter);
}
}
-
+
if (rowKeyConverter != null) {
return rowKeyConverter.getAsString(facesContext, this, rowKey);
} else {
return rowKey.toString();
}
}
-
+
public String getContainerClientId() {
return getContainerClientId(getFacesContext());
}
-
+
@Override
public String getContainerClientId(FacesContext facesContext) {
if (facesContext == null) {
@@ -676,18 +653,18 @@
if (null == containerClientId) {
containerClientId = super.getContainerClientId(facesContext);
-
+
Object rowKey = getRowKey();
-
+
if (rowKey != null) {
String rowKeyString = getRowKeyAsString(facesContext, rowKey);
containerClientId = SEPARATOR_CHAR_JOINER.join(containerClientId, rowKeyString);
- }
+ }
}
return containerClientId;
}
-
+
/**
* Save current state of data variable.
*
@@ -820,7 +797,7 @@
pushComponentToEL(faces, this);
preDecode(faces);
- this.iterate(faces, decodeVisitor);
+ processDecodesChildren(faces);
this.decode(faces);
popComponentFromEL(faces);
}
@@ -834,7 +811,7 @@
Application app = faces.getApplication();
app.publishEvent(faces, PreValidateEvent.class, this);
preValidate(faces);
- this.iterate(faces, validateVisitor);
+ processValidatesChildren(faces);
app.publishEvent(faces, PostValidateEvent.class, this);
popComponentFromEL(faces);
}
@@ -846,7 +823,7 @@
pushComponentToEL(faces, this);
preUpdate(faces);
- this.iterate(faces, updateVisitor);
+ processUpdatesChildren(faces);
doUpdate();
@@ -854,9 +831,21 @@
}
protected void doUpdate() {
-
+
}
-
+
+ protected void processDecodesChildren(FacesContext faces) {
+ this.iterate(faces, decodeVisitor);
+ }
+
+ protected void processValidatesChildren(FacesContext faces) {
+ this.iterate(faces, validateVisitor);
+ }
+
+ protected void processUpdatesChildren(FacesContext faces) {
+ this.iterate(faces, updateVisitor);
+ }
+
@Override
public void setId(String id) {
super.setId(id);
@@ -886,7 +875,7 @@
if (stateObject != null) {
DataAdaptorIterationState iterationState = (DataAdaptorIterationState) stateObject;
iterationState.restoreComponentState(this);
-
+
this.componentState = iterationState.getComponentState();
this.extendedDataModel = iterationState.getDataModel();
} else {
@@ -1006,7 +995,7 @@
@Override
public void restoreState(FacesContext context, Object stateObject) {
if (stateObject == null) {
- return ;
+ return;
}
Object[] state = (Object[]) stateObject;
@@ -1039,7 +1028,7 @@
// if clientId.startsWith(baseId + separatorChar)
if (clientId.startsWith(baseId) && (clientId.length() > baseId.length())
- && (clientId.charAt(baseId.length()) == separatorChar)) {
+ && (clientId.charAt(baseId.length()) == separatorChar)) {
return true;
}
@@ -1047,8 +1036,7 @@
}
@Override
- public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback)
- throws FacesException {
+ public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException {
if ((null == context) || (null == clientId) || (null == callback)) {
throw new NullPointerException();
@@ -1138,6 +1126,91 @@
return found;
}
+ public boolean invokeOnRow(FacesContext context, String clientId, ContextCallback callback) {
+ if ((null == context) || (null == clientId) || (null == callback)) {
+ throw new NullPointerException();
+ }
+
+ String baseId = getClientId(context);
+
+ if (!matchesBaseId(clientId, baseId, UINamingContainer.getSeparatorChar(context))) {
+ return false;
+ }
+
+ String rowId = clientId.substring(baseId.length() + 1);
+ if (rowId.indexOf(UINamingContainer.getSeparatorChar(context)) >= 0) {
+ return false;
+ }
+
+
+ Object oldRowKey = getRowKey();
+
+ captureOrigValue(context);
+
+ try {
+
+ setRowKey(context, null);
+
+ Iterator<UIComponent> fixedChildrenItr = fixedChildren();
+
+ while (fixedChildrenItr.hasNext()) {
+ if (checkAllFixedChildren(fixedChildrenItr.next(), rowId)) {
+ return false;
+ }
+ }
+
+ Object newRowKey = null;
+
+ if (rowId != null) {
+ Converter keyConverter = getRowKeyConverter();
+
+ if (null != keyConverter) {
+ try {
+ newRowKey = keyConverter.getAsObject(context, this, rowId);
+ } catch (ConverterException e) {
+ LOG.warn(e);
+ }
+ }
+ }
+
+ setRowKey(context, newRowKey);
+ callback.invokeContextCallback(context, this);
+ } catch (Exception e) {
+ throw new FacesException(e);
+ } finally {
+ try {
+ setRowKey(context, oldRowKey);
+ restoreOrigValue(context);
+ } catch (Exception e) {
+ LOG.error(e.getMessage(), e);
+ }
+ }
+
+ return true;
+
+ }
+
+ private boolean checkAllFixedChildren(UIComponent fixedChild, String id) {
+ if(fixedChild.getId().equals(id)) {
+ return true;
+ }
+
+ if (fixedChild instanceof NamingContainer) {
+ return false;
+ }
+
+ for (UIComponent uiComponent : fixedChild.getChildren()) {
+ if (checkAllFixedChildren(uiComponent, id)) {
+ return true;
+ }
+ }
+ for (UIComponent uiComponent : fixedChild.getFacets().values()) {
+ if (checkAllFixedChildren(uiComponent, id)) {
+ return true;
+ }
+ }
+ return false;
+ }
// Tests whether we need to visit our children as part of
// a tree visit
private boolean doVisitChildren(VisitContext context, boolean visitRows) {
@@ -1185,7 +1258,7 @@
protected VisitResult visitDataChildrenMetaComponents(ExtendedVisitContext extendedVisitContext, VisitCallback callback) {
return VisitResult.ACCEPT;
}
-
+
protected boolean visitDataChildren(VisitContext visitContext, VisitCallback callback, boolean visitRows) {
if (visitRows) {
@@ -1244,7 +1317,7 @@
if (visitRows) {
setRowKey(facesContext, null);
}
-
+
if (visitFixedChildren(visitContext, callback)) {
return true;
}
@@ -1258,7 +1331,7 @@
return false;
} else {
VisitContext directChildrenVisitContext =
- extendedVisitContext.createNamingContainerVisitContext(this, directSubtreeIdsToVisit);
+ extendedVisitContext.createNamingContainerVisitContext(this, directSubtreeIdsToVisit);
if (visitRows) {
setRowKey(facesContext, null);
@@ -1296,7 +1369,7 @@
}
/**
- * @param facesContext
+ * @param context
* @return
*/
private boolean requiresRowIteration(FacesContext context) {
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-27 13:56:01 UTC (rev 22444)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/RenderKitUtils.java 2011-04-27 14:03:10 UTC (rev 22445)
@@ -21,17 +21,9 @@
*/
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
+import org.ajax4jsf.javascript.JSFunctionDefinition;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.renderkit.ComponentAttribute.Kind;
import javax.faces.application.Application;
import javax.faces.application.Resource;
@@ -45,11 +37,10 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.util.*;
-import org.ajax4jsf.javascript.JSFunctionDefinition;
-import org.ajax4jsf.javascript.ScriptUtils;
-import org.richfaces.renderkit.ComponentAttribute.Kind;
-
/**
* @author Nick Belaevski
*
@@ -781,4 +772,8 @@
}
}
+ public static String getBehaviorSourceId(FacesContext facesContext) {
+ return facesContext.getExternalContext().getRequestParameterMap().get(BEHAVIOR_SOURCE_ID);
+ }
+
}
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2011-04-27 13:56:01 UTC (rev 22444)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2011-04-27 14:03:10 UTC (rev 22445)
@@ -21,12 +21,7 @@
package org.richfaces.renderkit.util;
-import java.util.Map;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.behavior.ClientBehaviorContext;
-import javax.faces.context.FacesContext;
-
+import com.google.common.base.Strings;
import org.ajax4jsf.component.AjaxClientBehavior;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
@@ -35,7 +30,10 @@
import org.richfaces.renderkit.AjaxOptions;
import org.richfaces.renderkit.HtmlConstants;
-import com.google.common.base.Strings;
+import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehaviorContext;
+import javax.faces.context.FacesContext;
+import java.util.Map;
/**
* @author shura
* <p/>
@@ -461,30 +459,31 @@
* Create call to Ajax Submit function with first two parameters
*
* @param facesContext
- * @param uiComponent
- * @param functionName
+ * @param component
* @return
*/
public static AjaxFunction buildAjaxFunction(FacesContext facesContext, UIComponent component) {
return new AjaxFunction(component.getClientId(facesContext), buildEventOptions(facesContext, component));
}
+
public static AjaxFunction buildAjaxFunction(ClientBehaviorContext behaviorContext, AjaxClientBehavior behavior) {
Object source;
-
+
AjaxOptions options = buildAjaxOptions(behaviorContext, behavior);
if (behaviorContext.getSourceId() != null) {
source = behaviorContext.getSourceId();
} else {
source = JSReference.THIS;
-
+
FacesContext facesContext = behaviorContext.getFacesContext();
UIComponent component = behaviorContext.getComponent();
-
- options.set("sourceId", component.getClientId(facesContext));
+
+ options.setAjaxComponent(component.getClientId(facesContext));
+ options.set("sourceId", source);
}
-
+
return new AjaxFunction(source, options);
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-04-27 13:56:01 UTC (rev 22444)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableBaseRenderer.java 2011-04-27 14:03:10 UTC (rev 22445)
@@ -22,19 +22,18 @@
package org.richfaces.renderkit;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
+import org.richfaces.component.Row;
+import org.richfaces.component.UIDataTableBase;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
-
/**
* @author Anton Belevich
*
@@ -122,6 +121,7 @@
public void encodeFirstRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HtmlConstants.TR_ELEMENT, component);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, parentId + ":" + currentRow, null);
String styleClass = concatClasses(getRowClass(context, parentId), getFirstRowClass(context, parentId), component.getAttributes().get(ROW_CLASS));
if (styleClass.length() > 0) {
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null);
@@ -134,6 +134,8 @@
public void encodeRowStart(ResponseWriter writer, FacesContext context, String parentId, int currentRow, UIComponent component) throws IOException {
writer.startElement(HtmlConstants.TR_ELEMENT, component);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, parentId + ":" + currentRow, null);
+
String styleClass = concatClasses(getRowClass(context, parentId), component.getAttributes().get(ROW_CLASS));
if (styleClass.length() > 0) {
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null);
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-04-27 13:56:01 UTC (rev 22444)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataTableRenderer.java 2011-04-27 14:03:10 UTC (rev 22445)
@@ -24,22 +24,23 @@
import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.component.AbstractCollapsibleSubTable;
-import org.richfaces.component.AbstractDataTable;
-import org.richfaces.component.Row;
-import org.richfaces.component.UIDataTableBase;
+import org.richfaces.component.*;
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.renderkit.util.AjaxRendererUtils;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
+import javax.faces.component.ContextCallback;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
+import javax.faces.component.behavior.ClientBehavior;
+import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
/**
@@ -54,6 +55,9 @@
})
public class DataTableRenderer extends AbstractTableRenderer {
+ private static final String BEHAVIOR_EVENT_NAME = "javax.faces.behavior.event";
+ private static final String ROW = "row";
+
private class DataTableHiddenEncodeStrategy implements EncodeStrategy {
public void begin(ResponseWriter writer, FacesContext context, UIComponent component, Object[] params) throws IOException {
AbstractDataTable dataTable = (AbstractDataTable)component;
@@ -82,7 +86,48 @@
public void end(ResponseWriter writer, FacesContext context, UIComponent component, Object [] params) throws IOException {
}
}
-
+
+ protected void doDecode(FacesContext context, final UIComponent component) {
+ super.doDecode(context, component);
+
+ if ((null == context) || (null == component)) {
+ throw new NullPointerException();
+ }
+
+ if (component instanceof ClientBehaviorHolder) {
+ final Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+
+ if (behaviors == null || behaviors.isEmpty()) {
+ return;
+ }
+
+ Map<String, String> parametersMap = context.getExternalContext().getRequestParameterMap();
+ final String behaviorEvent = parametersMap.get(BEHAVIOR_EVENT_NAME);
+
+ if (!behaviorEvent.startsWith(ROW)){
+ return;
+ }
+
+ String behaviorSourceId = RenderKitUtils.getBehaviorSourceId(context);
+
+ ((UIDataAdaptor) component).invokeOnRow(context, behaviorSourceId, new ContextCallback() {
+
+ public void invokeContextCallback(FacesContext context, UIComponent target) {
+ if (target.equals(component)) {
+ List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent);
+ if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) {
+ for (ClientBehavior behavior : behaviorsForEvent) {
+ behavior.decode(context, component);
+ }
+ }
+ }
+ }
+ });
+ }
+ }
+
+
+
public void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable)
throws IOException {
if (dataTable instanceof AbstractDataTable) {
13 years, 8 months
JBoss Rich Faces SVN: r22444 - in trunk: ui/validator/ui/src/main/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-04-27 09:56:01 -0400 (Wed, 27 Apr 2011)
New Revision: 22444
Modified:
trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSFunctionDefinition.java
trunk/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java
Log:
https://issues.jboss.org/browse/RF-10940
Client-side validation function is fixed, JSFunctionDefinition is refactored
Modified: trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSFunctionDefinition.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSFunctionDefinition.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/core/api/src/main/java/org/ajax4jsf/javascript/JSFunctionDefinition.java 2011-04-27 13:56:01 UTC (rev 22444)
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.List;
/**
@@ -35,6 +34,18 @@
*
*/
public class JSFunctionDefinition extends ScriptStringBase implements ScriptString {
+ protected static final String FUNCTION = "function";
+ protected static final String EQUALS = "=";
+ protected static final String DOT = ".";
+ protected static final String COMMA = ",";
+ protected static final String EMPTY_STRING = " ";
+ protected static final String LEFT_CURLY_BRACKET = "{";
+ protected static final String RIGHT_CURLY_BRACKET = "}";
+ protected static final String LEFT_ROUND_BRACKET = "(";
+ protected static final String RIGHT_ROUND_BRACKET = ")";
+ protected static final String LEFT_SQUARE_BRACKET = "[";
+ protected static final String RIGHT_SQUARE_BRACKET = "]";
+ protected static final String COLON = ":";
private List<Object> parameters = new ArrayList<Object>();
private StringBuffer body = new StringBuffer();
private String name;
@@ -58,34 +69,12 @@
}
public void appendScript(Appendable target) throws IOException {
- target.append("function");
-
- if (null != name) {
- target.append(" ").append(name);
- }
-
- target.append("(");
-
- boolean first = true;
-
- for (Iterator<Object> param = parameters.iterator(); param.hasNext(); ) {
- Object element = param.next();
-
- if (!first) {
- target.append(',');
- }
-
- target.append(element.toString());
- first = false;
- }
-
- target.append("){");appendBody(target);
- target.append("}");
+ appendFunctionName(target);
+ appendParameters(target);
+ target.append(LEFT_CURLY_BRACKET);
+ appendBody(target);
+ target.append(RIGHT_CURLY_BRACKET);
}
-
- protected void appendBody(Appendable target) throws IOException {
- target.append(body);
- }
/**
* @return the name
@@ -101,4 +90,32 @@
this.name = name;
}
+ protected void appendFunctionName(Appendable target) throws IOException {
+ target.append(FUNCTION);
+
+ if (null != name) {
+ target.append(EMPTY_STRING).append(name);
+ }
+ }
+
+ protected void appendBody(Appendable target) throws IOException {
+ target.append(body);
+ }
+
+ private void appendParameters(Appendable target) throws IOException {
+ target.append(LEFT_ROUND_BRACKET);
+
+ boolean first = true;
+
+ for (Object element : parameters) {
+ if (!first) {
+ target.append(COMMA);
+ }
+
+ target.append(element.toString());
+ first = false;
+ }
+
+ target.append(RIGHT_ROUND_BRACKET);
+ }
}
Modified: trunk/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java
===================================================================
--- trunk/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java 2011-04-27 11:15:12 UTC (rev 22443)
+++ trunk/ui/validator/ui/src/main/java/org/richfaces/renderkit/html/ClientOnlyScript.java 2011-04-27 13:56:01 UTC (rev 22444)
@@ -1,18 +1,13 @@
package org.richfaces.renderkit.html;
+import com.google.common.collect.*;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.resource.ResourceKey;
+
import java.io.IOException;
import java.util.Collection;
import java.util.LinkedHashSet;
-import org.ajax4jsf.javascript.ScriptUtils;
-import org.richfaces.resource.ResourceKey;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-import com.google.common.collect.UnmodifiableIterator;
-
public class ClientOnlyScript extends ValidatorScriptBase {
public static final ResourceKey CSV_RESOURCE = ResourceKey.create("csv.reslib", "org.richfaces");
@@ -41,23 +36,32 @@
}
@Override
+ public void appendFunctionName(Appendable target) throws IOException {
+ target.append("window")
+ .append(DOT)
+ .append(super.getName())
+ .append(EQUALS)
+ .append(FUNCTION);
+ }
+
+ @Override
protected void appendParameters(Appendable target) throws IOException {
if (null != converter) {
- target.append(CONVERTER).append(":");
+ target.append(CONVERTER).append(COLON);
appendConverter(target, converter);
- target.append(",");
+ target.append(COMMA);
}
- target.append(VALIDATORS).append(":[");
+ target.append(VALIDATORS).append(COLON + LEFT_SQUARE_BRACKET);
UnmodifiableIterator<? extends LibraryScriptFunction> iterator = validators.iterator();
while (iterator.hasNext()) {
- LibraryScriptFunction validatorScript = (LibraryScriptFunction) iterator.next();
+ LibraryScriptFunction validatorScript = iterator.next();
appendValidator(target, validatorScript);
if (iterator.hasNext()) {
- target.append(",");
+ target.append(COMMA);
}
}
- target.append("]");
+ target.append(RIGHT_SQUARE_BRACKET);
appendAjaxParameter(target);
}
@@ -66,11 +70,11 @@
}
protected void appendConverter(Appendable target, LibraryScriptFunction converter) throws IOException {
- target.append('{').append("f").append(':').append(converter.getName()).append(',');
- target.append(PARAMS).append(':');ScriptUtils.appendScript(target, converter.getParameters());
- target.append(',');
- target.append(MESSAGE).append(':');ScriptUtils.appendScript(target, converter.getMessage());
- target.append('}');
+ target.append(LEFT_CURLY_BRACKET).append("f").append(COLON).append(converter.getName()).append(COMMA);
+ target.append(PARAMS).append(COLON);ScriptUtils.appendScript(target, converter.getParameters());
+ target.append(COMMA);
+ target.append(MESSAGE).append(COLON);ScriptUtils.appendScript(target, converter.getMessage());
+ target.append(RIGHT_CURLY_BRACKET);
}
protected void appendAjaxParameter(Appendable target) throws IOException {
13 years, 8 months
JBoss Rich Faces SVN: r22443 - in branches/4.0.X/examples/richfaces-showcase: src/main/java/org/richfaces/demo and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-04-27 07:15:12 -0400 (Wed, 27 Apr 2011)
New Revision: 22443
Added:
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java
branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java
branches/4.0.X/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/
branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml
Removed:
branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
Modified:
branches/4.0.X/examples/richfaces-showcase/pom.xml
branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml
Log:
RF-10845
Modified: branches/4.0.X/examples/richfaces-showcase/pom.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/pom.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/pom.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -59,16 +59,30 @@
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.8</version>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
- <version>1.5.6</version>
+ <version>1.5.8</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb-j5</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.6.3.Final</version>
+ </dependency>
</dependencies>
<build>
@@ -151,15 +165,8 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1.1</version>
- <scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jpa_3.0_spec</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.1</version>
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/JPADataModel.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Expression;
+import javax.persistence.criteria.Order;
+import javax.persistence.criteria.Path;
+import javax.persistence.criteria.Root;
+
+import org.ajax4jsf.model.DataVisitor;
+import org.ajax4jsf.model.ExtendedDataModel;
+import org.ajax4jsf.model.Range;
+import org.ajax4jsf.model.SequenceRange;
+import org.richfaces.component.SortOrder;
+import org.richfaces.model.Arrangeable;
+import org.richfaces.model.ArrangeableState;
+import org.richfaces.model.FilterField;
+import org.richfaces.model.SortField;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+
+public abstract class JPADataModel<T> extends ExtendedDataModel<T> implements Arrangeable {
+
+ private EntityManager entityManager;
+
+ private Object rowKey;
+
+ private ArrangeableState arrangeableState;
+
+ private Class<T> entityClass;
+
+ public JPADataModel(EntityManager entityManager, Class<T> entityClass) {
+ super();
+
+ this.entityManager = entityManager;
+ this.entityClass = entityClass;
+ }
+
+ public void arrange(FacesContext context, ArrangeableState state) {
+ arrangeableState = state;
+ }
+
+ @Override
+ public void setRowKey(Object key) {
+ rowKey = key;
+ }
+
+ @Override
+ public Object getRowKey() {
+ return rowKey;
+ }
+
+ private CriteriaQuery<Long> createCountCriteriaQuery() {
+ CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+ CriteriaQuery<Long> criteriaQuery = criteriaBuilder.createQuery(Long.class);
+ Root<T> root = criteriaQuery.from(entityClass);
+
+ Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
+ if (filterCriteria != null) {
+ criteriaQuery.where(filterCriteria);
+ }
+
+ Expression<Long> count = criteriaBuilder.count(root);
+ criteriaQuery.select(count);
+
+ return criteriaQuery;
+ }
+
+ private CriteriaQuery<T> createSelectCriteriaQuery() {
+ CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
+ CriteriaQuery<T> criteriaQuery = criteriaBuilder.createQuery(entityClass);
+ Root<T> root = criteriaQuery.from(entityClass);
+
+ if (arrangeableState != null) {
+
+ List<Order> orders = createOrders(criteriaBuilder, root);
+ if (!orders.isEmpty()) {
+ criteriaQuery.orderBy(orders);
+ }
+
+ Expression<Boolean> filterCriteria = createFilterCriteria(criteriaBuilder, root);
+ if (filterCriteria != null) {
+ criteriaQuery.where(filterCriteria);
+ }
+ }
+
+ return criteriaQuery;
+ }
+
+ private List<Order> createOrders(CriteriaBuilder criteriaBuilder, Root<T> root) {
+ List<Order> orders = Lists.newArrayList();
+ List<SortField> sortFields = arrangeableState.getSortFields();
+ if (sortFields != null && !sortFields.isEmpty()) {
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+
+ for (SortField sortField: sortFields) {
+ String propertyName = (String) sortField.getSortBy().getValue(facesContext.getELContext());
+
+ Path<Object> expression = root.get(propertyName);
+
+ Order jpaOrder;
+ SortOrder sortOrder = sortField.getSortOrder();
+ if (sortOrder == SortOrder.ascending) {
+ jpaOrder = criteriaBuilder.asc(expression);
+ } else if (sortOrder == SortOrder.descending) {
+ jpaOrder = criteriaBuilder.desc(expression);
+ } else {
+ throw new IllegalArgumentException(sortOrder.toString());
+ }
+
+ orders.add(jpaOrder);
+ }
+ }
+
+ return orders;
+ }
+
+ protected ArrangeableState getArrangeableState() {
+ return arrangeableState;
+ }
+
+ protected Class<T> getEntityClass() {
+ return entityClass;
+ }
+
+ protected Expression<Boolean> createFilterCriteriaForField(String propertyName, Object filterValue, Root<T> root, CriteriaBuilder criteriaBuilder) {
+ String stringFilterValue = (String) filterValue;
+ if (Strings.isNullOrEmpty(stringFilterValue)) {
+ return null;
+ }
+
+ stringFilterValue = stringFilterValue.toLowerCase(arrangeableState.getLocale());
+
+ Path<String> expression = root.get(propertyName);
+ Expression<Integer> locator = criteriaBuilder.locate(criteriaBuilder.lower(expression), stringFilterValue, 1);
+ return criteriaBuilder.gt(locator, 0);
+ }
+
+
+ private Expression<Boolean> createFilterCriteria(CriteriaBuilder criteriaBuilder, Root<T> root) {
+ Expression<Boolean> filterCriteria = null;
+ List<FilterField> filterFields = arrangeableState.getFilterFields();
+ if (filterFields != null && !filterFields.isEmpty()) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+
+ for (FilterField filterField : filterFields) {
+ String propertyName = (String) filterField.getFilterExpression().getValue(facesContext.getELContext());
+ Object filterValue = filterField.getFilterValue();
+
+ Expression<Boolean> predicate = createFilterCriteriaForField(propertyName, filterValue, root, criteriaBuilder);
+
+ if (predicate == null) {
+ continue;
+ }
+
+ if (filterCriteria == null) {
+ filterCriteria = predicate.as(Boolean.class);
+ } else {
+ filterCriteria = criteriaBuilder.and(filterCriteria, predicate.as(Boolean.class));
+ }
+ }
+
+ }
+ return filterCriteria;
+ }
+
+ @Override
+ public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument) {
+ CriteriaQuery<T> criteriaQuery = createSelectCriteriaQuery();
+ TypedQuery<T> query = entityManager.createQuery(criteriaQuery);
+
+ SequenceRange sequenceRange = (SequenceRange) range;
+ if (sequenceRange.getFirstRow() >= 0 && sequenceRange.getRows() > 0) {
+ query.setFirstResult(sequenceRange.getFirstRow());
+ query.setMaxResults(sequenceRange.getRows());
+ }
+
+ List<T> data = query.getResultList();
+ for (T t : data) {
+ visitor.process(context, getId(t), argument);
+ }
+ }
+
+
+ @Override
+ public boolean isRowAvailable() {
+ return rowKey != null;
+ }
+
+ @Override
+ public int getRowCount() {
+ CriteriaQuery<Long> criteriaQuery = createCountCriteriaQuery();
+ return entityManager.createQuery(criteriaQuery).getSingleResult().intValue();
+ }
+
+ @Override
+ public T getRowData() {
+ return entityManager.find(entityClass, rowKey);
+ }
+
+ @Override
+ public int getRowIndex() {
+ return -1;
+ }
+
+ @Override
+ public void setRowIndex(int rowIndex) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Object getWrappedData() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void setWrappedData(Object data) {
+ throw new UnsupportedOperationException();
+ }
+
+ //TODO - implement using metadata
+ protected abstract Object getId(T t);
+}
\ No newline at end of file
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycle.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseListener;
+import javax.faces.lifecycle.Lifecycle;
+
+class PersistenceLifecycle extends Lifecycle {
+
+ private static final class PersistenceServiceRef {
+
+ static final PersistenceService PERSISTENCE_SERVICE = (PersistenceService) FacesContext.getCurrentInstance().
+ getExternalContext().getApplicationMap().get("persistenceService");
+
+ private PersistenceServiceRef() {
+ }
+
+ }
+
+ private Lifecycle lifecycle;
+
+ public PersistenceLifecycle(Lifecycle lifecycle) {
+ this.lifecycle = lifecycle;
+ }
+
+ public void addPhaseListener(PhaseListener listener) {
+ lifecycle.addPhaseListener(listener);
+ }
+
+ public PhaseListener[] getPhaseListeners() {
+ return lifecycle.getPhaseListeners();
+ }
+
+ public void removePhaseListener(PhaseListener listener) {
+ lifecycle.removePhaseListener(listener);
+ }
+
+ public void execute(FacesContext context) throws FacesException {
+ try {
+ lifecycle.execute(context);
+ } finally {
+ PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
+ }
+ }
+
+ public void render(FacesContext context) throws FacesException {
+ try {
+ lifecycle.render(context);
+ } finally {
+ PersistenceServiceRef.PERSISTENCE_SERVICE.closeEntityManager();
+ }
+ }
+
+
+}
\ No newline at end of file
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceLifecycleFactory.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.util.Iterator;
+
+import javax.faces.FacesWrapper;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class PersistenceLifecycleFactory extends LifecycleFactory implements FacesWrapper<LifecycleFactory> {
+
+ private LifecycleFactory lifecycleFactory;
+
+ private Lifecycle defaultLifecycle;
+
+ public PersistenceLifecycleFactory(LifecycleFactory lifecycleFactory) {
+ super();
+ this.lifecycleFactory = lifecycleFactory;
+ }
+
+ @Override
+ public void addLifecycle(String lifecycleId, Lifecycle lifecycle) {
+ getWrapped().addLifecycle(lifecycleId, lifecycle);
+ }
+
+ @Override
+ public Lifecycle getLifecycle(String lifecycleId) {
+ if (LifecycleFactory.DEFAULT_LIFECYCLE.equals(lifecycleId)) {
+ if (defaultLifecycle == null) {
+ createDefaultLifecycle();
+ }
+
+ return defaultLifecycle;
+ }
+
+ return lifecycleFactory.getLifecycle(lifecycleId);
+ }
+
+ private void createDefaultLifecycle() {
+ defaultLifecycle = new PersistenceLifecycle(lifecycleFactory.getLifecycle(DEFAULT_LIFECYCLE));
+ }
+
+ @Override
+ public Iterator<String> getLifecycleIds() {
+ return lifecycleFactory.getLifecycleIds();
+ }
+
+}
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersistenceService.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.faces.bean.ApplicationScoped;
+import javax.faces.bean.ManagedBean;
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.EntityTransaction;
+import javax.persistence.Persistence;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Node;
+
+import com.google.common.collect.Lists;
+import com.google.common.io.Closeables;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@ManagedBean(eager = true)
+@ApplicationScoped
+public class PersistenceService {
+
+ private static final Logger LOGGER = Logger.getLogger(PersistenceService.class.getName());
+
+ private EntityManagerFactory entityManagerFactory;
+
+ public EntityManager getEntityManager() {
+ Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
+
+ EntityManager manager = (EntityManager) attributes.get(PersistenceService.class);
+
+ if (manager == null) {
+ manager = entityManagerFactory.createEntityManager();
+ attributes.put(PersistenceService.class, manager);
+ manager.getTransaction().begin();
+ }
+
+ return manager;
+ }
+
+ void closeEntityManager() {
+ Map<Object, Object> attributes = FacesContext.getCurrentInstance().getAttributes();
+
+ EntityManager entityManager = (EntityManager) attributes.remove(PersistenceService.class);
+
+ if (entityManager != null) {
+ try {
+ entityManager.getTransaction().commit();
+ } catch (Exception e) {
+ LOGGER.log(Level.SEVERE, e.getMessage(), e);
+ try {
+ entityManager.getTransaction().rollback();
+ } catch (Exception e1) {
+ LOGGER.log(Level.SEVERE, e1.getMessage(), e1);
+ }
+ } finally {
+ entityManager.close();
+ }
+ }
+ }
+
+ @PostConstruct
+ public void init() {
+ entityManagerFactory = Persistence.createEntityManagerFactory("richfaces-showcase", new Properties());
+
+ EntityManager em = entityManagerFactory.createEntityManager();
+
+ EntityTransaction transaction = em.getTransaction();
+
+ try {
+ transaction.begin();
+
+ for (Person person: parseTestData()) {
+ em.persist(person);
+ }
+
+ transaction.commit();
+ } catch (Exception e) {
+ transaction.rollback();
+ e.printStackTrace();
+ } finally {
+ em.close();
+ }
+ }
+
+ private List<Person> parseTestData() throws Exception {
+ InputStream dataStream = null;
+ try {
+ dataStream = PersistenceService.class.getResourceAsStream("data.xml");
+ DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Node node = documentBuilder.parse(dataStream).getDocumentElement();
+
+ List<Person> persons = Lists.newArrayList();
+
+ for (Node personNode = node.getFirstChild(); personNode != null; personNode = personNode.getNextSibling()) {
+ if (personNode.getNodeType() != Node.ELEMENT_NODE) {
+ continue;
+ }
+
+ Person person = new Person();
+ persons.add(person);
+
+ for (Node personDataNode = personNode.getFirstChild(); personDataNode != null; personDataNode = personDataNode.getNextSibling()) {
+ if (personDataNode.getNodeType() != Node.ELEMENT_NODE) {
+ continue;
+ }
+
+ String nodeName = personDataNode.getNodeName();
+ String text = personDataNode.getTextContent();
+ if ("name".equals(nodeName)) {
+ person.setName(text);
+ } else if ("surname".equals(nodeName)) {
+ person.setSurname(text);
+ } else if ("email".equals(nodeName)) {
+ person.setEmail(text);
+ }
+ }
+ }
+
+ return persons;
+ } finally {
+ Closeables.closeQuietly(dataStream);
+ }
+ }
+
+ @PreDestroy
+ public void destroy() {
+ entityManagerFactory.close();
+ entityManagerFactory = null;
+ }
+
+}
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/Person.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@Entity
+public class Person {
+
+ private String name;
+
+ private String surname;
+
+ private String email;
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ public Person() {
+ }
+
+ public Person(String name) {
+ super();
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getSurname() {
+ return surname;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+}
Added: branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/java/org/richfaces/demo/arrangeablemodel/PersonBean.java 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.demo.arrangeablemodel;
+
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import javax.faces.context.FacesContext;
+import javax.persistence.EntityManager;
+
+import org.richfaces.component.SortOrder;
+
+import com.google.common.collect.Maps;
+
+
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@ManagedBean
+@SessionScoped
+public class PersonBean implements Serializable {
+
+ private static final long serialVersionUID = -5156711102367948040L;
+
+ private static final class PersonDataModel extends JPADataModel<Person> {
+
+ private PersonDataModel(EntityManager entityManager) {
+ super(entityManager, Person.class);
+ }
+
+ @Override
+ protected Object getId(Person t) {
+ return t.getId();
+ }
+ }
+
+ private Map<String, SortOrder> sortOrders = Maps.newHashMapWithExpectedSize(1);
+
+ private Map<String, String> filterValues = Maps.newHashMap();
+
+ private String sortProperty;
+
+ public PersonBean() {
+ sortOrders.put("name", SortOrder.unsorted);
+ sortOrders.put("surname", SortOrder.unsorted);
+ sortOrders.put("email", SortOrder.unsorted);
+ }
+
+ private EntityManager lookupEntityManager() {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ PersistenceService persistenceService = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{persistenceService}", PersistenceService.class);
+ return persistenceService.getEntityManager();
+ }
+
+ public Map<String, SortOrder> getSortOrders() {
+ return sortOrders;
+ }
+
+ public Map<String, String> getFilterValues() {
+ return filterValues;
+ }
+
+ public String getSortProperty() {
+ return sortProperty;
+ }
+
+ public void setSortProperty(String sortPropety) {
+ this.sortProperty = sortPropety;
+ }
+
+ public void toggleSort() {
+ for (Entry<String, SortOrder> entry : sortOrders.entrySet()) {
+ SortOrder newOrder;
+
+ if (entry.getKey().equals(sortProperty)) {
+ if (entry.getValue() == SortOrder.ascending) {
+ newOrder = SortOrder.descending;
+ } else {
+ newOrder = SortOrder.ascending;
+ }
+ } else {
+ newOrder = SortOrder.unsorted;
+ }
+
+ entry.setValue(newOrder);
+ }
+ }
+
+ public Object getDataModel() {
+ return new PersonDataModel(lookupEntityManager());
+ }
+}
\ No newline at end of file
Added: branches/4.0.X/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/resources/META-INF/persistence.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="1.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
+ <persistence-unit name="richfaces-showcase"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <class>org.richfaces.demo.arrangeablemodel.Person</class>
+ <properties>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
+ <property name="javax.persistence.jdbc.url" value="jdbc:hsqldb:mem:richfaces_showcase" />
+ <property name="javax.persistence.jdbc.user" value="sa" />
+ <property name="javax.persistence.jdbc.password" value=""/>
+
+ <property name="javax.persistence.validation.mode" value="NONE" />
+ <property name="hibernate.validator.apply_to_ddl" value="false" />
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ </properties>
+ </persistence-unit>
+</persistence>
\ No newline at end of file
Added: branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/arrangeablemodel/data.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,1003 @@
+<persons>
+ <person>
+ <name>Savannah</name>
+ <surname>Dickerson</surname>
+ <email>ac.sem(a)Phasellus.com</email>
+ </person>
+ <person>
+ <name>Melyssa</name>
+ <surname>Scott</surname>
+ <email>orci(a)at.com</email>
+ </person>
+ <person>
+ <name>Jemima</name>
+ <surname>Workman</surname>
+ <email>ac.mattis.semper(a)eget.org</email>
+ </person>
+ <person>
+ <name>Evelyn</name>
+ <surname>Santiago</surname>
+ <email>consectetuer.cursus(a)nonmagna.com</email>
+ </person>
+ <person>
+ <name>Blossom</name>
+ <surname>Diaz</surname>
+ <email>non.leo(a)mattisvelit.ca</email>
+ </person>
+ <person>
+ <name>Miriam</name>
+ <surname>Gonzales</surname>
+ <email>velit(a)urna.com</email>
+ </person>
+ <person>
+ <name>Jada</name>
+ <surname>Dennis</surname>
+ <email>lectus.ante(a)lectus.com</email>
+ </person>
+ <person>
+ <name>Jessica</name>
+ <surname>Cotton</surname>
+ <email>in(a)purus.com</email>
+ </person>
+ <person>
+ <name>Henry</name>
+ <surname>Blackburn</surname>
+ <email>amet.risus.Donec(a)semper.com</email>
+ </person>
+ <person>
+ <name>Raymond</name>
+ <surname>Estrada</surname>
+ <email>vitae(a)eutellus.ca</email>
+ </person>
+ <person>
+ <name>Rhiannon</name>
+ <surname>Dodson</surname>
+ <email>dictum(a)Nullamscelerisque.edu</email>
+ </person>
+ <person>
+ <name>Nigel</name>
+ <surname>Ferrell</surname>
+ <email>dictum.Phasellus(a)velitin.ca</email>
+ </person>
+ <person>
+ <name>Kane</name>
+ <surname>Cook</surname>
+ <email>massa.Vestibulum(a)eu.com</email>
+ </person>
+ <person>
+ <name>Leandra</name>
+ <surname>Macias</surname>
+ <email>erat.Vivamus.nisi(a)NullainterdumCurabitur.ca</email>
+ </person>
+ <person>
+ <name>Ivory</name>
+ <surname>Sanchez</surname>
+ <email>Cras.lorem(a)non.org</email>
+ </person>
+ <person>
+ <name>Kelly</name>
+ <surname>Palmer</surname>
+ <email>dolor.egestas.rhoncus(a)risusDonecegestas.com</email>
+ </person>
+ <person>
+ <name>Jenna</name>
+ <surname>Willis</surname>
+ <email>ipsum.dolor(a)luctus.ca</email>
+ </person>
+ <person>
+ <name>Ivana</name>
+ <surname>Wolf</surname>
+ <email>ac(a)infelis.com</email>
+ </person>
+ <person>
+ <name>Graiden</name>
+ <surname>Hall</surname>
+ <email>purus(a)Integer.edu</email>
+ </person>
+ <person>
+ <name>Daria</name>
+ <surname>Petty</surname>
+ <email>tortor.dictum(a)egestasrhoncus.edu</email>
+ </person>
+ <person>
+ <name>Holmes</name>
+ <surname>Lang</surname>
+ <email>adipiscing.enim(a)Nullamscelerisque.ca</email>
+ </person>
+ <person>
+ <name>Michelle</name>
+ <surname>Miranda</surname>
+ <email>Nam.consequat.dolor(a)Naminterdum.edu</email>
+ </person>
+ <person>
+ <name>Calista</name>
+ <surname>Everett</surname>
+ <email>Donec.nibh(a)laoreetlibero.com</email>
+ </person>
+ <person>
+ <name>September</name>
+ <surname>Nicholson</surname>
+ <email>iaculis.odio(a)sollicitudincommodo.ca</email>
+ </person>
+ <person>
+ <name>Rosalyn</name>
+ <surname>Cline</surname>
+ <email>Fusce.fermentum.fermentum(a)gravidanuncsed.edu</email>
+ </person>
+ <person>
+ <name>Christen</name>
+ <surname>Cleveland</surname>
+ <email>Duis.volutpat.nunc(a)metusvitaevelit.ca</email>
+ </person>
+ <person>
+ <name>Igor</name>
+ <surname>Sears</surname>
+ <email>non(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Plato</name>
+ <surname>Johnston</surname>
+ <email>suscipit.est(a)Lorem.org</email>
+ </person>
+ <person>
+ <name>Kelsie</name>
+ <surname>Peterson</surname>
+ <email>lacus.Aliquam(a)dolorelitpellentesque.org</email>
+ </person>
+ <person>
+ <name>Lionel</name>
+ <surname>Puckett</surname>
+ <email>mi.lacinia.mattis(a)lacusEtiambibendum.org</email>
+ </person>
+ <person>
+ <name>Orlando</name>
+ <surname>Hayes</surname>
+ <email>Mauris.quis(a)fringilla.org</email>
+ </person>
+ <person>
+ <name>Fuller</name>
+ <surname>Keller</surname>
+ <email>In.nec.orci(a)utmolestiein.org</email>
+ </person>
+ <person>
+ <name>Brandon</name>
+ <surname>Woodward</surname>
+ <email>eget.magna(a)etnuncQuisque.edu</email>
+ </person>
+ <person>
+ <name>Lyle</name>
+ <surname>George</surname>
+ <email>lacus.Mauris(a)risus.edu</email>
+ </person>
+ <person>
+ <name>Abbot</name>
+ <surname>Valdez</surname>
+ <email>tincidunt.Donec.vitae(a)velit.ca</email>
+ </person>
+ <person>
+ <name>Kessie</name>
+ <surname>Carr</surname>
+ <email>Suspendisse.commodo(a)nonbibendum.ca</email>
+ </person>
+ <person>
+ <name>Louis</name>
+ <surname>Mitchell</surname>
+ <email>condimentum.Donec(a)convallisconvallis.com</email>
+ </person>
+ <person>
+ <name>Francesca</name>
+ <surname>Walters</surname>
+ <email>non.leo(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Giacomo</name>
+ <surname>Cross</surname>
+ <email>Morbi(a)nunc.edu</email>
+ </person>
+ <person>
+ <name>Iris</name>
+ <surname>Curtis</surname>
+ <email>nec.euismod.in(a)Nullamsuscipit.ca</email>
+ </person>
+ <person>
+ <name>Abdul</name>
+ <surname>Atkins</surname>
+ <email>Donec.non.justo(a)lobortismauris.com</email>
+ </person>
+ <person>
+ <name>Dominique</name>
+ <surname>Knight</surname>
+ <email>suscipit.est.ac(a)odioNam.org</email>
+ </person>
+ <person>
+ <name>Odysseus</name>
+ <surname>Barnett</surname>
+ <email>nisi.a.odio(a)tempor.com</email>
+ </person>
+ <person>
+ <name>Hammett</name>
+ <surname>Ray</surname>
+ <email>eu.sem(a)purusactellus.ca</email>
+ </person>
+ <person>
+ <name>Gage</name>
+ <surname>Branch</surname>
+ <email>ac.libero(a)neque.ca</email>
+ </person>
+ <person>
+ <name>Quinn</name>
+ <surname>Wilcox</surname>
+ <email>Fusce(a)ipsumdolor.org</email>
+ </person>
+ <person>
+ <name>Ursa</name>
+ <surname>Bishop</surname>
+ <email>montes(a)tempor.org</email>
+ </person>
+ <person>
+ <name>Gray</name>
+ <surname>Riddle</surname>
+ <email>Suspendisse(a)magnanec.org</email>
+ </person>
+ <person>
+ <name>Jorden</name>
+ <surname>Christensen</surname>
+ <email>a.feugiat(a)id.edu</email>
+ </person>
+ <person>
+ <name>Hashim</name>
+ <surname>Knight</surname>
+ <email>Mauris(a)aliquetProin.edu</email>
+ </person>
+ <person>
+ <name>Whitney</name>
+ <surname>Hansen</surname>
+ <email>nibh.Phasellus.nulla(a)ullamcorperDuis.org</email>
+ </person>
+ <person>
+ <name>Lacy</name>
+ <surname>Thompson</surname>
+ <email>justo(a)egestasurnajusto.org</email>
+ </person>
+ <person>
+ <name>Chelsea</name>
+ <surname>Blanchard</surname>
+ <email>magna(a)dictum.org</email>
+ </person>
+ <person>
+ <name>Kaseem</name>
+ <surname>Melendez</surname>
+ <email>sem.semper.erat(a)mattis.edu</email>
+ </person>
+ <person>
+ <name>Lillian</name>
+ <surname>Conway</surname>
+ <email>mattis(a)egetmetus.com</email>
+ </person>
+ <person>
+ <name>Allistair</name>
+ <surname>Britt</surname>
+ <email>tellus.faucibus.leo(a)Aenean.org</email>
+ </person>
+ <person>
+ <name>Merritt</name>
+ <surname>Melton</surname>
+ <email>blandit(a)enimdiamvel.org</email>
+ </person>
+ <person>
+ <name>Vivien</name>
+ <surname>Baker</surname>
+ <email>accumsan(a)velitegestas.com</email>
+ </person>
+ <person>
+ <name>Quinn</name>
+ <surname>Lowery</surname>
+ <email>vitae.erat(a)ridiculusmusDonec.ca</email>
+ </person>
+ <person>
+ <name>Fleur</name>
+ <surname>Rios</surname>
+ <email>ullamcorper.viverra(a)egetvolutpatornare.ca</email>
+ </person>
+ <person>
+ <name>Suki</name>
+ <surname>Leach</surname>
+ <email>luctus.Curabitur(a)nibh.com</email>
+ </person>
+ <person>
+ <name>Scarlet</name>
+ <surname>Cannon</surname>
+ <email>dictum.eu.placerat(a)imperdiet.edu</email>
+ </person>
+ <person>
+ <name>Ross</name>
+ <surname>Reid</surname>
+ <email>in.hendrerit(a)tincidunt.ca</email>
+ </person>
+ <person>
+ <name>Amethyst</name>
+ <surname>Pennington</surname>
+ <email>Mauris.nulla.Integer(a)Fuscemollis.org</email>
+ </person>
+ <person>
+ <name>Gregory</name>
+ <surname>Lyons</surname>
+ <email>nisl.sem.consequat(a)Phasellus.ca</email>
+ </person>
+ <person>
+ <name>Constance</name>
+ <surname>Thomas</surname>
+ <email>accumsan(a)ipsum.ca</email>
+ </person>
+ <person>
+ <name>Cleo</name>
+ <surname>Chandler</surname>
+ <email>massa(a)penatibusetmagnis.org</email>
+ </person>
+ <person>
+ <name>Cruz</name>
+ <surname>Paul</surname>
+ <email>ornare.In(a)temporbibendum.org</email>
+ </person>
+ <person>
+ <name>Tyrone</name>
+ <surname>Nunez</surname>
+ <email>arcu.Nunc(a)nisi.org</email>
+ </person>
+ <person>
+ <name>Evan</name>
+ <surname>Erickson</surname>
+ <email>Etiam(a)nibh.org</email>
+ </person>
+ <person>
+ <name>Claudia</name>
+ <surname>Nash</surname>
+ <email>Cras.sed(a)estacmattis.com</email>
+ </person>
+ <person>
+ <name>Pascale</name>
+ <surname>Cherry</surname>
+ <email>mi(a)nonjustoProin.edu</email>
+ </person>
+ <person>
+ <name>Evelyn</name>
+ <surname>Baxter</surname>
+ <email>ante.ipsum.primis(a)adlitoratorquent.org</email>
+ </person>
+ <person>
+ <name>Wing</name>
+ <surname>Gill</surname>
+ <email>per(a)semperet.ca</email>
+ </person>
+ <person>
+ <name>Raja</name>
+ <surname>Smith</surname>
+ <email>euismod.in(a)Duisa.com</email>
+ </person>
+ <person>
+ <name>Gail</name>
+ <surname>Fisher</surname>
+ <email>Integer.mollis.Integer(a)nullaInteger.edu</email>
+ </person>
+ <person>
+ <name>Garth</name>
+ <surname>Kaufman</surname>
+ <email>Suspendisse(a)conguea.ca</email>
+ </person>
+ <person>
+ <name>Donna</name>
+ <surname>Holman</surname>
+ <email>orci.luctus(a)Integerinmagna.com</email>
+ </person>
+ <person>
+ <name>Harriet</name>
+ <surname>Rhodes</surname>
+ <email>eu(a)ametultricies.edu</email>
+ </person>
+ <person>
+ <name>Brody</name>
+ <surname>Jacobs</surname>
+ <email>magna.sed(a)Vivamusmolestiedapibus.org</email>
+ </person>
+ <person>
+ <name>Colton</name>
+ <surname>Duffy</surname>
+ <email>id.magna(a)nullaIntegervulputate.edu</email>
+ </person>
+ <person>
+ <name>Edan</name>
+ <surname>Baxter</surname>
+ <email>Cras(a)orciUt.ca</email>
+ </person>
+ <person>
+ <name>Desirae</name>
+ <surname>Thomas</surname>
+ <email>et(a)hendreritDonec.ca</email>
+ </person>
+ <person>
+ <name>Drew</name>
+ <surname>Dixon</surname>
+ <email>lectus.a.sollicitudin(a)rutrumurnanec.ca</email>
+ </person>
+ <person>
+ <name>Jasper</name>
+ <surname>Stein</surname>
+ <email>Nunc.commodo(a)Duis.edu</email>
+ </person>
+ <person>
+ <name>Stacy</name>
+ <surname>Taylor</surname>
+ <email>turpis.non(a)maurisblanditmattis.org</email>
+ </person>
+ <person>
+ <name>Indigo</name>
+ <surname>Ballard</surname>
+ <email>pellentesque.massa(a)odioEtiamligula.com</email>
+ </person>
+ <person>
+ <name>Leroy</name>
+ <surname>Golden</surname>
+ <email>ultrices(a)Aliquamnec.com</email>
+ </person>
+ <person>
+ <name>Erasmus</name>
+ <surname>Mcguire</surname>
+ <email>fermentum(a)Donecporttitor.com</email>
+ </person>
+ <person>
+ <name>Lev</name>
+ <surname>Mccray</surname>
+ <email>lectus.convallis.est(a)blanditenim.org</email>
+ </person>
+ <person>
+ <name>Ima</name>
+ <surname>Petersen</surname>
+ <email>egestas(a)acmieleifend.org</email>
+ </person>
+ <person>
+ <name>Murphy</name>
+ <surname>Mcintosh</surname>
+ <email>tempus.risus.Donec(a)dolorquamelementum.edu</email>
+ </person>
+ <person>
+ <name>Kelsie</name>
+ <surname>Cantrell</surname>
+ <email>ut.aliquam(a)commodohendreritDonec.org</email>
+ </person>
+ <person>
+ <name>Claudia</name>
+ <surname>Carlson</surname>
+ <email>fringilla(a)fermentumconvallisligula.com</email>
+ </person>
+ <person>
+ <name>Cole</name>
+ <surname>Walsh</surname>
+ <email>quis.pede.Praesent(a)intempus.org</email>
+ </person>
+ <person>
+ <name>Hu</name>
+ <surname>Baker</surname>
+ <email>Aliquam(a)Vivamusnibh.com</email>
+ </person>
+ <person>
+ <name>Lara</name>
+ <surname>Wong</surname>
+ <email>a.dui(a)leo.ca</email>
+ </person>
+ <person>
+ <name>Simone</name>
+ <surname>Lancaster</surname>
+ <email>netus.et(a)egettincidunt.ca</email>
+ </person>
+ <person>
+ <name>Heather</name>
+ <surname>Harrison</surname>
+ <email>tellus(a)lacus.edu</email>
+ </person>
+ <person>
+ <name>Zenia</name>
+ <surname>Curtis</surname>
+ <email>faucibus.lectus.a(a)fringilla.org</email>
+ </person>
+ <person>
+ <name>Stuart</name>
+ <surname>Pugh</surname>
+ <email>nulla.Cras.eu(a)asollicitudinorci.org</email>
+ </person>
+ <person>
+ <name>Shelley</name>
+ <surname>Goodman</surname>
+ <email>quam.dignissim(a)habitantmorbitristique.ca</email>
+ </person>
+ <person>
+ <name>Keegan</name>
+ <surname>Olson</surname>
+ <email>dolor.dapibus(a)tortor.org</email>
+ </person>
+ <person>
+ <name>Hop</name>
+ <surname>Rodriguez</surname>
+ <email>vitae.semper.egestas(a)natoque.ca</email>
+ </person>
+ <person>
+ <name>Deanna</name>
+ <surname>Frye</surname>
+ <email>Vivamus(a)risus.org</email>
+ </person>
+ <person>
+ <name>Rebecca</name>
+ <surname>Medina</surname>
+ <email>sociis(a)etmagnisdis.com</email>
+ </person>
+ <person>
+ <name>Sarah</name>
+ <surname>Patton</surname>
+ <email>ullamcorper(a)ettristique.com</email>
+ </person>
+ <person>
+ <name>Jenette</name>
+ <surname>Martin</surname>
+ <email>tempor.lorem.eget(a)etrutrum.com</email>
+ </person>
+ <person>
+ <name>Gil</name>
+ <surname>Brady</surname>
+ <email>tellus(a)inmagna.org</email>
+ </person>
+ <person>
+ <name>Jena</name>
+ <surname>Merritt</surname>
+ <email>litora(a)eu.ca</email>
+ </person>
+ <person>
+ <name>Christine</name>
+ <surname>Brennan</surname>
+ <email>ac(a)lectusasollicitudin.com</email>
+ </person>
+ <person>
+ <name>Clark</name>
+ <surname>Contreras</surname>
+ <email>natoque.penatibus.et(a)orciUtsagittis.org</email>
+ </person>
+ <person>
+ <name>Bo</name>
+ <surname>Becker</surname>
+ <email>est.vitae.sodales(a)Fusce.edu</email>
+ </person>
+ <person>
+ <name>Lacey</name>
+ <surname>Guerrero</surname>
+ <email>Fusce.dolor.quam(a)Aliquamvulputateullamcorper.com</email>
+ </person>
+ <person>
+ <name>Cullen</name>
+ <surname>Mason</surname>
+ <email>bibendum(a)purusin.com</email>
+ </person>
+ <person>
+ <name>Jenette</name>
+ <surname>Stuart</surname>
+ <email>sociis.natoque.penatibus(a)penatibus.com</email>
+ </person>
+ <person>
+ <name>Selma</name>
+ <surname>Zamora</surname>
+ <email>pede.Suspendisse.dui(a)fermentum.com</email>
+ </person>
+ <person>
+ <name>Clinton</name>
+ <surname>Peterson</surname>
+ <email>odio.Etiam(a)ornare.ca</email>
+ </person>
+ <person>
+ <name>Axel</name>
+ <surname>Henderson</surname>
+ <email>a(a)pedeCumsociis.org</email>
+ </person>
+ <person>
+ <name>Margaret</name>
+ <surname>Roy</surname>
+ <email>Sed(a)vehicularisusNulla.ca</email>
+ </person>
+ <person>
+ <name>Price</name>
+ <surname>Lyons</surname>
+ <email>magna(a)habitantmorbi.org</email>
+ </person>
+ <person>
+ <name>Logan</name>
+ <surname>Sharp</surname>
+ <email>In.at.pede(a)auctorodio.org</email>
+ </person>
+ <person>
+ <name>Marvin</name>
+ <surname>Ramirez</surname>
+ <email>Donec.tincidunt(a)et.edu</email>
+ </person>
+ <person>
+ <name>Briar</name>
+ <surname>Short</surname>
+ <email>nunc.interdum.feugiat(a)sedhendrerit.ca</email>
+ </person>
+ <person>
+ <name>Flynn</name>
+ <surname>York</surname>
+ <email>non.nisi(a)purusmauris.org</email>
+ </person>
+ <person>
+ <name>Benjamin</name>
+ <surname>Stevenson</surname>
+ <email>consectetuer(a)Aeneaneuismodmauris.org</email>
+ </person>
+ <person>
+ <name>Dieter</name>
+ <surname>Nicholson</surname>
+ <email>risus(a)enimgravida.org</email>
+ </person>
+ <person>
+ <name>Lacy</name>
+ <surname>Baker</surname>
+ <email>eu.neque.pellentesque(a)duiFuscealiquam.com</email>
+ </person>
+ <person>
+ <name>Kaseem</name>
+ <surname>Holder</surname>
+ <email>non.quam(a)Loremipsum.ca</email>
+ </person>
+ <person>
+ <name>Yeo</name>
+ <surname>Sanchez</surname>
+ <email>nisi.a(a)Namnullamagna.ca</email>
+ </person>
+ <person>
+ <name>Heidi</name>
+ <surname>Black</surname>
+ <email>tempus(a)faucibuslectusa.org</email>
+ </person>
+ <person>
+ <name>Cameron</name>
+ <surname>Vang</surname>
+ <email>turpis(a)tinciduntnuncac.com</email>
+ </person>
+ <person>
+ <name>Ryan</name>
+ <surname>Harris</surname>
+ <email>nec.ligula.consectetuer(a)risusInmi.edu</email>
+ </person>
+ <person>
+ <name>Debra</name>
+ <surname>Cortez</surname>
+ <email>luctus(a)pede.com</email>
+ </person>
+ <person>
+ <name>Neville</name>
+ <surname>Mcintyre</surname>
+ <email>egestas(a)placeratvelitQuisque.ca</email>
+ </person>
+ <person>
+ <name>Hope</name>
+ <surname>Romero</surname>
+ <email>dignissim.tempor(a)nonmagnaNam.com</email>
+ </person>
+ <person>
+ <name>Mechelle</name>
+ <surname>Kidd</surname>
+ <email>orci.Ut.sagittis(a)nonenimcommodo.ca</email>
+ </person>
+ <person>
+ <name>Nora</name>
+ <surname>Rivera</surname>
+ <email>gravida(a)consequatdolorvitae.edu</email>
+ </person>
+ <person>
+ <name>Zeph</name>
+ <surname>Snyder</surname>
+ <email>Donec.est(a)enimEtiam.ca</email>
+ </person>
+ <person>
+ <name>Britanni</name>
+ <surname>Williamson</surname>
+ <email>nulla.ante(a)sempereratin.edu</email>
+ </person>
+ <person>
+ <name>Jermaine</name>
+ <surname>Jones</surname>
+ <email>sapien.Aenean(a)Quisquenonummyipsum.org</email>
+ </person>
+ <person>
+ <name>Steel</name>
+ <surname>Newton</surname>
+ <email>cursus.et(a)Curabiturut.org</email>
+ </person>
+ <person>
+ <name>Hyatt</name>
+ <surname>Manning</surname>
+ <email>eget.massa.Suspendisse(a)aptenttaciti.edu</email>
+ </person>
+ <person>
+ <name>Stone</name>
+ <surname>Sloan</surname>
+ <email>adipiscing.elit.Curabitur(a)estvitaesodales.org</email>
+ </person>
+ <person>
+ <name>Lewis</name>
+ <surname>Guthrie</surname>
+ <email>neque.Nullam(a)Nuncpulvinararcu.edu</email>
+ </person>
+ <person>
+ <name>Sandra</name>
+ <surname>Cannon</surname>
+ <email>lobortis.nisi.nibh(a)luctuslobortisClass.com</email>
+ </person>
+ <person>
+ <name>Daria</name>
+ <surname>Page</surname>
+ <email>Aenean.sed.pede(a)facilisis.edu</email>
+ </person>
+ <person>
+ <name>Mohammad</name>
+ <surname>Soto</surname>
+ <email>blandit(a)aliquamarcuAliquam.org</email>
+ </person>
+ <person>
+ <name>Kerry</name>
+ <surname>Lowery</surname>
+ <email>vitae(a)mauriserateget.edu</email>
+ </person>
+ <person>
+ <name>Quinlan</name>
+ <surname>Roy</surname>
+ <email>est.ac(a)mollisvitaeposuere.com</email>
+ </person>
+ <person>
+ <name>Patricia</name>
+ <surname>Kirkland</surname>
+ <email>ipsum.dolor(a)orci.org</email>
+ </person>
+ <person>
+ <name>Janna</name>
+ <surname>Banks</surname>
+ <email>id.mollis.nec(a)eteuismodet.org</email>
+ </person>
+ <person>
+ <name>Lucius</name>
+ <surname>William</surname>
+ <email>sem(a)Nullamlobortis.com</email>
+ </person>
+ <person>
+ <name>Ira</name>
+ <surname>Buck</surname>
+ <email>pede.nonummy(a)dapibusgravidaAliquam.ca</email>
+ </person>
+ <person>
+ <name>Shellie</name>
+ <surname>Charles</surname>
+ <email>est(a)lobortisultricesVivamus.org</email>
+ </person>
+ <person>
+ <name>Stewart</name>
+ <surname>Cabrera</surname>
+ <email>libero(a)feugiat.com</email>
+ </person>
+ <person>
+ <name>April</name>
+ <surname>Sheppard</surname>
+ <email>sit(a)seddictumeleifend.ca</email>
+ </person>
+ <person>
+ <name>Gail</name>
+ <surname>Rollins</surname>
+ <email>odio(a)Proinnonmassa.ca</email>
+ </person>
+ <person>
+ <name>Ross</name>
+ <surname>Levy</surname>
+ <email>sit.amet.ultricies(a)Quisqueliberolacus.com</email>
+ </person>
+ <person>
+ <name>Hadley</name>
+ <surname>Mccormick</surname>
+ <email>vitae.posuere.at(a)enimnonnisi.org</email>
+ </person>
+ <person>
+ <name>Susan</name>
+ <surname>Banks</surname>
+ <email>interdum(a)nislsemconsequat.org</email>
+ </person>
+ <person>
+ <name>Nash</name>
+ <surname>Nolan</surname>
+ <email>convallis.dolor(a)enimSed.ca</email>
+ </person>
+ <person>
+ <name>Gretchen</name>
+ <surname>Carson</surname>
+ <email>elit.dictum.eu(a)temporarcuVestibulum.ca</email>
+ </person>
+ <person>
+ <name>Harper</name>
+ <surname>Hull</surname>
+ <email>eget(a)imperdiet.edu</email>
+ </person>
+ <person>
+ <name>Porter</name>
+ <surname>Benson</surname>
+ <email>tempus.non(a)Aenean.org</email>
+ </person>
+ <person>
+ <name>Xenos</name>
+ <surname>Tate</surname>
+ <email>blandit(a)antebibendum.org</email>
+ </person>
+ <person>
+ <name>Ali</name>
+ <surname>Carver</surname>
+ <email>Nulla.aliquet(a)ornare.org</email>
+ </person>
+ <person>
+ <name>Zachery</name>
+ <surname>Shepherd</surname>
+ <email>vitae.erat(a)sed.edu</email>
+ </person>
+ <person>
+ <name>Garrett</name>
+ <surname>Leach</surname>
+ <email>risus(a)quisurna.org</email>
+ </person>
+ <person>
+ <name>Mufutau</name>
+ <surname>Greer</surname>
+ <email>bibendum(a)luctus.com</email>
+ </person>
+ <person>
+ <name>Ryan</name>
+ <surname>Bryant</surname>
+ <email>turpis(a)purus.edu</email>
+ </person>
+ <person>
+ <name>Lacey</name>
+ <surname>Riley</surname>
+ <email>sed.turpis.nec(a)molestieSed.ca</email>
+ </person>
+ <person>
+ <name>Tiger</name>
+ <surname>Ryan</surname>
+ <email>lorem(a)vel.com</email>
+ </person>
+ <person>
+ <name>Upton</name>
+ <surname>Sullivan</surname>
+ <email>amet(a)Proin.com</email>
+ </person>
+ <person>
+ <name>Juliet</name>
+ <surname>Tate</surname>
+ <email>pede.Cum(a)eu.edu</email>
+ </person>
+ <person>
+ <name>Dieter</name>
+ <surname>Bowman</surname>
+ <email>lorem.eu(a)pellentesqueegetdictum.com</email>
+ </person>
+ <person>
+ <name>Jelani</name>
+ <surname>Knapp</surname>
+ <email>Nulla(a)Morbi.org</email>
+ </person>
+ <person>
+ <name>Martena</name>
+ <surname>Leblanc</surname>
+ <email>arcu.Vestibulum.ut(a)quamquis.edu</email>
+ </person>
+ <person>
+ <name>Megan</name>
+ <surname>Hull</surname>
+ <email>eu.nulla(a)amalesuada.com</email>
+ </person>
+ <person>
+ <name>Ginger</name>
+ <surname>Mcpherson</surname>
+ <email>dui.augue(a)Innecorci.com</email>
+ </person>
+ <person>
+ <name>Kylan</name>
+ <surname>Gilmore</surname>
+ <email>urna.Ut.tincidunt(a)aliquetsemut.com</email>
+ </person>
+ <person>
+ <name>Carlos</name>
+ <surname>King</surname>
+ <email>fermentum(a)lacus.com</email>
+ </person>
+ <person>
+ <name>Irma</name>
+ <surname>Blake</surname>
+ <email>Aliquam.nec(a)adipiscingelit.com</email>
+ </person>
+ <person>
+ <name>Tad</name>
+ <surname>Allen</surname>
+ <email>rhoncus.Proin.nisl(a)vehiculaaliquet.ca</email>
+ </person>
+ <person>
+ <name>Fiona</name>
+ <surname>Kline</surname>
+ <email>risus(a)gravidasagittisDuis.ca</email>
+ </person>
+ <person>
+ <name>Nell</name>
+ <surname>Franco</surname>
+ <email>blandit(a)viverraMaecenasiaculis.org</email>
+ </person>
+ <person>
+ <name>Scarlet</name>
+ <surname>Hall</surname>
+ <email>tincidunt(a)Nullamsuscipit.com</email>
+ </person>
+ <person>
+ <name>Zane</name>
+ <surname>Mccray</surname>
+ <email>volutpat.Nulla(a)malesuadafringilla.edu</email>
+ </person>
+ <person>
+ <name>Connor</name>
+ <surname>Salas</surname>
+ <email>Sed.nulla.ante(a)eu.com</email>
+ </person>
+ <person>
+ <name>Carlos</name>
+ <surname>Hunt</surname>
+ <email>Nam(a)nequevenenatislacus.org</email>
+ </person>
+ <person>
+ <name>Lane</name>
+ <surname>Andrews</surname>
+ <email>a.sollicitudin(a)inconsequat.org</email>
+ </person>
+ <person>
+ <name>Shana</name>
+ <surname>Ballard</surname>
+ <email>elementum(a)nibhlacinia.org</email>
+ </person>
+ <person>
+ <name>Conan</name>
+ <surname>Bradshaw</surname>
+ <email>vel.arcu.Curabitur(a)eratnonummyultricies.ca</email>
+ </person>
+ <person>
+ <name>Colleen</name>
+ <surname>Brooks</surname>
+ <email>erat.volutpat(a)cubiliaCurae;.edu</email>
+ </person>
+ <person>
+ <name>Francis</name>
+ <surname>Hardy</surname>
+ <email>sit.amet.luctus(a)dignissimlacus.com</email>
+ </person>
+ <person>
+ <name>Reuben</name>
+ <surname>Rodriguez</surname>
+ <email>natoque.penatibus.et(a)euaccumsansed.com</email>
+ </person>
+ <person>
+ <name>Iris</name>
+ <surname>Reid</surname>
+ <email>sed(a)Quisquepurussapien.edu</email>
+ </person>
+ <person>
+ <name>Phillip</name>
+ <surname>Schmidt</surname>
+ <email>ut(a)tortornibhsit.com</email>
+ </person>
+ <person>
+ <name>Jonas</name>
+ <surname>Crane</surname>
+ <email>ac.mi(a)luctusCurabitur.org</email>
+ </person>
+ <person>
+ <name>Abbot</name>
+ <surname>Terry</surname>
+ <email>fringilla(a)Crasconvallisconvallis.com</email>
+ </person>
+</persons>
+
\ No newline at end of file
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -265,6 +265,10 @@
<id>dataTableEdit</id>
<name>Data Table Edit</name>
</sample>
+ <sample new="true">
+ <id>arrangeableModel</id>
+ <name>Arrangeable Model Sample</name>
+ </sample>
</samples>
</demo>
<demo>
Deleted: branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/jdoconfig.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
-
- <persistence-manager-factory name="transactions-optional">
- <property name="javax.jdo.PersistenceManagerFactoryClass"
- value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
- <property name="javax.jdo.option.ConnectionURL" value="appengine"/>
- <property name="javax.jdo.option.NontransactionalRead" value="true"/>
- <property name="javax.jdo.option.NontransactionalWrite" value="true"/>
- <property name="javax.jdo.option.RetainValues" value="true"/>
- <property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
- </persistence-manager-factory>
-</jdoconfig>
Deleted: branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/resources-gae/META-INF/persistence.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
- version="1.0">
- <persistence-unit name="transactions-optional">
- <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
- <properties>
- <property name="datanucleus.NontransactionalRead" value="true"/>
- <property name="datanucleus.NontransactionalWrite" value="true"/>
- <property name="datanucleus.ConnectionURL" value="appengine"/>
- </properties>
- </persistence-unit>
-
-</persistence>
\ No newline at end of file
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/WEB-INF/faces-config.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -3,13 +3,9 @@
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
version="2.0">
- <application>
- <!-- system-event-listener>
- <system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
- </system-event-listener -->
- </application>
-
+ <factory>
+ <lifecycle-factory>org.richfaces.demo.arrangeablemodel.PersistenceLifecycleFactory</lifecycle-factory>
+ </factory>
<managed-bean>
<managed-bean-name>opBean1</managed-bean-name>
<managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
Added: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/arrangeableModel.xhtml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,11 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition>
+ <p>DESC</p>
+ <ui:include src="#{demoNavigator.sampleIncludeURI}" />
+</ui:composition>
+</html>
Added: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/arrangeableModel-sample.xhtml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <h:form id="form">
+ <rich:dataTable keepSaved="true" id="richTable" var="record" value="#{personBean.dataModel}" rows="20">
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="name" />
+ </ui:include>
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="surname" />
+ </ui:include>
+ <ui:include src="jpaColumn.xhtml">
+ <ui:param name="bean" value="#{personBean}" />
+ <ui:param name="property" value="email" />
+ </ui:include>
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller" />
+ </f:facet>
+ </rich:dataTable>
+ </h:form>
+</ui:composition>
\ No newline at end of file
Added: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml (rev 0)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/jpaColumn.xhtml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition>
+ <rich:column sortBy="#{property}"
+ sortOrder="#{bean.sortOrders[property]}"
+ filterValue="#{bean.filterValues[property]}"
+ filterExpression="#{property}">
+
+ <f:facet name="header">
+ <h:commandLink style="color: white;" action="#{bean.toggleSort}">
+ #{bean.sortOrders[property]}
+ <a4j:ajax render="richTable" />
+ <f:setPropertyActionListener target="#{bean.sortProperty}" value="#{property}" />
+ </h:commandLink>
+ <br />
+ <h:inputText value="#{bean.filterValues[property]}">
+ <a4j:ajax render="richTable@body scroller" event="keyup" />
+ </h:inputText>
+ </f:facet>
+
+ <h:outputText value="#{record[property]}" />
+ </rich:column>
+</ui:composition>
+</html>
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/appengine-web.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>richfaces-showcase</application>
- <version>42</version>
+ <version>49</version>
<sessions-enabled>true</sessions-enabled>
<system-properties>
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-04-26 15:33:37 UTC (rev 22442)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp-gae/WEB-INF/faces-config.xml 2011-04-27 11:15:12 UTC (rev 22443)
@@ -1,256 +1,260 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- version="2.0" metadata-complete="true">
-
- <application>
- <!-- system-event-listener>
- <system-event-listener-class>org.richfaces.resource.MapBasedResourceCodecListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
- </system-event-listener -->
- </application>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config metadata-complete="true" version="2.0"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<component>
<component-type>syntaxHighlighter</component-type>
<component-class>org.richfaces.demo.components.sh.SyntaxHighlighter</component-class>
- </component>
-
- <managed-bean>
- <managed-bean-name>functionBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.function.FunctionBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>validationBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.validation.ValidationBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>passwordValidationBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.validation.PasswordValidationBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>mediaData</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.mediaOutput.MediaData</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>mediaBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.mediaOutput.MediaBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>pollBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.poll.PollBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>profile</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.togglepanel.Profile</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>progressBarBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.progressBar.ProgressBarBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>tooltipData</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tooltip.TooltipData</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>calendarBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.calendar.CalendarBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>calendarModel</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.calendar.model.CalendarModel</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>queueBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.queue.QueueBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>regionBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.region.RegionBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>autocompleteBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.autocomplete.AutocompleteBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>capitals</property-name>
- <value>#{capitalsParser.capitalsList}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>inplaceSelectBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.inplaces.InplaceSelectBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>capitals</property-name>
- <value>#{capitalsParser.capitalsList}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>panelMenuBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.panelmenu.PanelMenuBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>capitalsBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.CapitalsBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>capitals</property-name>
- <value>#{capitalsParser.capitalsList}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>carsBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.CarsBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>carsFilteringBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.CarsFilteringBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>capitalsSortingBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.CapitalsSortingBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>extTableSelectionBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.ExtTableSelectionBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- <managed-property>
- <property-name>inventoryItems</property-name>
- <value>#{carsBean.allInventoryItems}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>capitalsParser</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.model.capitals.CapitalsParser</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>slidesBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.SlidesBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>reportBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tables.ReportBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>paramBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.param.ParamBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>toolBarBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.toolbar.ToolBarBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>userBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.common.UserBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>demoNavigator</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.common.navigation.DemoNavigator</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>groups</property-name>
- <value>#{navigationParser.groupsList}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>navigationParser</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.common.navigation.NavigationParser</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>selectsBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.common.SelectsBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>skinBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.common.SkinBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>skin</property-name>
- <value>blueSky</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>listBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.lists.ListBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>fileUploadBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.fileupload.FileUploadBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>dragDropBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.dragdrop.DragDropBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>dragDropEventBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.dragdrop.DragDropEventBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>dragDropBean</property-name>
- <value>#{dragDropBean}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>dropDownMenuBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.dropdownmenu.DropDownMenuBean</managed-bean-class>
- <managed-bean-scope>view</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>cdsParser</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.CDParser</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>fileSystemBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.adaptors.FileSystemBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>treeBean</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.tree.TreeBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>cdXmlDescriptors</property-name>
- <value>#{cdsParser.cdsList}</value>
- </managed-property>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>opBean1</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>opBean2</managed-bean-name>
- <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
+ </component>
+ <managed-bean>
+ <managed-bean-name>personBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.arrangeablemodel.PersonBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean eager="true">
+ <managed-bean-name>persistenceService</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.arrangeablemodel.PersistenceService</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>functionBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.function.FunctionBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>validationBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.validation.ValidationBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>passwordValidationBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.validation.PasswordValidationBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>mediaData</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.mediaOutput.MediaData</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>mediaBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.mediaOutput.MediaBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>pollBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.poll.PollBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>profile</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.togglepanel.Profile</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>progressBarBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.progressBar.ProgressBarBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>tooltipData</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tooltip.TooltipData</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.calendar.CalendarBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarModel</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.calendar.model.CalendarModel</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>queueBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.queue.QueueBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>regionBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.region.RegionBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>autocompleteBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.autocomplete.AutocompleteBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>capitals</property-name>
+ <value>#{capitalsParser.capitalsList}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>inplaceSelectBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.inplaces.InplaceSelectBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>capitals</property-name>
+ <value>#{capitalsParser.capitalsList}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>panelMenuBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.panelmenu.PanelMenuBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>capitalsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.CapitalsBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>capitals</property-name>
+ <value>#{capitalsParser.capitalsList}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>carsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.CarsBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>carsFilteringBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.CarsFilteringBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>capitalsSortingBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.CapitalsSortingBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>extTableSelectionBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.ExtTableSelectionBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ <managed-property>
+ <property-name>inventoryItems</property-name>
+ <value>#{carsBean.allInventoryItems}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>capitalsParser</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.model.capitals.CapitalsParser</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>slidesBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.SlidesBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>reportBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tables.ReportBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>paramBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.param.ParamBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>toolBarBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.toolbar.ToolBarBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>userBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.common.UserBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>demoNavigator</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.common.navigation.DemoNavigator</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>groups</property-name>
+ <value>#{navigationParser.groupsList}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>navigationParser</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.common.navigation.NavigationParser</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>selectsBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.common.SelectsBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.common.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>skin</property-name>
+ <value>blueSky</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>listBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.lists.ListBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>fileUploadBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.fileupload.FileUploadBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dragDropBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.dragdrop.DragDropBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dragDropEventBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.dragdrop.DragDropEventBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>dragDropBean</property-name>
+ <value>#{dragDropBean}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>dropDownMenuBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.dropdownmenu.DropDownMenuBean</managed-bean-class>
+ <managed-bean-scope>view</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>cdsParser</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.CDParser</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>fileSystemBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.adaptors.FileSystemBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>treeBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.tree.TreeBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>cdXmlDescriptors</property-name>
+ <value>#{cdsParser.cdsList}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>opBean1</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>opBean2</managed-bean-name>
+ <managed-bean-class>org.richfaces.demo.outputPanel.OutputPanelBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <factory>
+ <lifecycle-factory>org.richfaces.demo.arrangeablemodel.PersistenceLifecycleFactory</lifecycle-factory>
+ </factory>
</faces-config>
13 years, 8 months
JBoss Rich Faces SVN: r22442 - trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-04-26 11:33:37 -0400 (Tue, 26 Apr 2011)
New Revision: 22442
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
Log:
RF-10757
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-04-26 10:07:11 UTC (rev 22441)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2011-04-26 15:33:37 UTC (rev 22442)
@@ -234,7 +234,7 @@
throws IOException {
writer.startElement(HtmlConstants.TBODY_ELEMENT, dataTableBase);
- String clientId = (dataTableBase.getRelativeRowIndex() < 0) ? dataTableBase.getContainerClientId(facesContext) : dataTableBase.getRelativeClientId(facesContext);
+ String clientId = (dataTableBase.getRowKey() == null) ? dataTableBase.getContainerClientId(facesContext) : dataTableBase.getRelativeClientId(facesContext);
writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, clientId + ":tb", null);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, getTableBodySkinClass(), null);
13 years, 8 months
JBoss Rich Faces SVN: r22441 - modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-04-26 06:07:11 -0400 (Tue, 26 Apr 2011)
New Revision: 22441
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
Log:
Add FacesMessage bound to component (not only 'global' msg)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-04-26 08:52:29 UTC (rev 22440)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichMessagesBean.java 2011-04-26 10:07:11 UTC (rev 22441)
@@ -47,6 +47,10 @@
/** Generated UID */
private static final long serialVersionUID = 4893769498631480379L;
+ // id for input element to bound some FacesMessage to it
+ private static final String INPUT1_ID = "form:simpleInput1";
+ private static final String INPUT2_ID = "form:simpleInput2";
+
private static Logger logger;
private Attributes attributes;
@@ -73,10 +77,31 @@
logger.info(" ### Just called generateFacesError()");
FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message", "Generated error message"));
+ new FacesMessage(FacesMessage.SEVERITY_ERROR,
+ "Generated error message without binding to any component (global)",
+ "Generated error message without binding to any component (global)"));
FacesContext.getCurrentInstance().addMessage(null,
- new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message", "Generated warning message"));
+ new FacesMessage(FacesMessage.SEVERITY_WARN,
+ "Generated warning message without binding to any component (global)",
+ "Generated warning message without binding to any component (global)"));
+
+ // Message bound to component on page
+ FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 1",
+ "Generated error message for Input 1"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT1_ID,
+ new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 1",
+ "Generated warning message for Input 1"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
+ new FacesMessage(FacesMessage.SEVERITY_ERROR, "Generated error message for Input 2",
+ "Generated error message for Input 2"));
+
+ FacesContext.getCurrentInstance().addMessage(INPUT2_ID,
+ new FacesMessage(FacesMessage.SEVERITY_WARN, "Generated warning message for Input 2",
+ "Generated warning message for Input 2"));
}
public Attributes getAttributes() {
13 years, 8 months
JBoss Rich Faces SVN: r22440 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/validation and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: jjamrich
Date: 2011-04-26 04:52:29 -0400 (Tue, 26 Apr 2011)
New Revision: 22440
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup1.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup2.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/jsr303.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
Add support for test rich:GraphValidator
Add page with jsf303 validator
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-04-21 17:59:08 UTC (rev 22439)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-04-26 08:52:29 UTC (rev 22440)
@@ -78,6 +78,7 @@
@PostConstruct
public void init() {
logger = LoggerFactory.getLogger(RichBean.class);
+ logger.info("initializing bean " + getClass().getName());
createSkinList();
createComponentsMap();
@@ -136,6 +137,7 @@
components.put("richExtendedDataTable", "Rich Extended Data Table");
components.put("richFileUpload", "Rich File Upload");
components.put("richFunctions", "Rich Functions");
+ components.put("richGraphValidator", "Rich Graph Validator");
components.put("richHashParam", "Rich Hash Parameter");
components.put("richInplaceInput", "Rich Inplace Input");
components.put("richInplaceSelect", "Rich Inplace Select");
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.java 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.bean;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.application.FacesMessage;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+import javax.faces.context.FacesContext;
+import javax.validation.constraints.AssertTrue;
+import javax.validation.constraints.Size;
+import javax.validation.groups.Default;
+
+import org.richfaces.component.UIGraphValidator;
+import org.richfaces.tests.metamer.Attributes;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroup1;
+import org.richfaces.tests.metamer.validation.groups.ValidationGroup2;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed Bean for rich:graphValidator
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name="richGraphValidatorBean")
+@ViewScoped
+public class RichGraphValidatorBean implements Serializable, Cloneable {
+
+ /** Generated UID */
+ private static final long serialVersionUID = -960575870621302059L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ @Size(min = 5, max = 15, message = "Wrong size for password")
+ private String password;
+ @Size(min = 5, max = 15, message = "Wrong size for password")
+ private String passwordConfirm;
+
+ @PostConstruct
+ public void init(){
+ logger = LoggerFactory.getLogger(getClass());
+ logger.info("initializing bean " + getClass().getName());
+ attributes = Attributes.getComponentAttributesFromFacesConfig(UIGraphValidator.class, getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("type", "org.richfaces.BeanValidator");
+ }
+
+ @AssertTrue(message = "Different passwords entered! [Default Group]")
+ public boolean isPasswordsEquals() {
+ return password.equals(passwordConfirm);
+ }
+
+ @AssertTrue(message = "Different passwords entered! [G1]", groups={ValidationGroup1.class})
+ public boolean isRovnakeHesla() {
+ return password.equals(passwordConfirm);
+ }
+
+ @AssertTrue(message = "Different passwords entered! [G2 + Default Group]", groups = {ValidationGroup2.class,Default.class})
+ public boolean isPokusUspesny() {
+ return password.equals(passwordConfirm);
+ }
+
+ public void storeNewPassword() {
+ FacesContext.getCurrentInstance().addMessage(null,
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "Succesfully changed!", "Succesfully changed!"));
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getPasswordConfirm() {
+ return passwordConfirm;
+ }
+
+ public void setPasswordConfirm(String passwordConfirm) {
+ this.passwordConfirm = passwordConfirm;
+ }
+}
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup1.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup1.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup1.java 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.validation.groups;
+
+
+/**
+ * Validation Group for groups attribute testing
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public class ValidationGroup1 {
+
+}
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup2.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup2.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/validation/groups/ValidationGroup2.java 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.validation.groups;
+
+/**
+ * Validation Group for groups attribute testing
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+public interface ValidationGroup2 {
+
+}
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichGraphValidatorBean.properties 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,2 @@
+attr.type.BeanValidator=org.richfaces.BeanValidator
+
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/jsr303.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/jsr303.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/jsr303.xhtml 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates" value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="head">
+ <style type="text/css">
+ .rf-msg-err {
+ display: block !important;
+ margin-bottom: 6px;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="component">
+ <script type="text/javascript">
+ function setCorrectValues() {
+ $('input[id$=pass1]').val('rfvokm334lafd');
+ $('input[id$=conf1]').val('rfvokm334lafd');
+ }
+
+ function setWrongValues() {
+ $('input[id$=pass1]').val('rfvdthrfd');
+ $('input[id$=conf1]').val('dsararaAqa');
+ }
+ </script>
+
+ <h:form>
+ <input id="setCorrectValuesButton" type="button" value="set correct values" onclick="setCorrectValues()"/>
+ <input id="setWrongValuesButton" type="button" value="set wrong values" onclick="setWrongValues()"/>
+
+ <br/>
+
+ <ui:fragment rendered="#{richGraphValidatorBean.attributes['summary'].value==null
+ || richGraphValidatorBean.attributes['summary'].value==''}" >
+ <rich:graphValidator id="gv1"
+ value="#{richGraphValidatorBean}"
+ groups="#{richGraphValidatorBean.attributes['groups'].value}"
+ type="#{richGraphValidatorBean.attributes['type'].value}"
+ rendered="#{richGraphValidatorBean.attributes['rendered'].value}" >
+ <rich:panel header="Change password" style="width:500px">
+ <rich:messages for="gv1" />
+ <rich:messages globalOnly="true" />
+ <h:panelGrid columns="3">
+ <h:outputText value="Enter new password:" />
+ <h:inputSecret value="#{richGraphValidatorBean.password}" id="pass1" />
+ <rich:message for="pass1" />
+ <h:outputText value="Confirm the new password:" />
+ <h:inputSecret value="#{richGraphValidatorBean.passwordConfirm}" id="conf1" />
+ <rich:message for="conf1" />
+ </h:panelGrid>
+ <a4j:commandButton value="Store changes"
+ action="#{richGraphValidatorBean.storeNewPassword}" />
+ </rich:panel>
+ </rich:graphValidator>
+ </ui:fragment>
+
+ <ui:fragment rendered="#{richGraphValidatorBean.attributes['summary'].value!=null
+ && richGraphValidatorBean.attributes['summary'].value!=''}" >
+ <rich:graphValidator id="gv2"
+ value="#{richGraphValidatorBean}"
+ groups="#{richGraphValidatorBean.attributes['groups'].value}"
+ rendered="#{richGraphValidatorBean.attributes['rendered'].value}"
+ summary="#{richGraphValidatorBean.attributes['summary'].value}"
+ type="#{richGraphValidatorBean.attributes['type'].value}" >
+ <rich:panel header="Change password" style="width:500px">
+ <rich:messages for="gv2" />
+ <rich:messages globalOnly="true" />
+ <h:panelGrid columns="3">
+ <h:outputText value="Enter new password:" />
+ <h:inputSecret value="#{richGraphValidatorBean.password}"
+ id="pass2" />
+ <rich:message for="pass2" />
+ <h:outputText value="Confirm the new password:" />
+ <h:inputSecret value="#{richGraphValidatorBean.passwordConfirm}"
+ id="conf2" />
+ <rich:message for="conf2" />
+ </h:panelGrid>
+ <a4j:commandButton value="Store changes"
+ action="#{richGraphValidatorBean.storeNewPassword}" />
+ </rich:panel>
+ </rich:graphValidator>
+ </ui:fragment>
+
+ </h:form>
+
+ <br />
+ <rich:messages id="msgs" value="#{richGraphValidatorBean}" />
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richGraphValidatorBean.attributes}"
+ id="attributes" />
+ </ui:define>
+
+</ui:composition>
+</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richGraphValidator/list.xhtml 2011-04-26 08:52:29 UTC (rev 22440)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Graph Validator</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="jsr303" outcome="jsr303" value="JSR-303 Bean Validation">
+ Page containing input with JSR-303 validator within <b>rich:graphValidator</b>
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
13 years, 8 months
JBoss Rich Faces SVN: r22439 - in trunk/ui/input/ui/src: main/java/org/richfaces/request and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-04-21 13:59:08 -0400 (Thu, 21 Apr 2011)
New Revision: 22439
Added:
trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadPhaseListener.java
trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequestSizeExceeded.java
Removed:
trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadExternalContextFactory.java
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadFacesContextFactory.java
trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequest25.java
trunk/ui/input/ui/src/main/java/org/richfaces/request/ProgressControl.java
trunk/ui/input/ui/src/main/resources/META-INF/fileupload.faces-config.xml
trunk/ui/input/ui/src/test/java/org/richfaces/request/ProgressControlTest.java
Log:
RF-10128
Deleted: trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadExternalContextFactory.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadExternalContextFactory.java 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadExternalContextFactory.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -1,228 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.context;
-
-import java.io.File;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.AbstractMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import javax.faces.FacesException;
-import javax.faces.FacesWrapper;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.ExternalContextFactory;
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.richfaces.exception.FileUploadException;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
-import org.richfaces.model.UploadedFile;
-import org.richfaces.request.MultipartRequest;
-import org.richfaces.request.MultipartRequest.ResponseState;
-import org.richfaces.request.MultipartRequest25;
-import org.richfaces.request.MultipartRequestParser;
-import org.richfaces.request.ProgressControl;
-
-import com.google.common.collect.LinkedListMultimap;
-import com.google.common.collect.Lists;
-
-
-/**
- * @author Nick Belaevski
- *
- */
-public class FileUploadExternalContextFactory extends ExternalContextFactory implements FacesWrapper<ExternalContextFactory> {
-
- private static class HttpSessionMap extends AbstractMap<String, Object> {
-
- private HttpSession session;
-
- public HttpSessionMap(HttpSession session) {
- super();
- this.session = session;
- }
-
- @Override
- public Object get(Object key) {
- return session.getAttribute((String) key);
- }
-
- @Override
- public Object put(String key, Object value) {
- session.setAttribute(key, value);
- return null;
- }
-
- @Override
- public Object remove(Object key) {
- session.removeAttribute((String) key);
- return null;
- }
-
- @Override
- public Set<java.util.Map.Entry<String, Object>> entrySet() {
- throw new UnsupportedOperationException();
- }
- }
-
- public static final String UID_KEY = "rf_fu_uid";
-
- private static final Logger LOGGER = RichfacesLogger.CONTEXT.getLogger();
-
- private static final Pattern AMPERSAND = Pattern.compile("&+");
-
- private ExternalContextFactory wrappedFactory;
-
- public FileUploadExternalContextFactory(ExternalContextFactory wrappedFactory) {
- super();
-
- //TODO Use ConfigurationServiceHelper to initialize InitParameters.
- this.wrappedFactory = wrappedFactory;
- }
-
- @Override
- public ExternalContextFactory getWrapped() {
- return wrappedFactory;
- }
-
- private String getParameterValueFromQueryString(String queryString, String paramName) {
- if (queryString != null) {
- String[] nvPairs = AMPERSAND.split(queryString);
- for (String nvPair : nvPairs) {
- if (nvPair.length() == 0) {
- continue;
- }
-
- int eqIdx = nvPair.indexOf('=');
- if (eqIdx >= 0) {
- try {
- String name = URLDecoder.decode(nvPair.substring(0, eqIdx), "UTF-8");
-
- if (paramName.equals(name)) {
- return URLDecoder.decode(nvPair.substring(eqIdx + 1), "UTF-8");
- }
- } catch (UnsupportedEncodingException e) {
- // log warning and skip this parameter
- LOGGER.debug(e.getMessage(), e);
- }
- }
- }
- }
-
- return null;
- }
-
- private boolean isCreateTempFiles(ServletContext servletContext) {
- String param = servletContext.getInitParameter("org.richfaces.fileUpload.createTempFiles");
- if (param != null) {
- return Boolean.parseBoolean(param);
- }
-
- return true;
- }
-
- private String getTempFilesDirectory(ServletContext servletContext) {
- String result = servletContext.getInitParameter("org.richfaces.fileUpload.tempFilesDirectory");
- if (result == null) {
- File servletTempDir = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
- if (servletTempDir != null) {
- result = servletTempDir.getAbsolutePath();
- }
- }
- if (result == null) {
- result = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
- }
-
- return result;
- }
-
- private long getMaxRequestSize(ServletContext servletContext) {
- String param = servletContext.getInitParameter("org.richfaces.fileUpload.maxRequestSize");
- if (param != null) {
- return Long.parseLong(param);
- }
-
- return 0;
- }
-
- @Override
- public ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException {
- Object wrappedRequest = request;
-
- if (wrappedRequest instanceof HttpServletRequest) {
- HttpServletRequest httpRequest = (HttpServletRequest) wrappedRequest;
-
- if (httpRequest.getContentType() != null && httpRequest.getContentType().startsWith("multipart/")) {
- String uid = getParameterValueFromQueryString(httpRequest.getQueryString(), UID_KEY);
-
- if (uid != null) {
- long contentLength = Long.parseLong(httpRequest.getHeader("Content-Length"));
-
- Map<String,Object> contextMap = new HttpSessionMap(httpRequest.getSession());
-
- ProgressControl progressControl = new ProgressControl(contextMap, uid, contentLength);
-
- wrappedRequest = wrapMultipartRequestServlet25((ServletContext) context, httpRequest, uid,
- contentLength, progressControl);
- }
- }
- }
-
- return getWrapped().getExternalContext(context, wrappedRequest, response);
- }
-
- private MultipartRequest wrapMultipartRequestServlet25(ServletContext servletContext, HttpServletRequest request,
- String uploadId, long contentLength, ProgressControl progressControl) {
-
- MultipartRequest multipartRequest;
-
- long maxRequestSize = getMaxRequestSize(servletContext);
- if (maxRequestSize == 0 || contentLength <= maxRequestSize) {
- MultipartRequestParser requestParser = new MultipartRequestParser(request, isCreateTempFiles(servletContext),
- getTempFilesDirectory(servletContext), progressControl);
-
- ResponseState result = ResponseState.ok;
-
- try {
- requestParser.parse();
- } catch (FileUploadException e) {
- result = ResponseState.serverError;
- }
-
- multipartRequest = new MultipartRequest25(request, uploadId, progressControl, requestParser.getParameters(),
- requestParser.getUploadedFiles(), result);
- } else {
- multipartRequest = new MultipartRequest25(request, uploadId, progressControl, LinkedListMultimap.<String, String>create(),
- Lists.<UploadedFile>newArrayList(), ResponseState.sizeExceeded);
- }
-
- request.setAttribute(MultipartRequest.REQUEST_ATTRIBUTE_NAME, multipartRequest);
-
- return multipartRequest;
- }
-
-}
\ No newline at end of file
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadFacesContextFactory.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadFacesContextFactory.java 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadFacesContextFactory.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -21,22 +21,27 @@
*/
package org.richfaces.context;
-import java.io.IOException;
-import java.io.Writer;
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.regex.Pattern;
import javax.faces.FacesException;
import javax.faces.FacesWrapper;
-import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.FacesContextFactory;
import javax.faces.context.FacesContextWrapper;
import javax.faces.lifecycle.Lifecycle;
-import javax.servlet.http.HttpServletResponse;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.request.MultipartRequest;
-import org.richfaces.request.MultipartRequest.ResponseState;
+import org.richfaces.request.MultipartRequest25;
+import org.richfaces.request.MultipartRequestParser;
+import org.richfaces.request.MultipartRequestSizeExceeded;
+import org.richfaces.request.ProgressControl;
/**
* @author Nick Belaevski
@@ -44,8 +49,6 @@
*/
public class FileUploadFacesContextFactory extends FacesContextFactory implements FacesWrapper<FacesContextFactory> {
- private static final Logger LOGGER = RichfacesLogger.CONTEXT.getLogger();
-
private static final class FileUploadFacesContext extends FacesContextWrapper {
private FacesContext facesContext;
@@ -72,6 +75,12 @@
}
}
+ public static final String UID_KEY = "rf_fu_uid";
+
+ private static final Logger LOGGER = RichfacesLogger.CONTEXT.getLogger();
+
+ private static final Pattern AMPERSAND = Pattern.compile("&+");
+
private FacesContextFactory wrappedFactory;
public FileUploadFacesContextFactory(FacesContextFactory wrappedFactory) {
@@ -84,36 +93,114 @@
return wrappedFactory;
}
+ private String getParameterValueFromQueryString(String queryString, String paramName) {
+ if (queryString != null) {
+ String[] nvPairs = AMPERSAND.split(queryString);
+ for (String nvPair : nvPairs) {
+ if (nvPair.length() == 0) {
+ continue;
+ }
+
+ int eqIdx = nvPair.indexOf('=');
+ if (eqIdx >= 0) {
+ try {
+ String name = URLDecoder.decode(nvPair.substring(0, eqIdx), "UTF-8");
+
+ if (paramName.equals(name)) {
+ return URLDecoder.decode(nvPair.substring(eqIdx + 1), "UTF-8");
+ }
+ } catch (UnsupportedEncodingException e) {
+ // log warning and skip this parameter
+ LOGGER.debug(e.getMessage(), e);
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle)
throws FacesException {
- FacesContext facesContext = wrappedFactory.getFacesContext(context, request, response, lifecycle);
-
- MultipartRequest multipartRequest = (MultipartRequest) facesContext.getExternalContext().getRequestMap().get(MultipartRequest.REQUEST_ATTRIBUTE_NAME);
- if (multipartRequest != null) {
- facesContext = new FileUploadFacesContext(facesContext);
-
- if (multipartRequest.getResponseState() != ResponseState.ok) {
- printResponse(facesContext, multipartRequest);
+ if (request instanceof HttpServletRequest) {
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ if (httpRequest.getContentType() != null && httpRequest.getContentType().startsWith("multipart/")) {
+ String uid = getParameterValueFromQueryString(httpRequest.getQueryString(), UID_KEY);
+
+ if (uid != null) {
+ long contentLength = Long.parseLong(httpRequest.getHeader("Content-Length"));
+
+ ProgressControl progressControl = new ProgressControl(uid, contentLength);
+
+ HttpServletRequest wrappedRequest = wrapMultipartRequestServlet25((ServletContext) context, httpRequest, uid,
+ contentLength, progressControl);
+
+ FacesContext facesContext = wrappedFactory.getFacesContext(context, wrappedRequest, response, lifecycle);
+ progressControl.setContextMap(facesContext.getExternalContext().getSessionMap());
+ return new FileUploadFacesContext(facesContext);
+ }
}
+
}
- return facesContext;
+ return wrappedFactory.getFacesContext(context, request, response, lifecycle);
}
+ private boolean isCreateTempFiles(ServletContext servletContext) {
+ String param = servletContext.getInitParameter("org.richfaces.fileUpload.createTempFiles");
+ if (param != null) {
+ return Boolean.parseBoolean(param);
+ }
+
+ return true;
+ }
- private void printResponse(FacesContext facesContext, MultipartRequest multipartRequest) {
- facesContext.responseComplete();
- ExternalContext externalContext = facesContext.getExternalContext();
- externalContext.setResponseStatus(HttpServletResponse.SC_OK);
- externalContext.setResponseContentType("text/html");
- try {
- Writer writer = externalContext.getResponseOutputWriter();
- writer.write("<html id=\"" + FileUploadExternalContextFactory.UID_KEY + multipartRequest.getUploadId() + ":" + multipartRequest.getResponseState() + "\"/>");
- writer.close();
- } catch (IOException e) {
- LOGGER.error(e.getMessage(), e);
+ private String getTempFilesDirectory(ServletContext servletContext) {
+ String result = servletContext.getInitParameter("org.richfaces.fileUpload.tempFilesDirectory");
+ if (result == null) {
+ File servletTempDir = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
+ if (servletTempDir != null) {
+ result = servletTempDir.getAbsolutePath();
+ }
}
+ if (result == null) {
+ result = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
+ }
+
+ return result;
}
+
+ private long getMaxRequestSize(ServletContext servletContext) {
+ String param = servletContext.getInitParameter("org.richfaces.fileUpload.maxRequestSize");
+ if (param != null) {
+ return Long.parseLong(param);
+ }
+
+ return 0;
+ }
+
+ private HttpServletRequest wrapMultipartRequestServlet25(ServletContext servletContext, HttpServletRequest request,
+ String uploadId, long contentLength, ProgressControl progressControl) {
+
+ HttpServletRequest multipartRequest;
+
+ long maxRequestSize = getMaxRequestSize(servletContext);
+ if (maxRequestSize == 0 || contentLength <= maxRequestSize) {
+ boolean createTempFiles = isCreateTempFiles(servletContext);
+ String tempFilesDirectory = getTempFilesDirectory(servletContext);
+
+ MultipartRequestParser requestParser = new MultipartRequestParser(request, createTempFiles, tempFilesDirectory, progressControl);
+
+ multipartRequest = new MultipartRequest25(request, uploadId, progressControl, requestParser);
+ } else {
+ multipartRequest = new MultipartRequestSizeExceeded(request, uploadId, progressControl);
+ }
+
+ request.setAttribute(MultipartRequest.REQUEST_ATTRIBUTE_NAME, multipartRequest);
+
+ return multipartRequest;
+ }
+
}
Added: trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadPhaseListener.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadPhaseListener.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/context/FileUploadPhaseListener.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.context;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.http.HttpServletResponse;
+
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
+import org.richfaces.request.MultipartRequest;
+import org.richfaces.request.MultipartRequest.ResponseState;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class FileUploadPhaseListener implements PhaseListener {
+
+ private static final long serialVersionUID = -3130357236442351405L;
+
+ private static final Logger LOGGER = RichfacesLogger.CONTEXT.getLogger();
+
+ public void afterPhase(PhaseEvent event) {
+ }
+
+ public void beforePhase(PhaseEvent event) {
+ MultipartRequest multipartRequest = (MultipartRequest) event.getFacesContext().getExternalContext().getRequestMap().get(MultipartRequest.REQUEST_ATTRIBUTE_NAME);
+ if (multipartRequest != null) {
+ if (multipartRequest.getResponseState() != ResponseState.ok) {
+ printResponse(event.getFacesContext(), multipartRequest);
+ }
+ }
+ }
+
+
+ private void printResponse(FacesContext facesContext, MultipartRequest multipartRequest) {
+ facesContext.responseComplete();
+ ExternalContext externalContext = facesContext.getExternalContext();
+ externalContext.setResponseStatus(HttpServletResponse.SC_OK);
+ externalContext.setResponseContentType("text/html");
+ try {
+ Writer writer = externalContext.getResponseOutputWriter();
+ writer.write("<html id=\"" + FileUploadFacesContextFactory.UID_KEY + multipartRequest.getUploadId() + ":" + multipartRequest.getResponseState() + "\"/>");
+ writer.close();
+ } catch (IOException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.RENDER_RESPONSE;
+ }
+
+}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequest25.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequest25.java 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequest25.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -28,6 +28,7 @@
import javax.servlet.http.HttpServletRequest;
+import org.richfaces.exception.FileUploadException;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.model.UploadedFile;
@@ -57,20 +58,38 @@
}
};
- private Multimap<String, String> params;
-
- private Iterable<UploadedFile> uploadedFiles;
-
+ private MultipartRequestParser requestParser;
+
private ResponseState responseState;
+ private Iterable<UploadedFile> uploadedFiles;
+
+ private Multimap<String, String> params;
+
public MultipartRequest25(HttpServletRequest request, String uploadId, ProgressControl progressControl,
- Multimap<String, String> params, Iterable<UploadedFile> uploadedFiles, ResponseState responseState) {
+ MultipartRequestParser requestParser) {
+
super(request, uploadId, progressControl);
- this.params = params;
- this.uploadedFiles = uploadedFiles;
- this.responseState = responseState;
+ this.requestParser = requestParser;
}
+
+ private void parseIfNecessary() {
+ if (responseState != null) {
+ return;
+ }
+
+ try {
+ requestParser.parse();
+
+ uploadedFiles = requestParser.getUploadedFiles();
+ params = requestParser.getParameters();
+ responseState = ResponseState.ok;
+ } catch (FileUploadException e) {
+ LOGGER.error(e.getMessage(), e);
+ responseState = ResponseState.serverError;
+ }
+ }
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@@ -84,6 +103,7 @@
result.add(name);
}
+ parseIfNecessary();
result.addAll(params.keySet());
return Iterators.asEnumeration(result.iterator());
@@ -91,11 +111,13 @@
@Override
public String getParameter(String name) {
+
String parameter = super.getParameter(name);
if (parameter != null) {
return parameter;
}
+ parseIfNecessary();
Collection<String> values = params.get(name);
if (values.isEmpty()) {
@@ -112,6 +134,7 @@
return parameterValues;
}
+ parseIfNecessary();
Collection<String> values = params.get(name);
if (values.isEmpty()) {
@@ -125,28 +148,35 @@
@Override
public Map getParameterMap() {
Map parameterMap = Maps.newHashMap(super.getParameterMap());
+ parseIfNecessary();
parameterMap.putAll(Maps.transformValues(params.asMap(), MULTIMAP_VALUE_TRANSFORMER));
return parameterMap;
}
public Iterable<UploadedFile> getUploadedFiles() {
+ parseIfNecessary();
+
return uploadedFiles;
}
public void release() {
super.release();
- for (UploadedFile uploadedFile : uploadedFiles) {
- try {
- uploadedFile.delete();
- } catch (IOException e) {
- LOGGER.error(e.getMessage(), e);
+ if (uploadedFiles != null) {
+ for (UploadedFile uploadedFile : uploadedFiles) {
+ try {
+ uploadedFile.delete();
+ } catch (IOException e) {
+ LOGGER.error(e.getMessage(), e);
+ }
}
}
}
public ResponseState getResponseState() {
+ parseIfNecessary();
+
return responseState;
}
Added: trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequestSizeExceeded.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequestSizeExceeded.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/request/MultipartRequestSizeExceeded.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.request;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.richfaces.model.UploadedFile;
+
+import com.google.common.collect.Lists;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class MultipartRequestSizeExceeded extends BaseMultipartRequest {
+
+ public MultipartRequestSizeExceeded(HttpServletRequest request, String uploadId, ProgressControl progressControl) {
+ super(request, uploadId, progressControl);
+ }
+
+ public ResponseState getResponseState() {
+ return ResponseState.sizeExceeded;
+ }
+
+ public Iterable<UploadedFile> getUploadedFiles() {
+ return Lists.newArrayList();
+ }
+}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/request/ProgressControl.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/request/ProgressControl.java 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/request/ProgressControl.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -44,8 +44,7 @@
private byte lastUpdatedPercentValue;
- public ProgressControl(Map<String, Object> contextMap, String uploadId, long length) {
- this.contextMap = contextMap;
+ public ProgressControl(String uploadId, long length) {
this.attributeName = getContextAttributeName(uploadId);
this.length = length;
}
@@ -65,7 +64,9 @@
}
void clearProgress() {
- contextMap.remove(attributeName);
+ if (contextMap != null) {
+ contextMap.remove(attributeName);
+ }
}
public void advance(long bytesRead) {
@@ -78,12 +79,16 @@
percent = 100;
}
- if (percent > lastUpdatedPercentValue) {
+ if (percent > lastUpdatedPercentValue && contextMap != null) {
lastUpdatedPercentValue = percent;
contextMap.put(attributeName, lastUpdatedPercentValue);
}
}
+ public void setContextMap(Map<String, Object> contextMap) {
+ this.contextMap = contextMap;
+ }
+
public ServletInputStream wrapStream(ServletInputStream inputStream) {
return new ProgressServletInputStream(inputStream, this);
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/fileupload.faces-config.xml
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/fileupload.faces-config.xml 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/main/resources/META-INF/fileupload.faces-config.xml 2011-04-21 17:59:08 UTC (rev 22439)
@@ -29,6 +29,8 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<factory>
<faces-context-factory>org.richfaces.context.FileUploadFacesContextFactory</faces-context-factory>
- <external-context-factory>org.richfaces.context.FileUploadExternalContextFactory</external-context-factory>
</factory>
+ <lifecycle>
+ <phase-listener>org.richfaces.context.FileUploadPhaseListener</phase-listener>
+ </lifecycle>
</faces-config>
Modified: trunk/ui/input/ui/src/test/java/org/richfaces/request/ProgressControlTest.java
===================================================================
--- trunk/ui/input/ui/src/test/java/org/richfaces/request/ProgressControlTest.java 2011-04-21 15:55:38 UTC (rev 22438)
+++ trunk/ui/input/ui/src/test/java/org/richfaces/request/ProgressControlTest.java 2011-04-21 17:59:08 UTC (rev 22439)
@@ -44,7 +44,8 @@
@Test
public void testAdvance() throws Exception {
Map<String, Object> contextMap = Maps.newHashMap();
- ProgressControl control = new ProgressControl(contextMap, UPLOAD_ID, 400);
+ ProgressControl control = new ProgressControl(UPLOAD_ID, 400);
+ control.setContextMap(contextMap);
assertNull(contextMap.get(ATTRIBUTE_NAME));
control.advance(1);
@@ -63,7 +64,8 @@
@Test
public void testClearProgress() throws Exception {
Map<String, Object> contextMap = Maps.newHashMap();
- ProgressControl control = new ProgressControl(contextMap, UPLOAD_ID, 100);
+ ProgressControl control = new ProgressControl(UPLOAD_ID, 100);
+ control.setContextMap(contextMap);
assertNull(contextMap.get(ATTRIBUTE_NAME));
control.advance(50);
13 years, 8 months