Author: mvitenkov
Date: 2009-04-02 09:14:05 -0400 (Thu, 02 Apr 2009)
New Revision: 13360
Modified:
trunk/test-applications/jsp/src/main/java/validator/DataBean.java
trunk/test-applications/jsp/src/main/java/validator/GraphValidatorBean.java
trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/validator/DataBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2009-04-02 13:13:38
UTC (rev 13359)
+++ trunk/test-applications/jsp/src/main/java/validator/DataBean.java 2009-04-02 13:14:05
UTC (rev 13360)
@@ -27,7 +27,25 @@
@Size(min=2,max=8,message="Size validation failed!!!!")
private ArrayList<Data> data;
private int length;
+ private String summary;
+ private boolean useType;
+ public boolean isUseType() {
+ return useType;
+ }
+
+ public void setUseType(boolean useType) {
+ this.useType = useType;
+ }
+
+ public String getSummary() {
+ return summary;
+ }
+
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+
public int getLength() {
return length;
}
@@ -114,6 +132,8 @@
Random r = new Random();
for(int i = 0; i < 7; i++)
data.add(new Data(i, r.nextInt(1000), Data.Random(6), r.nextInt(10000) + 98389,
Data.Random(r.nextInt(10) + 1), r.nextInt(500000), Data.statusIcon[i % 5], Data.Random(3),
false)); //new Data(i, Data.Random(5), Data.statusIcon[i % 5], Data.Random(6), false));
+ summary = "GraphValidator summary";
+ useType = false;
}
@Max(value=20,message="Total value should be less then 20")
@@ -123,8 +143,5 @@
total += bean.getIntValue();
}
return total;
- }
-
-
-
+ }
}
Modified: trunk/test-applications/jsp/src/main/java/validator/GraphValidatorBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/GraphValidatorBean.java 2009-04-02
13:13:38 UTC (rev 13359)
+++ trunk/test-applications/jsp/src/main/java/validator/GraphValidatorBean.java 2009-04-02
13:14:05 UTC (rev 13360)
@@ -2,10 +2,10 @@
import java.util.ArrayList;
import java.util.List;
+
import org.hibernate.validator.Max;
import org.hibernate.validator.Min;
import org.hibernate.validator.Valid;
-import org.richfaces.component.UIGraphValidator;
public class GraphValidatorBean {
@@ -17,7 +17,7 @@
}
public GraphValidatorBean() {
- beans = new ArrayList(1);
+ beans = new ArrayList<TestValidable>(1);
beans.add(new ValidatorBean());
}
@Max(value=50,message="total length > 50")
Modified: trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2009-04-02
13:13:38 UTC (rev 13359)
+++ trunk/test-applications/jsp/src/main/java/validator/ValidatorBean.java 2009-04-02
13:14:05 UTC (rev 13360)
@@ -59,6 +59,7 @@
private int requestDelay;
private boolean selfRendered;
private boolean submitted;
+ private String summary;
private int timeout;
@Digits(integerDigits=1,fractionalDigits=3,message="Digits validation
failed!")
private double digit;
@@ -68,7 +69,21 @@
private String newValue;
@Pattern(regex="^1234*$") //Searh "1234" as a whole word
private String patternValue;
+ private String temp;
+ public String getTemp() {
+ try {
+ Thread.sleep(10000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ return temp;
+ }
+
+ public void setTemp(String temp) {
+ this.temp = temp;
+ }
+
public String getPatternValue() {
return patternValue;
}
@@ -260,7 +275,7 @@
this.dateValue = Calendar.getInstance();
dateValue.set(Calendar.MONTH,8);
dateValue.set(Calendar.DATE,5);
- dateValue.set(Calendar.YEAR,2008);
+ dateValue.set(Calendar.YEAR,2050);
this.booleanValue = false;
this.ean = "97 81550 41198 0";
this.creditValue = "visa maestro";
@@ -282,18 +297,24 @@
this.requestDelay = 500;
this.selfRendered = false;
this.submitted = false;
- this.timeout = 3000;
+ this.timeout = 2000;
this.rangeValue = "3.14";
this.newValue = "not empty";
+ this.summary = "ajax_validator_summary";
+ this.temp = "";
}
-
+
public int getIntValue() {
return intValue;
}
public String getText() {
-
+ try {
+ Thread.sleep(10000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
return text;
}
@@ -346,4 +367,12 @@
public void setNewValue(String newValue) {
this.newValue = newValue;
}
+
+ public String getSummary() {
+ return summary;
+ }
+
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
}
Show replies by date