Author: mvitenkov
Date: 2008-08-05 07:45:30 -0400 (Tue, 05 Aug 2008)
New Revision: 9915
Modified:
trunk/test-applications/jsp/src/main/java/validator/DataBean.java
trunk/test-applications/jsp/src/main/java/validator/TestValidable.java
trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
Log:
Calendar + Future validation
Modified: trunk/test-applications/jsp/src/main/java/validator/DataBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2008-08-05 11:33:04
UTC (rev 9914)
+++ trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2008-08-05 11:45:30
UTC (rev 9915)
@@ -25,7 +25,7 @@
private String bindLabel;
private boolean rendered;
@Size(min=2,max=5,message="Size validation failed!!!!")
- private ArrayList<Data> data;
+ private ArrayList<Data> data;
private int length;
public int getLength() {
Modified: trunk/test-applications/jsp/src/main/java/validator/TestValidable.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/TestValidable.java 2008-08-05
11:33:04 UTC (rev 9914)
+++ trunk/test-applications/jsp/src/main/java/validator/TestValidable.java 2008-08-05
11:45:30 UTC (rev 9915)
@@ -1,6 +1,8 @@
package validator;
+import java.util.Calendar;
+
public interface TestValidable {
public String getText();
@@ -9,5 +11,5 @@
public boolean isBooleanValue();
- public String getDateValue();
+ public Calendar getDateValue();
}
Modified: trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-08-05
11:33:04 UTC (rev 9914)
+++ trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2008-08-05
11:45:30 UTC (rev 9915)
@@ -16,6 +16,7 @@
import org.hibernate.validator.EAN;
import org.hibernate.validator.Email;
import org.hibernate.validator.Future;
+import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.Pattern;
import org.hibernate.validator.Range;
import org.hibernate.validator.Size;
@@ -62,6 +63,8 @@
private double digit;
@Range(min=0,max=15,message="Range validation failed!")
private String rangeValue;
+ @NotEmpty(message="rich:beanValidator work")
+ private String newValue;
public String getRangeValue() {
return rangeValue;
@@ -269,6 +272,7 @@
this.submitted = false;
this.timeout = 3000;
this.rangeValue = "";
+ this.newValue = "not empty";
}
public int getIntValue() {
@@ -322,4 +326,12 @@
public void processAjax(AjaxEvent e){
System.out.println("=========inside processAjax=============");
}
+
+ public String getNewValue() {
+ return newValue;
+ }
+
+ public void setNewValue(String newValue) {
+ this.newValue = newValue;
+ }
}
Show replies by date