Author: konstantin.mishin
Date: 2007-06-26 14:32:56 -0400 (Tue, 26 Jun 2007)
New Revision: 1331
Added:
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
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
Log:
Added:
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
(rev 0)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/Row.java 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,70 @@
+package org.richfaces.demo.datagrid.bean;
+
+public class Row {
+ private String cell1;
+ private String cell2;
+ private String cell3;
+ private String cell4;
+ private String cell5;
+ private String cell6;
+ private String cell7;
+ private String cell8;
+ public Row(String name) {
+ cell1 = name + " - cell1";
+ cell2 = name + " - cell2";
+ cell3 = name + " - cell3";
+ cell4 = name + " - cell4";
+ cell5 = name + " - cell5";
+ cell6 = name + " - cell6";
+ cell7 = name + " - cell7";
+ cell8 = name + " - cell8";
+ }
+ public String getCell1() {
+ return cell1;
+ }
+ public void setCell1(String cell1) {
+ this.cell1 = cell1;
+ }
+ public String getCell2() {
+ return cell2;
+ }
+ public void setCell2(String cell2) {
+ this.cell2 = cell2;
+ }
+ public String getCell3() {
+ return cell3;
+ }
+ public void setCell3(String cell3) {
+ this.cell3 = cell3;
+ }
+ public String getCell4() {
+ return cell4;
+ }
+ public void setCell4(String cell4) {
+ this.cell4 = cell4;
+ }
+ public String getCell5() {
+ return cell5;
+ }
+ public void setCell5(String cell5) {
+ this.cell5 = cell5;
+ }
+ public String getCell6() {
+ return cell6;
+ }
+ public void setCell6(String cell6) {
+ this.cell6 = cell6;
+ }
+ public String getCell7() {
+ return cell7;
+ }
+ public void setCell7(String cell7) {
+ this.cell7 = cell7;
+ }
+ public String getCell8() {
+ return cell8;
+ }
+ public void setCell8(String cell8) {
+ this.cell8 = cell8;
+ }
+}
Added:
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
(rev 0)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/TestGridDataModelBuilder.java 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,41 @@
+package org.richfaces.demo.datagrid.bean;
+
+import java.util.ArrayList;
+
+public class TestGridDataModelBuilder{
+ private ArrayList model1 = new ArrayList();
+ private ArrayList model2 = new ArrayList();
+ private ArrayList model3 = new ArrayList();
+
+ public TestGridDataModelBuilder() {
+ for (int i = 0; i < 1000; i++) {
+ model1.add(new Row("model1 - " + i));
+ model2.add(new Row("model2 - " + i));
+ model3.add(new Row("model3 - " + i));
+ }
+ }
+
+ public ArrayList getModel1() {
+ return model1;
+ }
+
+ public void setModel1(ArrayList model1) {
+ this.model1 = model1;
+ }
+
+ public ArrayList getModel2() {
+ return model2;
+ }
+
+ public void setModel2(ArrayList model2) {
+ this.model2 = model2;
+ }
+
+ public ArrayList getModel3() {
+ return model3;
+ }
+
+ public void setModel3(ArrayList model3) {
+ this.model3 = model3;
+ }
+}
\ No newline at end of file
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-06-26
17:54:39 UTC (rev 1330)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/WEB-INF/faces-config.xml 2007-06-26
18:32:56 UTC (rev 1331)
@@ -255,6 +255,12 @@
</managed-property>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>modelBuilder</managed-bean-name>
+
<managed-bean-class>org.richfaces.demo.datagrid.bean.TestGridDataModelBuilder</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+
<lifecycle>
<phase-listener>org.richfaces.demo.benchmark.PhaseDemarcationNotifier</phase-listener>
</lifecycle>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml
(rev 0)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid1.xhtml 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?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: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>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml
(rev 0)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid2.xhtml 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?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: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>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml
(rev 0)
+++
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/grid3.xhtml 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,85 @@
+<?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: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>
+ </sg:scrollable-grid>
+ </ui:composition>
+</jsp:root>
Added: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml
(rev 0)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/test.xhtml 2007-06-26
18:32:56 UTC (rev 1331)
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
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"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<body>
+<f:view>
+ <h:form>
+ <h:panelGroup>
+ <ui:include src="grid1.xhtml" />
+ </h:panelGroup>
+ </h:form>
+</f:view>
+</body>
+</html>