[richfaces-svn-commits] JBoss Rich Faces SVN: r13691 - in trunk/test-applications/facelets/src/main: webapp/DataScroller and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Apr 20 09:23:17 EDT 2009
Author: adubovsky
Date: 2009-04-20 09:23:16 -0400 (Mon, 20 Apr 2009)
New Revision: 13691
Modified:
trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScrollerProperty.xhtml
Log:
+ lastPageMode test to dataScroller
Modified: trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2009-04-20 13:22:41 UTC (rev 13690)
+++ trunk/test-applications/facelets/src/main/java/dataScroller/DataScroller.java 2009-04-20 13:23:16 UTC (rev 13691)
@@ -36,6 +36,7 @@
private Ordering sortOrder;
private String filterValue;
private String currentSortOrder;
+ private String lastPageMode;
public HtmlDatascroller getHtmlDatascroller(){
return htmlDatascroller;
@@ -140,6 +141,7 @@
selfSorted = true;
currentSortOrder = "ASCENDING";
dataTable = new ArrayList();
+ lastPageMode = "short";
for(int i=0;i<1000;i++)
{
@@ -195,6 +197,14 @@
tD = td;
}
+ public String getLastPageMode() {
+ return lastPageMode;
+ }
+
+ public void setLastPageMode(String lastPageMode) {
+ this.lastPageMode = lastPageMode;
+ }
+
public boolean isRender() {
return render;
}
Modified: trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml 2009-04-20 13:22:41 UTC (rev 13690)
+++ trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml 2009-04-20 13:23:16 UTC (rev 13691)
@@ -1,12 +1,23 @@
-<f:subview xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="DataScrollerSubviewID">
- <rich:dataTable id="dataTableId" value="#{dataScroller.dataTable}" sortMode="#{dataScroller.sortMode}"
- var="dT" cellpadding="5px" rows="5" border="1" reRender="dsID">
+<f:subview xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich" id="DataScrollerSubviewID">
+ <rich:dataTable id="dataTableId" value="#{dataScroller.dataTable}"
+ sortMode="#{dataScroller.sortMode}" var="dT" cellpadding="5px"
+ rows="5" border="1" reRender="dsID">
<f:facet name="header">
- <rich:datascroller inactiveStyle="test" inactiveStyleClass="#{style.inactiveStyleClass}"
- selectedStyle="#{style.selectedStyle}" selectedStyleClass="#{style.selectedStyleClass}" style="#{style.style}"
- styleClass="#{style.styleClass}" tableStyle="#{style.tableStyle}" tableStyleClass="#{style.tableStyleClass}"
- fastControls="#{dataScroller.fastControls}" action="#{dataScroller.act}" actionListener="#{dataScroller.actListener}"
+ <rich:datascroller inactiveStyle="test"
+ inactiveStyleClass="#{style.inactiveStyleClass}"
+ selectedStyle="#{style.selectedStyle}"
+ selectedStyleClass="#{style.selectedStyleClass}"
+ style="#{style.style}" styleClass="#{style.styleClass}"
+ tableStyle="#{style.tableStyle}"
+ tableStyleClass="#{style.tableStyleClass}"
+ fastControls="#{dataScroller.fastControls}"
+ action="#{dataScroller.act}"
+ actionListener="#{dataScroller.actListener}"
align="#{dataScroller.align}" rendered="#{dataScroller.render}"
limitToList="#{dataScroller.limitToList}"
renderIfSinglePage="#{dataScroller.renderIfSinglePage}"
@@ -17,21 +28,25 @@
onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
- onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}" id="dsID"
- binding="#{dataScroller.htmlDatascroller}">
- </rich:datascroller>
+ onmouseover="#{event.onmouseover}" onmouseup="#{event.onmouseup}"
+ id="dsID" binding="#{dataScroller.htmlDatascroller}"
+ lastPageMode="#{dataScroller.lastPageMode}">
+ </rich:datascroller>
</f:facet>
- <rich:column sortBy="#{dT.str0}" filterBy="#{dT.str0}" filterEvent="onchange"
- selfSorted="#{dataScroller.selfSorted}" sortOrder="#{dataScroller.sortOrder}" filterValue="#{dataScroller.filterValue}">
+ <rich:column sortBy="#{dT.str0}" filterBy="#{dT.str0}"
+ filterEvent="onchange" selfSorted="#{dataScroller.selfSorted}"
+ sortOrder="#{dataScroller.sortOrder}"
+ filterValue="#{dataScroller.filterValue}">
<h:outputText value="#{dT.str0}" />
</rich:column>
- <rich:column sortBy="#{dT.int0}" filterBy="#{dT.int0}" filterEvent="onchange"
- sortOrder="#{dataScroller.sortOrder}">
+ <rich:column sortBy="#{dT.int0}" filterBy="#{dT.int0}"
+ filterEvent="onchange" sortOrder="#{dataScroller.sortOrder}">
<h:outputText value="#{dT.int0} " />
</rich:column>
</rich:dataTable>
<h:panelGrid id="dataScrollerActionID" columns="1">
- <a4j:commandButton value="Show action" reRender="dataScrollerActionID" style=" width : 95px;"></a4j:commandButton>
+ <a4j:commandButton value="Show action" reRender="dataScrollerActionID"
+ style=" width : 95px;"></a4j:commandButton>
<h:outputText value="#{dataScroller.action}" />
<h:outputText value="#{dataScroller.actionListener}" />
</h:panelGrid>
Modified: trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScrollerProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScrollerProperty.xhtml 2009-04-20 13:22:41 UTC (rev 13690)
+++ trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScrollerProperty.xhtml 2009-04-20 13:23:16 UTC (rev 13691)
@@ -10,6 +10,13 @@
<h:commandButton action="#{dataScroller.RestoreArray}" value="RestoreArray" />
<h:commandButton action="#{dataScroller.add}" value="add test" />
<h:panelGrid columns="2">
+ <h:outputText value="lastPageMode: " />
+ <h:selectOneRadio value="#{dataScroller.lastPageMode}">
+ <f:selectItem itemLabel="full" itemValue="full" />
+ <f:selectItem itemLabel="short" itemValue="short" />
+ <a4j:support event="onclick" reRender="dataTableId"></a4j:support>
+ </h:selectOneRadio>
+
<h:outputText value="maxPages" />
<h:inputText value="#{dataScroller.maxPages}">
<a4j:support event="onchange" reRender="dataScrollerID"></a4j:support>
More information about the richfaces-svn-commits
mailing list