[richfaces-svn-commits] JBoss Rich Faces SVN: r13570 - in trunk/test-applications/realworld2/web/src/main: webapp/includes/image and 1 other directory.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Tue Apr 14 10:28:01 EDT 2009
Author: amarkhel
Date: 2009-04-14 10:28:01 -0400 (Tue, 14 Apr 2009)
New Revision: 13570
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageScroller.xhtml
Log:
Fix RF-6779
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-14 14:27:39 UTC (rev 13569)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-14 14:28:01 UTC (rev 13570)
@@ -239,6 +239,11 @@
pushEvent(Constants.ADD_ERROR_EVENT, error);
}
+ public Integer getPage(){
+ Integer index = model.getSelectedAlbum().getIndex(model.getSelectedImage());
+ return index/5 + 1;
+ }
+
public boolean isUserImage(Image image){
if(image == null || image.getAlbum() == null || image.getAlbum().getOwner() == null){
return false;
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-04-14 14:27:39 UTC (rev 13569)
+++ trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-04-14 14:28:01 UTC (rev 13570)
@@ -34,7 +34,7 @@
</a4j:outputPanel>
</a4j:repeat>
- <rich:datascroller styleClass="image-scroller" lastPageMode="full"
+ <rich:datascroller page="#{controller.getPage()}" styleClass="image-scroller" lastPageMode="full"
for="repeat" reRender="imagesTable" boundaryControls="hide"
stepControls="hide">
<f:facet name="pages">
More information about the richfaces-svn-commits
mailing list