Author: alexsmirnov
Date: 2011-02-02 19:20:44 -0500 (Wed, 02 Feb 2011)
New Revision: 21404
Added:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/PatternBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/SizeBean.java
Removed:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
trunk/examples/validator-demo/src/main/webapp/examples/client-validator.xhtml
Modified:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
trunk/examples/validator-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/examples/validator-demo/src/main/webapp/examples/ajax-validator.xhtml
trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
Log:
CODING IN PROGRESS - issue RF-10311: CSV: JSR-303 validators works using ajax falback only
https://issues.jboss.org/browse/RF-10311
Modified: trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/DataBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -16,31 +16,36 @@
*/
public class DataBean {
- private final List<Validable> beans;
+ private final List<Validable<?>> beans;
/**
* @return the beans
*/
@Valid
- public List<Validable> getBeans() {
+ public List<Validable<?>> getBeans() {
return beans;
}
public DataBean() {
- beans = new ArrayList<Validable>(6);
+ beans = new ArrayList<Validable<?>>(7);
beans.add(new NotNullBean());
beans.add(new NotEmptyBean());
- beans.add(new LengthBean());
+ beans.add(new SizeBean());
beans.add(new MinBean());
beans.add(new MaxBean());
beans.add(new MinMaxBean());
+ beans.add(new PatternBean());
}
@Max(value=20,message="Total value should be less then 20")
public int getTotal(){
int total = 0;
- for (Validable bean : beans) {
- total += bean.getIntValue();
+ for (Validable<?> bean : beans) {
+ Object value = bean.getValue();
+ if (value instanceof Integer) {
+ Integer intValue = (Integer) value;
+ total += intValue;
+ }
}
return total;
}
Deleted:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -1,64 +0,0 @@
-/**
- *
- */
-package org.richfaces.example;
-
-import org.hibernate.validator.constraints.Length;
-
-
-/**
- * @author asmirnov
- *
- */
-public class LengthBean implements Validable {
-
- @Length(max=10,min=2,message="incorrect field length")
- private String text;
-
- private int intValue;
-
- /**
- * @return the text
- */
- public String getText() {
- return text;
- }
-
- /**
- * @param text the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
-
- /**
- * @return the intValue
- */
- public int getIntValue() {
- return intValue;
- }
-
- /**
- * @param intValue the intValue to set
- */
- public void setIntValue(int intValue) {
- this.intValue = intValue;
- }
-
- public String getTextDescription() {
- return "Validate String Length, for a range 2-10 chars";
- }
-
- public String getIntDescription() {
- return "Integer Value, no restrictions";
- }
-
- public String getIntSummary() {
- return "Invalid user name";
- }
-
- public String getTextSummary() {
- return "Invalid user name";
- }
-
-}
Modified: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MaxBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -12,56 +12,32 @@
* @author asmirnov
*
*/
-public class MaxBean implements Validable {
+public class MaxBean implements Validable<Integer> {
- private String text;
-
@Max(10)
- private int intValue;
+ private Integer value = 0;
/**
- * @return the text
- */
- @Email
- public String getText() {
- return text;
- }
-
- /**
- * @param text the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
-
- /**
* @return the intValue
*/
- public int getIntValue() {
- return intValue;
+ public Integer getValue() {
+ return value;
}
/**
* @param intValue the intValue to set
*/
- public void setIntValue(int intValue) {
- this.intValue = intValue;
+ public void setValue(Integer intValue) {
+ this.value = intValue;
}
- public String getTextDescription() {
- return "Text value, should be correct email address";
- }
- public String getIntDescription() {
+ public String getDescription() {
return "Integer Value, less then 10";
}
- public String getIntSummary() {
- return "Invalid number of items";
- }
+ public String getLabel() {
+ return "max";
+ }
- public String getTextSummary() {
- return "Invalid payment card";
- }
-
}
Modified: trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -10,58 +10,32 @@
* @author asmirnov
*
*/
-public class MinBean implements Validable {
+public class MinBean implements Validable<Integer> {
- private String text;
-
@Min(2)
- private int intValue;
+ private Integer value=2;
/**
- * @return the text
- */
- public String getText() {
- return text;
- }
-
- /**
- * @param text the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
-
- /**
* @return the intValue
*/
- public int getIntValue() {
- return intValue;
+ public Integer getValue() {
+ return value;
}
/**
* @param intValue the intValue to set
*/
- public void setIntValue(int intValue) {
- this.intValue = intValue;
+ public void setValue(Integer intValue) {
+ this.value = intValue;
}
- public String getTextDescription() {
- return "Text value, no restrictions";
- }
- public String getIntDescription() {
- // TODO Auto-generated method stub
- return "Integer Value, more then 1";
+ public String getDescription() {
+ return "Integer Value, more then 2";
}
- public String getIntSummary() {
- // TODO Auto-generated method stub
- return "Invalid rooms qty";
- }
+ public String getLabel() {
+ return "min";
+ }
- public String getTextSummary() {
- // TODO Auto-generated method stub
- return null;
- }
-
}
Modified:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/MinMaxBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -11,59 +11,32 @@
* @author asmirnov
*
*/
-public class MinMaxBean implements Validable {
+public class MinMaxBean implements Validable<Integer> {
- private String text;
-
@Min(2)
@Max(10)
- private int intValue;
+ private Integer value = 0;
/**
- * @return the text
- */
- public String getText() {
- return text;
- }
-
- /**
- * @param text the text to set
- */
- public void setText(String text) {
- this.text = text;
- }
-
- /**
* @return the intValue
*/
- public int getIntValue() {
- return intValue;
+ public Integer getValue() {
+ return value;
}
/**
* @param intValue the intValue to set
*/
- public void setIntValue(int intValue) {
- this.intValue = intValue;
+ public void setValue(Integer intValue) {
+ this.value = intValue;
}
- public String getTextDescription() {
- return "Text Value, no restrictions";
- }
-
- public String getIntDescription() {
- // TODO Auto-generated method stub
+ public String getDescription() {
return "Integer Value, valid values from 2 to 10";
}
- public String getIntSummary() {
- // TODO Auto-generated method stub
- return "Invalid price";
- }
+ public String getLabel() {
+ return "minMax";
+ }
- public String getTextSummary() {
- // TODO Auto-generated method stub
- return null;
- }
-
}
Modified:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotEmptyBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -10,58 +10,30 @@
* @author asmirnov
*
*/
-public class NotEmptyBean implements Validable {
+public class NotEmptyBean implements Validable<String> {
@NotEmpty
- private String text;
+ private String value;
- private int intValue;
-
/**
* @return the text
*/
- public String getText() {
- return text;
+ public String getValue() {
+ return value;
}
/**
* @param text the text to set
*/
- public void setText(String text) {
- this.text = text;
+ public void setValue(String text) {
+ this.value = text;
}
- /**
- * @return the intValue
- */
- public int getIntValue() {
- return intValue;
- }
-
- /**
- * @param intValue the intValue to set
- */
- public void setIntValue(int intValue) {
- this.intValue = intValue;
- }
-
- public String getTextDescription() {
+ public String getDescription() {
return "Text value, Not Empty Validation";
}
+ public String getLabel() {
+ return "notEmpty";
+ }
- public String getIntDescription() {
- // TODO Auto-generated method stub
- return "Integer Value, no restrictions";
- }
-
- public String getIntSummary() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getTextSummary() {
- // TODO Auto-generated method stub
- return "Invalid password";
- }
-
}
Modified:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/NotNullBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -10,58 +10,30 @@
* @author asmirnov
*
*/
-public class NotNullBean implements Validable {
+public class NotNullBean implements Validable<String> {
@NotNull
- private String text;
+ private String value;
- private int intValue;
-
/**
* @return the text
*/
- public String getText() {
- return text;
+ public String getValue() {
+ return value;
}
/**
* @param text the text to set
*/
- public void setText(String text) {
- this.text = text;
+ public void setValue(String text) {
+ this.value = text;
}
- /**
- * @return the intValue
- */
- public int getIntValue() {
- return intValue;
- }
-
- /**
- * @param intValue the intValue to set
- */
- public void setIntValue(int intValue) {
- this.intValue = intValue;
- }
-
- public String getTextDescription() {
+ public String getDescription() {
return "Text Value, Not Null Validation";
}
+ public String getLabel() {
+ return "notNull";
+ }
- public String getIntDescription() {
- // TODO Auto-generated method stub
- return "Integer Value, no restrictions";
- }
-
- public String getIntSummary() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String getTextSummary() {
- // TODO Auto-generated method stub
- return "Invalid address";
- }
-
}
Added: trunk/examples/validator-demo/src/main/java/org/richfaces/example/PatternBean.java
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/PatternBean.java
(rev 0)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/PatternBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -0,0 +1,39 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Pattern;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class PatternBean implements Validable<String> {
+
+ private String value;
+
+ /**
+ * @return the text
+ */
+ @Pattern(regexp="^[a-Z][a-Z1-9_]$")
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setValue(String text) {
+ this.value = text;
+ }
+
+ public String getDescription() {
+ return "Text Value, Pattern '^[a-Z][a-Z1-9_]$' Validation";
+ }
+ public String getLabel() {
+ return "pattern";
+ }
+
+}
Property changes on:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/PatternBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/examples/validator-demo/src/main/java/org/richfaces/example/SizeBean.java
(from rev 21402,
trunk/examples/validator-demo/src/main/java/org/richfaces/example/LengthBean.java)
===================================================================
--- trunk/examples/validator-demo/src/main/java/org/richfaces/example/SizeBean.java
(rev 0)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/SizeBean.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.richfaces.example;
+
+import javax.validation.constraints.Size;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class SizeBean implements Validable<String> {
+
+ @Size(max=10,min=2,message="incorrect field length")
+ private String value;
+
+
+ /**
+ * @return the text
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setValue(String text) {
+ this.value = text;
+ }
+
+
+ public String getDescription() {
+ return "Validate String Length, for a range 2-10 chars";
+ }
+
+ public String getLabel() {
+ return "size";
+ }
+
+
+}
Modified:
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java
===================================================================
---
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/java/org/richfaces/example/Validable.java 2011-02-03
00:20:44 UTC (rev 21404)
@@ -7,15 +7,13 @@
* @author asmirnov
*
*/
-public interface Validable {
+public interface Validable<T> {
- public String getText();
+ T getValue();
- public String getTextDescription();
+ void setValue(T value);
+
+ String getDescription();
- public String getTextSummary();
-
- public int getIntValue();
-
- public String getIntSummary();
+ String getLabel();
}
Modified: trunk/examples/validator-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/WEB-INF/faces-config.xml 2011-02-02
22:56:49 UTC (rev 21403)
+++ trunk/examples/validator-demo/src/main/webapp/WEB-INF/faces-config.xml 2011-02-03
00:20:44 UTC (rev 21404)
@@ -6,6 +6,11 @@
<managed-bean-class>org.richfaces.example.Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+<managed-bean>
+ <managed-bean-name>dataBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.example.DataBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+</managed-bean>
<validator>
<validator-id>custom</validator-id>
<validator-class>org.richfaces.example.CustomValidator</validator-class>
Modified: trunk/examples/validator-demo/src/main/webapp/examples/ajax-validator.xhtml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/examples/ajax-validator.xhtml 2011-02-02
22:56:49 UTC (rev 21403)
+++ trunk/examples/validator-demo/src/main/webapp/examples/ajax-validator.xhtml 2011-02-03
00:20:44 UTC (rev 21404)
@@ -1,17 +1,26 @@
<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:csv="http://richfaces.org/csv">
- <h:head><title>Ajax validator</title></h:head>
- <h:body>
- <h:form id="form">
- <h:inputText id="text" value="#{test.value}">
- <f:validator validatorId="custom" />
- <csv:validator event="blur" />
- </h:inputText>
- <h:outputText id="out"
value="#{test.value}"></h:outputText>
- <csv:message id="uiMessage" for="text" />
- </h:form>
- <csv:messages/>
- </h:body>
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:csv="http://richfaces.org/csv"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
+<ui:composition template="/layout/template.xhtml">
+ <ui:param name="title" value="JSF validator by AJAX" />
+ <!-- Page header -->
+ <ui:define name="header">
+ <h1><csv:validator> usage</h1>
+ </ui:define>
+ <!-- content -->
+ <ui:define name="content">
+ <h:form id="form">
+ <h:inputText id="text" value="#{test.value}">
+ <f:validator validatorId="custom" />
+ <csv:validator event="blur" />
+ </h:inputText>
+ <h:outputText id="out"
value="#{test.value}"></h:outputText>
+ <csv:message id="uiMessage" for="text" />
+ </h:form>
+ <csv:messages />
+ </ui:define>
+</ui:composition>
</html>
Modified: trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml
===================================================================
--- trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml 2011-02-02
22:56:49 UTC (rev 21403)
+++ trunk/examples/validator-demo/src/main/webapp/examples/beanValidation.xhtml 2011-02-03
00:20:44 UTC (rev 21404)
@@ -1,36 +1,33 @@
-<!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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich"
-
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:csv="http://richfaces.org/csv"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition template="/layout/template.xhtml">
- <ui:param name="title" value="<rich:beanValidator>
usage" />
- <ui:param name="javaBean" value="org/richfaces/example/Bean.java"
/>
+ <ui:param name="title" value="<csv:validator> usage for
JSR-303" />
<!-- Page header -->
<ui:define name="header">
- <h1><rich:beanValidator> usage</h1>
+ <h1><csv:alidator> usage with JSR-303</h1>
</ui:define>
<!-- content -->
<ui:define name="content">
- <h:form id="form">
- <h:panelGrid columns="3">
- <h:outputLabel for="email" value="Email Address:" />
- <h:inputText id="email" value="#{bean.email}"
label="Email">
- <rich:beanValidator summary="Invalid Email address"/>
- </h:inputText>
- <rich:message for="email"/>
- <h:outputLabel for="card" value="Credit card number:" />
- <h:inputText id="card" value="#{bean.creditCardNumber}"
label="Credit card">
- <rich:beanValidator summary="Invalid credit card number"/>
- </h:inputText>
- <rich:message for="card"/>
- </h:panelGrid>
- <h:commandButton value="Submit"></h:commandButton>
- <rich:messages/>
+ <h:form id="form">
+ <h:dataTable value="#{dataBean.beans}" var="bean">
+ <h:column>
+ <h:outputLabel for="value" value="#{bean.description}" />
+ </h:column>
+ <h:column>
+ <h:inputText id="value" value="#{bean.value}"
label="#{bean.label}">
+ <csv:validator summary="Invalid value" />
+ </h:inputText>
+ </h:column>
+ <h:column>
+ <csv:message for="value" />
+ </h:column>
+ </h:dataTable>
+ <h:commandButton value="Submit"></h:commandButton>
+ <csv:messages />
</h:form>
</ui:define>
</ui:composition>
Deleted: trunk/examples/validator-demo/src/main/webapp/examples/client-validator.xhtml
===================================================================
---
trunk/examples/validator-demo/src/main/webapp/examples/client-validator.xhtml 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/webapp/examples/client-validator.xhtml 2011-02-03
00:20:44 UTC (rev 21404)
@@ -1,17 +0,0 @@
-<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:csv="http://richfaces.org/csv">
- <h:head><title>Client Side Validator</title></h:head>
- <h:body>
- <h:form id="form">
- <h:inputText id="text" value="#{test.value}">
- <f:validateLength minimum="1" maximum="3"/>
- <csv:validator event="blur" />
- </h:inputText>
- <h:outputText id="out"
value="#{test.value}"></h:outputText>
- <csv:message id="uiMessage" for="text" />
- </h:form>
- <csv:messages/>
- </h:body>
-</html>
Modified: trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml
===================================================================
---
trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml 2011-02-02
22:56:49 UTC (rev 21403)
+++
trunk/examples/validator-demo/src/main/webapp/examples/graphValidation.xhtml 2011-02-03
00:20:44 UTC (rev 21404)
@@ -1,40 +1,36 @@
-<!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:f="http://java.sun.com/jsf/core"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich"
-
xmlns:s="http://jboss.com/products/seam/taglib"
-
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:csv="http://richfaces.org/csv"
+
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition template="/layout/template.xhtml">
- <ui:param name="title" value="<rich:graphValidator>
usage" />
- <ui:param name="javaBean"
value="org/richfaces/example/GraphValidatorBean.java" />
+ <ui:param name="title" value="<csv:graphValidator>
usage" />
<!-- Page header -->
<ui:define name="header">
- <h1><rich:graphValidator> usage</h1>
+ <h1><csv:graphValidator> usage</h1>
</ui:define>
<!-- content -->
<ui:define name="content">
<h:form id="form">
- <rich:graphValidator value="#{graphValidatorBean}"
id="validator">
+ <csv:graphValidator value="#{graphValidatorBean}"
id="validator">
<h:panelGrid columns="3">
<h:outputLabel for="value0" value="First value:" />
<h:inputText id="value0" value="#{graphValidatorBean.first}"
label="First" />
- <rich:message for="value0"/>
+ <csv:message for="value0"/>
<h:outputLabel for="value1" value="Second value:" />
<h:inputText id="value1" value="#{graphValidatorBean.second}"
label="First" />
- <rich:message for="value1"/>
+ <csv:message for="value1"/>
<h:outputLabel for="value2" value="Third value:" />
<h:inputText id="value2" value="#{graphValidatorBean.third}"
label="First" />
- <rich:message for="value2"/>
+ <csv:message for="value2"/>
<h:outputLabel for="total" value="Total:" />
<h:outputText id="total"
value="#{graphValidatorBean.summ}"/>
</h:panelGrid>
<h:commandButton value="Submit"
action="#{graphValidatorBean.action}"></h:commandButton>
<h:outputText id="result"
value="#{graphValidatorBean.actionResult}"/>
- </rich:graphValidator>
- <rich:messages/>
+ </csv:graphValidator>
+ <csv:messages />
</h:form>
</ui:define>
</ui:composition>