Author: ayanul
Date: 2008-05-21 10:30:57 -0400 (Wed, 21 May 2008)
New Revision: 8673
Modified:
trunk/test-applications/jsp/src/main/java/dataScroller/DataScroller.java
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp
Log:
update datascroller
Modified: trunk/test-applications/jsp/src/main/java/dataScroller/DataScroller.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/dataScroller/DataScroller.java 2008-05-21
13:13:27 UTC (rev 8672)
+++ trunk/test-applications/jsp/src/main/java/dataScroller/DataScroller.java 2008-05-21
14:30:57 UTC (rev 8673)
@@ -4,6 +4,7 @@
import javax.faces.event.ActionEvent;
+import org.richfaces.component.html.HtmlDatascroller;
import org.richfaces.event.DataScrollerEvent;
public class DataScroller {
@@ -19,7 +20,14 @@
public int maxPages;
private String action;
private String actionListener;
-
+ private boolean ajaxSingle = false;
+ private String boundaryControls = "auto";
+ private HtmlDatascroller binding = null;
+ private String fastStep = "0";
+ private String page = "10";
+ private Object value = null;
+ private String stepControls = "auto";
+
public String act() {
action = "action work!";
return null;
@@ -192,4 +200,102 @@
setMaxPages(40);
setRenderIfSinglePage(true);
}
+
+ /**
+ * @return the ajaxSingle
+ */
+ public boolean isAjaxSingle() {
+ return ajaxSingle;
+ }
+
+ /**
+ * @param ajaxSingle the ajaxSingle to set
+ */
+ public void setAjaxSingle(boolean ajaxSingle) {
+ this.ajaxSingle = ajaxSingle;
+ }
+
+ /**
+ * @return the boundaryControls
+ */
+ public String getBoundaryControls() {
+ return boundaryControls;
+ }
+
+ /**
+ * @param boundaryControls the boundaryControls to set
+ */
+ public void setBoundaryControls(String boundaryControls) {
+ this.boundaryControls = boundaryControls;
+ }
+
+ /**
+ * @return the binding
+ */
+ public HtmlDatascroller getBinding() {
+ return binding;
+ }
+
+ /**
+ * @param binding the binding to set
+ */
+ public void setBinding(HtmlDatascroller binding) {
+ this.binding = binding;
+ }
+
+ /**
+ * @return the fastStep
+ */
+ public String getFastStep() {
+ return fastStep;
+ }
+
+ /**
+ * @param fastStep the fastStep to set
+ */
+ public void setFastStep(String fastStep) {
+ this.fastStep = fastStep;
+ }
+
+ /**
+ * @return the page
+ */
+ public String getPage() {
+ return page;
+ }
+
+ /**
+ * @param page the page to set
+ */
+ public void setPage(String page) {
+ this.page = page;
+ }
+
+ /**
+ * @return the value
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ /**
+ * @return the stepControls
+ */
+ public String getStepControls() {
+ return stepControls;
+ }
+
+ /**
+ * @param stepControls the stepControls to set
+ */
+ public void setStepControls(String stepControls) {
+ this.stepControls = stepControls;
+ }
}
Modified: trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-05-21
13:13:27 UTC (rev 8672)
+++ trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-05-21
14:30:57 UTC (rev 8673)
@@ -4,10 +4,16 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="DataScrollerSubviewID">
+
<rich:dataTable id="dataTableId"
value="#{dataScroller.dataTable}"
var="dT" cellpadding="5px" rows="5"
border="1">
<f:facet name="header">
- <rich:datascroller inactiveStyle="#{style.inactiveStyle}"
inactiveStyleClass="#{style.inactiveStyleClass}"
selectedStyle="#{style.selectedStyle}"
selectedStyleClass="#{style.selectedStyleClass}"
style="#{style.style}" styleClass="#{style.styleClass}"
tableStyle="#{style.tableStyle}"
tableStyleClass="#{style.tableStyleClass}"
+ <rich:datascroller ajaxSingle="#{dataScroller.ajaxSingle}"
+ boundaryControls="#{dataScroller.boundaryControls}"
+ binding="#{dataScroller.binding}" data="datascrData"
fastStep="#{dataScroller.fastStep}" id="dsID"
+ page="#{dataScroller.page}" pagesVar="pages"
pageIndexVar="index"
+ value="#{dataScroller.value}" status="a4jStatusID"
stepControls="#{dataScroller.stepControls}"
+ eventsQueue="eventsQueue" inactiveStyle="#{style.inactiveStyle}"
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}"
@@ -19,8 +25,15 @@
onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmouseout}"
- onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"/>
+ onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}">
+ <f:facet name="pages">
+ <h:outputText value="#{index} / #{pages}" />
+ </f:facet>
+ </rich:datascroller>
</f:facet>
+ <f:facet name="footer">
+
+ </f:facet>
<h:column>
<h:outputText value="#{dT.data0}" />
</h:column>
Modified:
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp
===================================================================
---
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp 2008-05-21
13:13:27 UTC (rev 8672)
+++
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp 2008-05-21
14:30:57 UTC (rev 8673)
@@ -42,5 +42,33 @@
<f:selectItem itemLabel="center" itemValue="center" />
<a4j:support event="onclick"
reRender="dataTableId"></a4j:support>
</h:selectOneRadio>
+
+ <h:outputText value="ajaxSingle" />
+ <h:selectBooleanCheckbox
value="#{dataScroller.ajaxSingle}"></h:selectBooleanCheckbox>
+
+ <h:outputText value="boundaryControls" />
+ <h:selectOneRadio value="#{dataScroller.boundaryControls}">
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <f:selectItem itemLabel="show" itemValue="show" />
+ <f:selectItem itemLabel="hide" itemValue="hide" />
+ <a4j:support event="onclick"
reRender="dataTableId"></a4j:support>
+ </h:selectOneRadio>
+
+ <h:outputText value="fastStep"></h:outputText>
+ <h:inputText value="#{dataScroller.fastStep}"/>
+
+ <h:outputText value="page"/>
+ <h:inputText value="#{dataScroller.page}"></h:inputText>
+
+ <h:outputText value="value"></h:outputText>
+ <h:outputText value="#{dataScroller.value}"></h:outputText>
+
+ <h:outputText value="stepControls"></h:outputText>
+ <h:selectOneRadio value="#{dataScroller.stepControls}">
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <f:selectItem itemLabel="show" itemValue="show" />
+ <f:selectItem itemLabel="hide" itemValue="hide" />
+ <a4j:support event="onclick"
reRender="dataTableId"></a4j:support>
+ </h:selectOneRadio>
</h:panelGrid>
</f:subview>
\ No newline at end of file