[richfaces-svn-commits] JBoss Rich Faces SVN: r1361 - in trunk/sandbox-samples/scrollable-grid-demo/src/main: webapp/pages and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 28 05:46:26 EDT 2007


Author: konstantin.mishin
Date: 2007-06-28 05:46:26 -0400 (Thu, 28 Jun 2007)
New Revision: 1361

Added:
   trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/columns.xhtml
Modified:
   trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java
   trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java
   trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
   trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
   trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
   trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
Log:
RF-387

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java	2007-06-28 09:46:26 UTC (rev 1361)
@@ -9,6 +9,16 @@
 	private String cell6;
 	private String cell7;
 	private String cell8;
+	private String cell9;
+	private String cell10;
+	private String cell11;
+	private String cell12;
+	private String cell13;
+	private String cell14;
+	private String cell15;
+	private String cell16;
+	private String cell17;
+	private String cell18;
 	public Row(String name) {
 		cell1 = name + " - cell1";
 		cell2 = name + " - cell2";
@@ -18,6 +28,16 @@
 		cell6 = name + " - cell6";
 		cell7 = name + " - cell7";
 		cell8 = name + " - cell8";
+		cell9 = name + " - cell9";
+		cell10 = name + " - cell10";
+		cell11 = name + " - cell11";
+		cell12 = name + " - cell12";
+		cell13 = name + " - cell13";
+		cell14 = name + " - cell14";
+		cell15 = name + " - cell15";
+		cell16 = name + " - cell16";
+		cell17 = name + " - cell17";
+		cell18 = name + " - cell18";
 	}
 	public String getCell1() {
 		return cell1;
@@ -67,4 +87,64 @@
 	public void setCell8(String cell8) {
 		this.cell8 = cell8;
 	}
+	public String getCell9() {
+		return cell9;
+	}
+	public void setCell9(String cell9) {
+		this.cell9 = cell9;
+	}
+	public String getCell10() {
+		return cell10;
+	}
+	public void setCell10(String cell10) {
+		this.cell10 = cell10;
+	}
+	public String getCell11() {
+		return cell11;
+	}
+	public void setCell11(String cell11) {
+		this.cell11 = cell11;
+	}
+	public String getCell12() {
+		return cell12;
+	}
+	public void setCell12(String cell12) {
+		this.cell12 = cell12;
+	}
+	public String getCell13() {
+		return cell13;
+	}
+	public void setCell13(String cell13) {
+		this.cell13 = cell13;
+	}
+	public String getCell14() {
+		return cell14;
+	}
+	public void setCell14(String cell14) {
+		this.cell14 = cell14;
+	}
+	public String getCell15() {
+		return cell15;
+	}
+	public void setCell15(String cell15) {
+		this.cell15 = cell15;
+	}
+	public String getCell16() {
+		return cell16;
+	}
+	public void setCell16(String cell16) {
+		this.cell16 = cell16;
+	}
+	public String getCell17() {
+		return cell17;
+	}
+	public void setCell17(String cell17) {
+		this.cell17 = cell17;
+	}
+	public String getCell18() {
+		return cell18;
+	}
+	public void setCell18(String cell18) {
+		this.cell18 = cell18;
+	}
 }

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java	2007-06-28 09:46:26 UTC (rev 1361)
@@ -1,13 +1,19 @@
 package org.richfaces.demo.datagrid.bean;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 
 public class TestGridDataModelBuilder{
 	private ArrayList model1 = new ArrayList();
 	private ArrayList model2 = new ArrayList();
 	private ArrayList model3 = new ArrayList();
+	private HashMap grids = new HashMap();
+	private String grid = "grid1.xhtml";
 	
 	public TestGridDataModelBuilder() {
+		grids.put("grid1", "grid1.xhtml");
+		grids.put("grid2", "grid2.xhtml");
+		grids.put("grid3", "grid3.xhtml");
 		for (int i = 0; i < 1000; i++) {
 			model1.add(new Row("model1 - " + i));
 			model2.add(new Row("model2 - " + i));
@@ -38,4 +44,20 @@
 	public void setModel3(ArrayList model3) {
 		this.model3 = model3;
 	}
+
+	public HashMap getGrids() {
+		return grids;
+	}
+
+	public void setGrids(HashMap grids) {
+		this.grids = grids;
+	}
+
+	public String getGrid() {
+		return grid;
+	}
+
+	public void setGrid(String grid) {
+		this.grid = grid;
+	}
 }
\ No newline at end of file

Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/columns.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/columns.xhtml	                        (rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/columns.xhtml	2007-06-28 09:46:26 UTC (rev 1361)
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:ui="http://java.sun.com/jsf/facelets"
+	xmlns:sg="http://richfaces.ajax4jsf.org/scrollable-grid">
+
+	<ui:composition>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell1}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell2}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell3}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell4}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell5}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell6}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell7}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell8}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell9}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell10}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell11}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell12}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell13}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell14}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell15}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell16}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell17}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+		<sg:column width="200px">
+			<f:facet name="header">
+				<h:outputText value="header"></h:outputText>
+			</f:facet>
+			<h:outputText value="#{issues.cell18}"></h:outputText>
+			<f:facet name="footer">
+				<h:outputText value="footer"></h:outputText>
+			</f:facet>
+		</sg:column>
+	</ui:composition>
+</jsp:root>

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml	2007-06-28 09:46:26 UTC (rev 1361)
@@ -8,78 +8,9 @@
 	<ui:composition>
 		<sg:scrollable-grid value="#{modelBuilder.model1}" var="issues"
 			frozenColCount="3" first="0" rows="40" width="800px" height="500px">
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell1}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell2}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell3}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell4}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell5}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell6}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell7}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell8}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
+			<ui:include src="columns.xhtml">
+				<ui:param name="issues" value="#{issues}" />
+			</ui:include>
 		</sg:scrollable-grid>
 	</ui:composition>
 </jsp:root>

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml	2007-06-28 09:46:26 UTC (rev 1361)
@@ -8,78 +8,9 @@
 	<ui:composition>
 		<sg:scrollable-grid value="#{modelBuilder.model2}" var="issues"
 			frozenColCount="3" first="0" rows="40" width="800px" height="500px">
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell1}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell2}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell3}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell4}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell5}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell6}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell7}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell8}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
+			<ui:include src="columns.xhtml">
+				<ui:param name="issues" value="#{issues}" />
+			</ui:include>
 		</sg:scrollable-grid>
 	</ui:composition>
 </jsp:root>

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml	2007-06-28 09:46:26 UTC (rev 1361)
@@ -8,78 +8,9 @@
 	<ui:composition>
 		<sg:scrollable-grid value="#{modelBuilder.model3}" var="issues"
 			frozenColCount="3" first="0" rows="40" width="800px" height="500px">
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell1}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell2}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell3}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell4}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell5}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell6}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell7}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
-			<sg:column width="100px">
-				<f:facet name="header">
-					<h:outputText value="header"></h:outputText>
-				</f:facet>
-				<h:outputText value="#{issues.cell8}"></h:outputText>
-				<f:facet name="footer">
-					<h:outputText value="footer"></h:outputText>
-				</f:facet>
-			</sg:column>
+			<ui:include src="columns.xhtml">
+				<ui:param name="issues" value="#{issues}" />
+			</ui:include>
 		</sg:scrollable-grid>
 	</ui:composition>
 </jsp:root>

Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml	2007-06-28 09:25:15 UTC (rev 1360)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml	2007-06-28 09:46:26 UTC (rev 1361)
@@ -8,9 +8,14 @@
 <body>
 <f:view>
 	<h:form>
-		<h:panelGroup>
-				<ui:include src="grid1.xhtml" />
+		<h:selectOneMenu value="#{modelBuilder.grid}">
+			<f:selectItems value="#{modelBuilder.grids}" />
+		</h:selectOneMenu>
+		<a4j:support event="onchange" reRender="panelGroup" />
+		<h:panelGroup id="panelGroup">
+				<ui:include src="#{modelBuilder.grid}" />
 		</h:panelGroup>
+		<input type="submit" />
 	</h:form>
 </f:view>
 </body>




More information about the richfaces-svn-commits mailing list