Author: ilya_shaikovsky
Date: 2011-02-07 08:30:27 -0500 (Mon, 07 Feb 2011)
New Revision: 21500
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/web.xml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml
Log:
Messages and Object validator pre-release polishing.
(replacing re-render to ajaxRendered)
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
---
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tables/CarsBean.java 2011-02-07
13:30:27 UTC (rev 21500)
@@ -34,7 +34,7 @@
private List<InventoryVendorList> inventoryVendorLists = null;
private int currentCarIndex;
private InventoryItem editedCar;
- private int page;
+ private int page = 1;
public void remove() {
allInventoryItems.remove(allInventoryItems.get(currentCarIndex));
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-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -189,7 +189,7 @@
</sample>
</samples>
</demo>
- <!-- demo new="true">
+ <demo new="true">
<id>graphValidator</id>
<name>rich:graphValidator</name>
<samples>
@@ -198,7 +198,7 @@
<name>Object validation using rich:graphValidator</name>
</sample>
</samples>
- </demo-->
+ </demo>
<demo new="true">
<id>message</id>
<name>rich:message</name>
Modified: trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/web.xml 2011-02-07 13:00:15
UTC (rev 21499)
+++ trunk/examples/richfaces-showcase/src/main/webapp/WEB-INF/web.xml 2011-02-07 13:30:27
UTC (rev 21500)
@@ -25,7 +25,7 @@
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
+ <param-value>server</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/dataTableEdit.xhtml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -1,12 +1,25 @@
<!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">
-
- <ui:composition>
+
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">
+
+<ui:composition>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
-
- </ui:composition>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="#{demoNavigator.sampleIncludeURI}"
/>
+ <ui:param name="sourceType" value="xhtml" />
+ <ui:param name="openLabel" value="View Source" />
+ <ui:param name="hideLabel" value="Hide Source" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src"
+ value="/WEB-INF/src/org/richfaces/demo/tables/CarsBean.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View CarsBean Source" />
+ <ui:param name="hideLabel" value="Hide CarsBean Source" />
+ </ui:include>
+
+</ui:composition>
</html>
\ No newline at end of file
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/dataTable/samples/dataTableEdit-sample.xhtml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -16,9 +16,6 @@
<h:form id="form">
<rich:dataTable value="#{carsBean.allInventoryItems}" var="car"
iterationStatusVar="it" id="table" rows="15">
- <f:facet name="noData">
- Nothing found
- </f:facet>
<rich:column>
<f:facet name="header">#</f:facet>
#{it.index}
@@ -80,7 +77,7 @@
<a4j:commandButton value="Delete" onclick="remove(); return
false;" />
</rich:popupPanel>
- <rich:popupPanel header="Edit Car Details" id="editPane"
domElementAttachment="parent">
+ <rich:popupPanel header="Edit Car Details" id="editPane"
domElementAttachment="parent" width="400" height="170">
<h:panelGrid columns="3" id="editGrid">
<h:outputText value="Vendor" />
<h:outputText value="#{carsBean.editedCar.vendor}" />
@@ -91,22 +88,29 @@
<h:outputText value="Price" />
<h:inputText value="#{carsBean.editedCar.price}"
required="true"
requiredMessage="Price is required" id="price"
- validatorMessage="Should be a valid price" label="Price field"
/>
+ converterMessage="Should be a valid price"
+ validatorMessage="Should be a valid price" label="Price
field">
+ <f:validateDoubleRange/>
+ </h:inputText>
<rich:message id="priceMsg" for="price"
ajaxRendered="true"/>
<h:outputText value="Mileage" />
<h:inputText value="#{carsBean.editedCar.mileage}" id="mage"
- validatorMessage="Should be a valid mileage" label="Mileage
field" />
+ converterMessage="Should be a valid mileage"
+ validatorMessage="Should be a valid mileage" label="Mileage
field" >
+ <f:validateDoubleRange/>
+ </h:inputText>
<rich:message id="madeMsg" for="mage"
ajaxRendered="true"/>
<h:outputText value="VIN" />
<h:inputText value="#{carsBean.editedCar.vin}" id="vin"
required="true" validatorMessage="Not a valid 17-digit VIN"
+ converterMessage="Not a valid 17-digit VIN"
requiredMessage="VIN is required">
<f:validateLength minimum="17" maximum="17" />
</h:inputText>
<rich:message id="vinMsg" for="vin"
ajaxRendered="true"/>
</h:panelGrid>
<a4j:commandButton value="Store" action="#{carsBean.store}"
- render="#{facesContext.maximumSeverity==null?'table':'priceMsg,vinMsg,madeMsg'}"
execute="@form"
+ render="table" execute="editPane"
oncomplete="if (#{facesContext.maximumSeverity==null})
{#{rich:component('editPane')}.hide();}" />
<a4j:commandButton value="Cancel"
onclick="#{rich:component('editPane')}.hide(); return false;"
/>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/graphValidator/samples/graphValidator-sample.xhtml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -16,34 +16,33 @@
}
</style>
<h:form id="graphValidatorForm2">
- <a4j:region renderRegionOnly="true">
- <rich:graphValidator summary="Invalid values: "
- value="#{dayStatistics}">
- <table>
- <thead>
+ <rich:graphValidator summary="Invalid values: "
+ value="#{dayStatistics}">
+ <table>
+ <thead>
+ <tr>
+ <th>Activity</th>
+ <th>Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ <a4j:repeat value="#{dayStatistics.dayPasstimes}" var="pt"
+ id="table">
<tr>
- <th>Activity</th>
- <th>Time</th>
+ <td align="center" width="100px"><h:outputText
+ value="#{pt.title}" /></td>
+ <td align="center"
width="100px"><rich:inputNumberSpinner
+ minValue="0" maxValue="24" value="#{pt.time}"
id="time">
+ </rich:inputNumberSpinner></td>
+ <td><rich:message for="time"
ajaxRendered="true"/></td>
</tr>
- </thead>
- <tbody>
- <a4j:repeat value="#{dayStatistics.dayPasstimes}" var="pt"
- id="table">
- <tr>
- <td align="center" width="100px"><h:outputText
- value="#{pt.title}" /></td>
- <td align="center"
width="100px"><rich:inputNumberSpinner
- minValue="0" maxValue="24" value="#{pt.time}"
id="time">
- </rich:inputNumberSpinner></td>
- <td><rich:message for="time" /></td>
- </tr>
- </a4j:repeat>
- </tbody>
- </table>
- </rich:graphValidator>
- <a4j:commandButton value="Store my details"
- actionListener="#{dayStatistics.store}" reRender="panel" />
- <rich:messages infoClass="green" errorClass="red" />
- </a4j:region>
+ </a4j:repeat>
+ </tbody>
+ </table>
+ </rich:graphValidator>
+ <a4j:commandButton value="Store my details"
+ actionListener="#{dayStatistics.store}" />
+ <br />
+ <rich:messages infoClass="green" errorClass="red"
ajaxRendered="true" />
</h:form>
</ui:composition>
\ No newline at end of file
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/message/samples/message-sample.xhtml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -17,28 +17,27 @@
value="#{userBean.name}">
<f:validateLength minimum="3" />
</h:inputText>
- <rich:message for="name"/>
+ <rich:message for="name" ajaxRendered="true"/>
<h:outputText value="Job:" />
<h:inputText label="Job" id="job" required="true"
value="#{userBean.job}">
<f:validateLength minimum="3" maximum="50" />
</h:inputText>
- <rich:message for="job"/>
+ <rich:message for="job" ajaxRendered="true"/>
<h:outputText value="Address:" />
<h:inputText label="Address" id="address"
required="true"
value="#{userBean.address}">
<f:validateLength minimum="10" />
</h:inputText>
- <rich:message for="address"/>
+ <rich:message for="address" ajaxRendered="true"/>
<h:outputText value="Zip:" />
<h:inputText label="Zip" id="zip" required="true"
value="#{userBean.zip}">
<f:validateLength minimum="4" maximum="9" />
</h:inputText>
- <rich:message for="zip"/>
+ <rich:message for="zip" ajaxRendered="true"/>
<f:facet name="footer">
- <a4j:commandButton value="Ajax Validate" render="@form"/>
- <h:commandButton value="Common Validate" />
+ <a4j:commandButton value="Ajax Validate"/>
</f:facet>
</h:panelGrid>
</h:form>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml 2011-02-07
13:00:15 UTC (rev 21499)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/messages/samples/messages-sample.xhtml 2011-02-07
13:30:27 UTC (rev 21500)
@@ -11,8 +11,7 @@
</f:facet>
<h:form>
- <rich:messages
- showSummary="true" showDetail="true"/>
+ <rich:messages ajaxRendered="true"/>
<h:panelGrid columns="2">
<h:outputText value="Name:" />
<h:inputText label="Name" id="name" required="true"
@@ -35,8 +34,7 @@
<f:validateLength minimum="4" maximum="9" />
</h:inputText>
<f:facet name="footer">
- <a4j:commandButton value="Ajax Validate" render="@form"/>
- <h:commandButton value="Common Validate"/>
+ <a4j:commandButton value="Ajax Validate"/>
</f:facet>
</h:panelGrid>
</h:form>