Author: gmaksimenko
Date: 2008-04-21 12:17:36 -0400 (Mon, 21 Apr 2008)
New Revision: 8025
Modified:
trunk/test-applications/facelets/src/main/java/combobox/Combobox.java
Log:
Add test for converter
Modified: trunk/test-applications/facelets/src/main/java/combobox/Combobox.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/combobox/Combobox.java 2008-04-21
16:17:20 UTC (rev 8024)
+++ trunk/test-applications/facelets/src/main/java/combobox/Combobox.java 2008-04-21
16:17:36 UTC (rev 8025)
@@ -25,9 +25,9 @@
public boolean immediate;
public String 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;
@@ -69,7 +69,7 @@
this.immediate = false;
this.inputSize = "4";
this.width = "300";
- this.value = "";
+ this.value = new Data("ffff",5);
this.tabindex = 2;
this.size = 5;
this.showDelay = "200";
@@ -81,15 +81,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());
}
}
@@ -153,11 +154,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;
}
@@ -169,11 +170,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