Author: dmorozov
Date: 2008-07-23 07:53:34 -0400 (Wed, 23 Jul 2008)
New Revision: 9741
Modified:
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
https://jira.jboss.org/jira/browse/RF-3956
Modified:
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml 2008-07-23
11:20:53 UTC (rev 9740)
+++
trunk/test-applications/facelets/src/main/webapp/DataScroller/DataScroller.xhtml 2008-07-23
11:53:34 UTC (rev 9741)
@@ -1,7 +1,7 @@
<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">
+ var="dT" cellpadding="5px" rows="5" border="1"
reRender="dsID">
<f:facet name="header">
<rich:datascroller inactiveStyle="#{style.inactiveStyle}"
inactiveStyleClass="#{style.inactiveStyleClass}"
selectedStyle="#{style.selectedStyle}"
selectedStyleClass="#{style.selectedStyleClass}"
style="#{style.style}"
Modified: trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-07-23
11:20:53 UTC (rev 9740)
+++ trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-07-23
11:53:34 UTC (rev 9741)
@@ -6,9 +6,9 @@
<f:subview id="DataScrollerSubviewID">
<rich:dataTable id="dataTableId"
value="#{dataScroller.dataTable}"
- var="dT" cellpadding="5px" rows="5" border="1"
reRender="dsID" sortMode="#{dataScroller.sortMode}">
+ var="dT" cellpadding="5px" rows="5" border="1"
reRender="dsID,dataTableId" sortMode="#{dataScroller.sortMode}">
<f:facet name="header">
- <rich:datascroller ajaxSingle="#{dataScroller.ajaxSingle}"
+ <rich:datascroller for="dataTableId"
ajaxSingle="#{dataScroller.ajaxSingle}"
boundaryControls="#{dataScroller.boundaryControls}"
binding="#{dataScroller.htmlDatascroller}" data="datascrData"
fastStep="#{dataScroller.fastStep}" id="dsID"
page="#{dataScroller.page}" pagesVar="pages"
pageIndexVar="index"
Modified: trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
---
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-07-23
11:20:53 UTC (rev 9740)
+++
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2008-07-23
11:53:34 UTC (rev 9741)
@@ -33,12 +33,20 @@
int pageCount = component.getPageCount();
int pageIndex = component.getPage();
+ org.richfaces.renderkit.html.ControlsState controlsState =
getControlsState(context, component, pageIndex, pageCount);
boolean singlePageRender = true;
if (pageCount == 1 && !component.isRenderIfSinglePage()) {
singlePageRenderStyle = "; display: none";
singlePageRender = false;
+ } else if (!controlsState.isFirstRendered() &&
!controlsState.isFastRewindRendered() &&
+ !controlsState.isPreviousRendered() && !controlsState.isNextRendered()
&&
+ !controlsState.isFastForwardRendered() &&
!controlsState.isLastRendered() &&
+ pageCount <= 1 ) {
+ singlePageRenderStyle = "; display: none";
+ singlePageRender = false;
}
+
]]>
</jsp:scriptlet>
@@ -59,7 +67,6 @@
<tr>
<jsp:scriptlet><![CDATA[
String facet;
- org.richfaces.renderkit.html.ControlsState controlsState =
getControlsState(context, component, pageIndex, pageCount);
if (controlsState.isFirstRendered()){
if (controlsState.isFirstEnabled()){
@@ -252,7 +259,7 @@
}
}
]]></jsp:scriptlet>
-
+
<jsp:scriptlet><![CDATA[
if (controlsState.isFastForwardRendered()){
if (controlsState.isFastForwardEnabled()){
@@ -300,7 +307,7 @@
}
}
]]></jsp:scriptlet>
-
+
<jsp:scriptlet><![CDATA[
if (controlsState.isLastRendered()){
if (controlsState.isLastEnabled()){