Author: gmaksimenko
Date: 2008-04-21 12:31:59 -0400 (Mon, 21 Apr 2008)
New Revision: 8033
Modified:
trunk/test-applications/jsp/src/main/java/combobox/Combobox.java
Log:
Add test for converter
Modified: trunk/test-applications/jsp/src/main/java/combobox/Combobox.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/combobox/Combobox.java 2008-04-21 16:26:08
UTC (rev 8032)
+++ trunk/test-applications/jsp/src/main/java/combobox/Combobox.java 2008-04-21 16:31:59
UTC (rev 8033)
@@ -21,9 +21,9 @@
public boolean immediate;
public int inputSize;
public String width;
- public String value;
+ public Data value;
public int tabindex;
- public List<String> suggestionValues;
+ public List<Data> suggestionValues;
public int size;
public String showDelay;
public boolean required;
@@ -50,7 +50,7 @@
this.immediate = false;
this.inputSize = 4;
this.width = "300";
- this.value = "";
+ this.value = new Data("default",0);
this.tabindex = 2;
this.size = 5;
this.showDelay = "200";
@@ -62,15 +62,16 @@
this.enableManualInput = true;
this.listHeight = "400";
this.listWidth = "350";
- this.suggestionValues = new ArrayList<String>();
+ this.suggestionValues = new ArrayList<Data>();
this.selectItem = new ArrayList<SelectItem>();
this.bindLabel = "Click Binding";
this.align = "left";
this.alt = "default alt";
Random r = new Random();
for(int i = 0; i < 10; i++){
- suggestionValues.add("suggestionValues " + r.nextInt(10) + " N=" +
i);
- selectItem.add(new SelectItem("selectItem " + r.nextInt(10) + "
N=" + i));
+ suggestionValues.add(new Data("selectItem", i));
+ selectItem.add(new SelectItem(new Data("selectItem", i)));
+ System.out.println(selectItem.get(i).getValue().toString());
}
}
@@ -142,11 +143,11 @@
this.width = width;
}
- public String getValue() {
+ public Data getValue() {
return value;
}
- public void setValue(String value) {
+ public void setValue(Data value) {
this.value = value;
}
@@ -158,11 +159,11 @@
this.tabindex = tabindex;
}
- public List<String> getSuggestionValues() {
+ public List<Data> getSuggestionValues() {
return suggestionValues;
}
- public void setSuggestionValues(List<String> suggestionValues) {
+ public void setSuggestionValues(List<Data> suggestionValues) {
this.suggestionValues = suggestionValues;
}
Show replies by date