Author: gmaksimenko
Date: 2008-04-21 06:19:59 -0400 (Mon, 21 Apr 2008)
New Revision: 7986
Modified:
trunk/test-applications/jsp/src/main/java/pickList/PickList.java
Log:
Add binding
Modified: trunk/test-applications/jsp/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-04-21 10:00:30
UTC (rev 7985)
+++ trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-04-21 10:19:59
UTC (rev 7986)
@@ -3,6 +3,9 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import org.richfaces.component.html.HtmlPickList;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
@@ -33,7 +36,25 @@
private String requiredMessage;
private Object[] value;
private String valueCL;
+ private HtmlPickList myPickList = null;
+ private String bindLabel;
+ public HtmlPickList getMyPickList() {
+ return myPickList;
+ }
+
+ public void setMyPickList(HtmlPickList myPickList) {
+ this.myPickList = myPickList;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
public String getValueCL() {
return valueCL;
}
@@ -80,6 +101,7 @@
this.title = "title";
this.required = false;
this.requiredMessage = "requiredMessage";
+ this.bindLabel = "Click Binding";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
data.add(new SelectItem("selectItems " + i));
@@ -249,4 +271,10 @@
public void setValue(Object[] value) {
this.value = value;
}
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myPickList.getClientId(context);
+ }
+
}