Author: gmaksimenko
Date: 2008-04-21 04:52:14 -0400 (Mon, 21 Apr 2008)
New Revision: 7971
Modified:
trunk/test-applications/facelets/src/main/java/pickList/PickList.java
Log:
Change binding
Modified: trunk/test-applications/facelets/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-04-21
08:51:58 UTC (rev 7970)
+++ trunk/test-applications/facelets/src/main/java/pickList/PickList.java 2008-04-21
08:52:14 UTC (rev 7971)
@@ -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;
@@ -31,31 +34,9 @@
private String requiredMessage;
private Object[] value;
private String valueCL;
-
- public String getValueCL() {
- return valueCL;
- }
-
- public void setValueCL(String valueCL) {
- this.valueCL = valueCL;
- }
-
- public boolean isRequired() {
- return required;
- }
-
- public void setRequired(boolean required) {
- this.required = required;
- }
-
- public String getRequiredMessage() {
- return requiredMessage;
- }
-
- public void setRequiredMessage(String requiredMessage) {
- this.requiredMessage = requiredMessage;
- }
-
+ private HtmlPickList myPickList = null;
+ private String bindLabel;
+
public PickList() {
this.copyAllControlLabel = "copyAllControlLabel";
this.copyControlLabel = "copyControlLabel";
@@ -78,12 +59,58 @@
this.title = "title";
this.required = false;
this.requiredMessage = "requiredMessage";
+ bindLabel = "Click Binding";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
data.add(new SelectItem("selectItems " + i));
}
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myPickList.getClientId(context);
+ }
+ 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;
+ }
+
+ public void setValueCL(String valueCL) {
+ this.valueCL = valueCL;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
+
+ public String getRequiredMessage() {
+ return requiredMessage;
+ }
+
+ public void setRequiredMessage(String requiredMessage) {
+ this.requiredMessage = requiredMessage;
+ }
+
public void valueChangeListener(ValueChangeEvent event) {
valueCL = "valueChangeListener work!";
}
Show replies by date