Author: ilya_shaikovsky
Date: 2008-04-29 11:41:31 -0400 (Tue, 29 Apr 2008)
New Revision: 8336
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/simpleScroller.xhtml
Log:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147549#...
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-04-29
15:37:44 UTC (rev 8335)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-04-29
15:41:31 UTC (rev 8336)
@@ -24,6 +24,8 @@
private UIScrollableDataTable table;
+ private int scrollerPage;
+
private ArrayList<DemoInventoryItem> selectedCars = new
ArrayList<DemoInventoryItem>();
private ArrayList<Facet> columns = new ArrayList<Facet>();
private static int DECIMALS = 1;
@@ -240,5 +242,13 @@
public ArrayList<Facet> getColumns() {
return columns;
}
+
+ public int getScrollerPage() {
+ return scrollerPage;
+ }
+
+ public void setScrollerPage(int scrollerPage) {
+ this.scrollerPage = scrollerPage;
+ }
}
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/simpleScroller.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/simpleScroller.xhtml 2008-04-29
15:37:44 UTC (rev 8335)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dataTableScroller/examples/simpleScroller.xhtml 2008-04-29
15:41:31 UTC (rev 8336)
@@ -1,54 +1,57 @@
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
- <style>
- .col {
- width:100px;
- }
- </style>
-
- <h:form>
- <rich:datascroller align="left" for="carList"
maxPages="20" />
- <rich:spacer height="30" />
- <rich:dataTable width="483" id="carList" rows="10"
columnClasses="col"
- value="#{dataTableScrollerBean.allCars}" var="category">
- <f:facet name="header">
- <rich:columnGroup>
- <h:column>
- <h:outputText styleClass="headerText" value="Make" />
- </h:column>
- <h:column>
- <h:outputText styleClass="headerText" value="Model" />
- </h:column>
- <h:column>
- <h:outputText styleClass="headerText" value="Price" />
- </h:column>
- <h:column>
- <h:outputText styleClass="headerText" value="Mileage"
/>
- </h:column>
- </rich:columnGroup>
- </f:facet>
+ <style>
+.col {
+ width: 100px;
+}
+</style>
- <h:column>
- <h:outputText value="#{category.make}" />
- </h:column>
- <h:column>
- <h:outputText value="#{category.model}" />
- </h:column>
- <h:column>
- <h:outputText value="#{category.price}" />
- </h:column>
- <h:column>
- <h:outputText value="#{category.mileage}" />
- </h:column>
+ <h:form>
+ <rich:datascroller align="left" for="carList"
maxPages="20"
+ page="#{dataTableScrollerBean.scrollerPage}" reRender="sc2"
id="sc1" />
+ <rich:spacer height="30" />
+ <rich:dataTable width="483" id="carList" rows="10"
columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}" var="category">
+ <f:facet name="header">
+ <rich:columnGroup>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Make" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Model" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Price" />
+ </h:column>
+ <h:column>
+ <h:outputText styleClass="headerText" value="Mileage" />
+ </h:column>
+ </rich:columnGroup>
+ </f:facet>
+ <h:column>
+ <h:outputText value="#{category.make}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.model}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.price}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{category.mileage}" />
+ </h:column>
- </rich:dataTable>
- </h:form>
+ </rich:dataTable>
+ <rich:datascroller align="left" for="carList"
maxPages="20"
+ page="#{dataTableScrollerBean.scrollerPage}" id="sc2"
reRender="sc1" />
+ </h:form>
+
</ui:composition>
\ No newline at end of file