Author: ilya_shaikovsky
Date: 2011-02-04 09:55:49 -0500 (Fri, 04 Feb 2011)
New Revision: 21454
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/ValidationBean.java
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsfValidators.xhtml
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsr303.xhtml
Log:
corrections to CSV demos
Modified:
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/ValidationBean.java
===================================================================
---
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/ValidationBean.java 2011-02-04
14:51:15 UTC (rev 21453)
+++
trunk/examples/richfaces-showcase/src/main/java/org/richfaces/demo/validation/ValidationBean.java 2011-02-04
14:55:49 UTC (rev 21454)
@@ -6,16 +6,15 @@
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
-import org.hibernate.validator.constraints.Length;
-
@ManagedBean
@RequestScoped
public class ValidationBean {
- @Length(min = 3, max = 12)
+ @Size(min=3, max=12)
private String name = null;
- @Pattern(regexp =
"^[\\w\\-]([\\.\\w])+[\\w]+(a)([\\w\\-]+\\.)+[a-zA-Z]{2,4}$")
+ @Pattern(regexp =
"^[\\w\\-]([\\.\\w])+[\\w]+(a)([\\w\\-]+\\.)+[a-zA-Z]{2,4}$" , message="Bad
email")
private String email = null;
@Min(value = 18)
@Max(value = 99)
@@ -23,7 +22,7 @@
private String country;
private String jobTitle;
@AssertTrue
- private boolean agreed;
+ private boolean agreed = true;
public boolean isAgreed() {
return agreed;
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsfValidators.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsfValidators.xhtml 2011-02-04
14:51:15 UTC (rev 21453)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsfValidators.xhtml 2011-02-04
14:55:49 UTC (rev 21454)
@@ -16,8 +16,7 @@
client vlidators available and then send Ajax request for unknown to
get results from server side.</p>
<p>In that sample - pay attention that no requests fired when
- typing wrong values in first two fields. And Ajax request used to
- validate the last one.</p>
+ typing wrong values in first the fields. </p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}"
/>
@@ -28,7 +27,7 @@
<fieldset>
<legend><b>Notes:</b></legend>
<ul>
- <li>Some validators still not implemented. Them will start work transparently for
you after new snapshots with implementations added</li>
+ <li>Some JSR-303 validators still not implemented. Them will start work
transparently for you after new snapshots with implementations added</li>
<li>We will provide information about how to provide client validation for custom
validators soon!</li>
</ul>
</fieldset>
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsr303.xhtml
===================================================================
---
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsr303.xhtml 2011-02-04
14:51:15 UTC (rev 21453)
+++
trunk/examples/richfaces-showcase/src/main/webapp/richfaces/clientValidation/jsr303.xhtml 2011-02-04
14:55:49 UTC (rev 21454)
@@ -16,8 +16,8 @@
client vlidators available and then send Ajax request for unknown to
get results from server side.</p>
<p>In that sample - pay attention that no requests fired when
- typing wrong values in first two fields. And Ajax request used to
- validate the last one.</p>
+ typing wrong values in all the fields and only checkbox activation
+ causes Ajax fallback.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}"
/>
@@ -25,19 +25,29 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
- <fieldset>
- <legend><b>Notes:</b></legend>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src"
value="/WEB-INF/src/org/richfaces/demo/validation/ValidationBean.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View ValidationBean Source"
/>
+ <ui:param name="hideLabel" value="Hide ValidationBean Source"
/>
+ </ui:include>
+ <fieldset><legend><b>Notes:</b></legend>
<ul>
- <li>Some validators still not implemented. Them will start work transparently for
you after new snapshots with implementations added</li>
- <li>We will provide information about how to provide client validation for custom
validators soon!</li>
+ <li>Some JSR-303 validators still not implemented. Them will
+ start work transparently for you after new snapshots with
+ implementations added</li>
+ <li>We will provide information about how to provide client
+ validation for custom validators soon!</li>
</ul>
</fieldset>
- <fieldset>
- <legend><b>What to expect additionally:</b></legend>
- After we will complete all standard validators migration and instructions for custom
ones we plan to work on next features:
+ <fieldset><legend><b>What to expect
+ additionally:</b></legend> After we will complete all standard validators
migration
+ and instructions for custom ones we plan to work on next features:
<ul>
- <li>Client Validation for submit components to perform bulk form
validation.</li>
- <li>Ways of default validation definitions without usage of
<b><rich:validator/></b> tag for every input.</li>
+ <li>Client Validation for submit components to perform bulk form
+ validation.</li>
+ <li>Ways of default validation definitions without usage of
<b><rich:validator/></b>
+ tag for every input.</li>
</ul>
</fieldset>
</ui:composition>