Author: ilya_shaikovsky
Date: 2008-08-11 07:24:45 -0400 (Mon, 11 Aug 2008)
New Revision: 10017
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/snippets/process.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/ValidationBean.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-4123
organiser sample fix (datamodel bean registered and scoped as session).
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/ValidationBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/ValidationBean.java 2008-08-11
10:26:44 UTC (rev 10016)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/validation/ValidationBean.java 2008-08-11
11:24:45 UTC (rev 10017)
@@ -16,6 +16,8 @@
*/
public class ValidationBean {
+ private String progressString="Fill the form please";
+
@NotEmpty
@Length(min=3,max=12)
private String name;
@@ -53,4 +55,15 @@
public void setAge(int age) {
this.age = age;
}
+ public void success() {
+ setProgressString(getProgressString() + "(Strored successfully)");
+ }
+
+ public String getProgressString() {
+ return progressString;
+ }
+
+ public void setProgressString(String progressString) {
+ this.progressString = progressString;
+ }
}
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-08-11
10:26:44 UTC (rev 10016)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -376,7 +376,7 @@
<managed-bean>
<managed-bean-name>validationBean</managed-bean-name>
<managed-bean-class>org.richfaces.demo.validation.ValidationBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>dayStatistics</managed-bean-name>
@@ -393,6 +393,11 @@
<managed-bean-class>org.richfaces.demo.stateApi.LoginAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>calendarDataModel</managed-bean-name>
+
<managed-bean-class>org.richfaces.demo.calendar.modelImpl.CalendarDataModelImpl</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/richfaces/include/examples/wstep1.xhtml</from-view-id>
<navigation-case>
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/snippets/process.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/snippets/process.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/snippets/process.xhtml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -0,0 +1,8 @@
+<h:inputText value="#{bean.name}" id="name">
+ <a4j:support ajaxSingle="true" process="email"
event="onblur" reRender="someOut"/>
+</h:inputText>
+<h:inputTextarea value="#{bean.description}" id="desc">
+</h:inputTextarea>
+<h:inputText value="#{bean.email}" id="email">
+ <a4j:support ajaxSingle="true" process="name"
event="onblur" reRender="someOut"/>
+</h:inputText>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-11
10:26:44 UTC (rev 10016)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/beanValidator/examples/simple.xhtml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -8,7 +8,7 @@
<h:form>
<rich:panel>
<f:facet name="header">
- <h:outputText value="User Info:" />
+ <h:outputText value="#{validationBean.progressString}"
id="progress"/>
</f:facet>
<h:panelGrid columns="3">
<h:outputText value="Name:" />
@@ -26,9 +26,10 @@
<rich:beanValidator summary="Wrong age"/>
</h:inputText>
<rich:message for="age" />
+ <f:facet name="footer">
+ <a4j:commandButton value="Submit"
action="#{validationBean.success}" reRender="progress"/>
+ </f:facet>
</h:panelGrid>
- <a4j:commandButton value="Submit"/>
- <rich:messages />
</rich:panel>
</h:form>
</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-08-11
10:26:44 UTC (rev 10016)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -12,7 +12,6 @@
font-family: Arial, Verdana;
}
</style>
-
<h:form>
<h:panelGrid id="panel" columns="2" columnClasses="ecol1,
ecol2">
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml 2008-08-11
10:26:44 UTC (rev 10016)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/organiser.xhtml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -28,7 +28,7 @@
<a4j:support event="onchanged"
oncomplete="#{rich:component('panel')}.show()"
reRender="editContent"/>
</rich:calendar>
</h:form>
- <rich:modalPanel id="panel">
+ <rich:modalPanel id="panel" resizeable="false">
<f:facet name="header">Edit Day:</f:facet>
<f:facet name="controls">
<h:panelGroup>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-11
10:26:44 UTC (rev 10016)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-11
11:24:45 UTC (rev 10017)
@@ -31,7 +31,6 @@
<td align="center" width="100px">
<rich:inputNumberSpinner minValue="0" maxValue="24"
value="#{pt.time}" id="time">
- <rich:ajaxValidator event="onblur" />
</rich:inputNumberSpinner>
</td>
<td>