Author: mvitenkov
Date: 2008-04-29 10:37:30 -0400 (Tue, 29 Apr 2008)
New Revision: 8321
Added:
trunk/test-applications/jsp/src/main/java/dataTable/Cell.java
trunk/test-applications/jsp/src/main/java/dataTable/Table.java
trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java
Log:
new dataTable with dataGrid inside.
Added: trunk/test-applications/jsp/src/main/java/dataTable/Cell.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/Cell.java
(rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/Cell.java 2008-04-29 14:37:30 UTC
(rev 8321)
@@ -0,0 +1,13 @@
+package dataTable;
+public class Cell {
+ private Integer value;
+
+ public Integer getValue() {
+ return value;
+ }
+
+ public void setValue(Integer value) {
+ this.value = value;
+ }
+
+}
Added: trunk/test-applications/jsp/src/main/java/dataTable/Table.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/Table.java
(rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/Table.java 2008-04-29 14:37:30 UTC
(rev 8321)
@@ -0,0 +1,15 @@
+package dataTable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Table {
+ private List<Cell> cells = new ArrayList<Cell>();
+
+ public List<Cell> getCells() {
+ return cells;
+ }
+
+ public void setCells(List<Cell> cells) {
+ this.cells = cells;
+ }
+}
Added: trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java
(rev 0)
+++ trunk/test-applications/jsp/src/main/java/dataTable/TestBean.java 2008-04-29 14:37:30
UTC (rev 8321)
@@ -0,0 +1,73 @@
+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);
+ t1.getCells().add(new Cell());
+ t1.getCells().add(new Cell());
+
+ Table t2 = new Table();
+ tables.add(t2);
+ t2.getCells().add(new Cell());
+ t2.getCells().add(new Cell());
+ bindLabel = "not ready";
+ elements = "0";
+ }
+
+ public String submit() {
+ return null;
+ }
+
+ public void submitAjax() {
+
+ }
+
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myDataGrid.getBaseClientId(context);
+ }
+
+ public List<Table> getTables() {
+ return tables;
+ }
+
+ 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;
+ }
+}