6 Replies Latest reply on Jun 28, 2007 11:38 AM by richfacesuser richfacesuser


    richfacesuser richfacesuser Newbie


      I am using data:scroller for a <rich:table. The datascroller is not showing any page numbers on the screens. I am just able to see < and << symbols. I have tried to use <a4j:form instead of <h:form but no success.
      I have even tried by surronding the datascroller with a4j:region but all are showing same ouput.
      Please advice

        • 1. Re: datascroller
          Ilya Shaikovsky Master

          what about your JSF and RF environment pages etc? You may see that it works for our demos etc.. so we can't reproduce this using description that contains of common words only. ;)

          And region and form isn't the components that may cause this.

          • 2. Re: datascroller
            richfacesuser richfacesuser Newbie

            HI Ilya,
            Thank you for the reply.
            I found a sample code in the forums and am able to get the pagination only when I kept the datascroller after the datatable.
            <rich:datascroller... />
            Now the datatable rows are NOT getting refreshed when I am clicking on the pages numbers or ">" or ">>" symbols.
            Do we need to make any changes in the backing beans as well and the richfaces repos did not mention anything about it.
            Thank you in advance.

            • 3. Re: datascroller
              Ilya Shaikovsky Master

              As far as I've told you above - please provide please all the information you have :) settings, environment, page and bean that may influence your case.

              • 4. Re: datascroller
                richfacesuser richfacesuser Newbie

                The information which you have asked is as follows

                versions used:

                jsf implementation 1.2
                MyEclipse 5.5 GA
                jdk 1.5.0_12
                Tomcat 6.0.13

                this is the page

                <%@ page language="java" pageEncoding="ISO-8859-1"%>
                <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
                <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
                <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" %>
                <%@taglib prefix="a4j" uri="https://ajax4jsf.dev.java.net/ajax" %>


                String path = request.getContextPath();
                String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

                My JSF 'MainJsp1.jsp' starting page

                <meta http-equiv="pragma" content="no-cache">
                <meta http-equiv="cache-control" content="no-cache">
                <meta http-equiv="expires" content="0">
                <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
                <meta http-equiv="description" content="This is my page">


                #header h1 {
                text-indent: -9999px;
                height: 75px;
                width: 214px;
                background-image: url(images/header.gif);
                float: left;

                .table {
                overflow: scroll;

                <f:loadBundle basename="pck.messages" var="msgs"/>

                <rich:dataTable styleClass="table" rows="10" style="width: 39pc; padding-left: 0px; left: 0px; margin-left: 0px; text-align: center; vertical-align: middle" id="record" var="record" value="#{bean.Lists}">
                <f:facet name="header"> <h:outputText> COl1</h:outputText> </f:facet>
                <h:outputText value="#{record.address}"></h:outputText>
                <f:facet name="header"><h:outputText>Col2</h:outputText> </f:facet>
                <h:outputText value="#{record.city}"></h:outputText>
                <rich:datascroller for="record" maxPages="10" />

                Bean is

                import pck.AddKickOuts;

                public class bean{

                private List addLists = new ArrayList();

                public boolean renderIfSinglePage;
                public int rows;

                public bean() {

                try {
                rset = stmt.executeQuery(queryString);
                while (rset.next()) {
                AddKickOuts addKickOut = new AddKickOuts();

                public List getAddLists() {
                return addLists;
                public void setAddLists(List addLists) {
                this.addLists = addLists;

                public void onAction(ActionEvent actionEvent) {
                System.out.println("bean.onAction() " + actionEvent);

                public void doScroll(DataScrollerEvent event) {
                String oldScrolVal = event.getOldScrolVal();
                String newScrolVal = event.getNewScrolVal();
                System.out.println("Old Value = " + oldScrolVal + " " + "New Value = " + newScrolVal);


                And Could you please can we specify any definite width for the datascroller.

                • 5. Re: datascroller
                  Ilya Shaikovsky Master

                  First of all you need to update RF and a4j to latest release version (3.0.1 and 1.1.1) or *.*.2 SNAPSHOTs.

                  • 6. Re: datascroller
                    richfacesuser richfacesuser Newbie

                    I have created a new project added the jsf capabilities to it. Installed the richfaces 3.0.1 (with ajax4jsf-1.1.1) as explained in developers guide.
                    Copied my page and bean to this new project.I am still having the same problem of not getting the database list refreshed.

                    And how do we specify a definite width for the datascroller.