Author: mvitenkov
Date: 2008-04-29 11:33:35 -0400 (Tue, 29 Apr 2008)
New Revision: 8333
Modified:
trunk/test-applications/facelets/src/main/java/dataTable/TestBean.java
Log:
Modified: trunk/test-applications/facelets/src/main/java/dataTable/TestBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/dataTable/TestBean.java 2008-04-29
15:32:25 UTC (rev 8332)
+++ trunk/test-applications/facelets/src/main/java/dataTable/TestBean.java 2008-04-29
15:33:35 UTC (rev 8333)
@@ -1,11 +1,25 @@
package dataTable;
import java.util.ArrayList;
import java.util.List;
+import org.richfaces.component.html.HtmlDataGrid;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
public class TestBean {
private List<Table> tables = new ArrayList<Table>();
+ private HtmlDataGrid myDataGrid = null;
+ private String bindLabel;
+ private String elements;
+ public String getElements() {
+ return elements;
+ }
+
+ public void setElements(String elements) {
+ this.elements = elements;
+ }
+
public TestBean() {
Table t1 = new Table();
tables.add(t1);
@@ -16,6 +30,8 @@
tables.add(t2);
t2.getCells().add(new Cell());
t2.getCells().add(new Cell());
+ bindLabel = "not ready";
+ elements = "0";
}
public String submit() {
@@ -26,6 +42,11 @@
}
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myDataGrid.getBaseClientId(context);
+ }
+
public List<Table> getTables() {
return tables;
}
@@ -33,4 +54,20 @@
public void setTables(List<Table> tables) {
this.tables = tables;
}
+
+ public HtmlDataGrid getMyDataGrid() {
+ return myDataGrid;
+ }
+
+ public void setMyDataGrid(HtmlDataGrid myDataGrid) {
+ this.myDataGrid = myDataGrid;
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
}