9 Replies Latest reply on Mar 22, 2007 12:15 PM by Sergey Smirnov

    rich:datascroller don't work properly

    Eugene Batogov Newbie

      Hello all !!!
      I newbie in Richfaces, but don't in JSF.
      I run richfaces demo on tomcat.
      On Data Table Scroller page has rich:datascroller component.
      When I click on 1,2,3,4,5,....12, -> work OK.
      But when I click > and >> rich:datascroller work wrong!!! It stop on "3" position !!!

      HELP ME, PLEASE !!!

        • 1. Re: rich:datascroller don't work properly
          Eugene Batogov Newbie

          P.S. I use RichFaces-3.0.1-SNAPSHOT and
          ajax4jsf-1.1.1-SNAPSHOT

          • 3. Re: rich:datascroller don't work properly
            Eugene Batogov Newbie

            OK. This demo work properly.
            Which version ajax4jsf and RichFaces using?
            I download this demo yesterday, and it work wrong ?!?!
            I don't understand ... :(
            Please, help me .

            • 4. Re: rich:datascroller don't work properly
              Adrian Mitev Master

              I met the same situation too. The demo worked but the war i've downloaded does not work properly.

              Sergey, is the available war file for download is the same build as the online demo?

              • 5. Re: rich:datascroller don't work properly
                Piotr Wierzbowski Newbie

                I can't display scroller above dataTable, there is an java.lang.IllegalArgumentException: could not dataTable with id 'osoby'
                it works beleve dataTable
                my working code:

                <rich:dataTable id="osoby" value="#{lista.osoby}" var="osoba" rows="5" >
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="id" />
                 </f:facet>
                 <h:outputText value="#{osoba.id}" />
                 </rich:column>
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="imie" />
                 </f:facet>
                 <h:outputText value="#{osoba.imie}" />
                 </rich:column>
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="nazwisko" />
                 </f:facet>
                 <h:outputText value="#{osoba.nazwisko}" />
                 </rich:column>
                 </rich:dataTable>
                 <rich:datascroller for="osoby" maxPages="10">
                 <f:facet name="first">
                 <h:outputText value="First"/>
                 </f:facet>
                 <f:facet name="last">
                 <h:outputText value="Last"/>
                 </f:facet>
                 </rich:datascroller>

                not working code (exception thrown):
                <rich:datascroller for="osoby" maxPages="10">
                 <f:facet name="first">
                 <h:outputText value="First"/>
                 </f:facet>
                 <f:facet name="last">
                 <h:outputText value="Last"/>
                 </f:facet>
                 </rich:datascroller>
                <rich:dataTable id="osoby" value="#{lista.osoby}" var="osoba" rows="5" >
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="id" />
                 </f:facet>
                 <h:outputText value="#{osoba.id}" />
                 </rich:column>
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="imie" />
                 </f:facet>
                 <h:outputText value="#{osoba.imie}" />
                 </rich:column>
                 <rich:column>
                 <f:facet name="header">
                 <h:outputText value="nazwisko" />
                 </f:facet>
                 <h:outputText value="#{osoba.nazwisko}" />
                 </rich:column>
                 </rich:dataTable>

                It's just an example, i can't display datascroler above dataTable at all
                Any ide what is happening, here is exceprion code
                java.lang.IllegalArgumentException: could not dataTable with id 'osoby'
                 org.richfaces.component.UIDatascroller.getDataTable(UIDatascroller.java:162)
                 org.richfaces.component.UIDatascroller.getUIData(UIDatascroller.java:135)
                 org.richfaces.component.UIDatascroller.getPageIndex(UIDatascroller.java:179)
                 org.richfaces.renderkit.html.DataScrollerRenderer.renderPager(DataScrollerRenderer.java:86)
                 org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:303)
                 org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeBegin(DatascrollerTemplate.java:172)
                 org.ajax4jsf.framework.renderer.RendererBase.encodeBegin(RendererBase.java:97)
                 javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
                 javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
                 javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)
                 org.apache.jsp.welcomeJSF_jsp._jspx_meth_rich_datascroller_0(welcomeJSF_jsp.java:225)
                 org.apache.jsp.welcomeJSF_jsp._jspx_meth_h_form_0(welcomeJSF_jsp.java:166)
                 org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_view_0(welcomeJSF_jsp.java:130)
                 org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:95)
                 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
                 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                 com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                 org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                 org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
                 com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                 com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                 com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                 javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                 org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
                 org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
                 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
                 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
                 org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
                 org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
                 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
                 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
                 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

                Please, help.

                • 6. Re: rich:datascroller don't work properly
                  Adrian Mitev Master

                  This problem occurs in jsf 1.1. One workaround is to use tomahawk t:buffer [1] to store the dataTable into buffer and print it after the scroller.

                  [1] http://www.irian.at/myfaces/buffer.jsf

                  I wish richfaces to have such buffer component

                  • 7. Re: rich:datascroller don't work properly
                    Sergey Smirnov Master

                     

                    "amitev" wrote:
                    I met the same situation too. The demo worked but the war i've downloaded does not work properly.

                    Sergey, is the available war file for download is the same build as the online demo?


                    It depends of what you mean speaking about "available war file for download". The SNAPSHOTS of the Ajax4jsf, Richfaces and the richfaces-demo itself are built nightly.

                    The online demo works on the build from March 5, 2007. It is the same as:

                    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027530#4027530

                    However, we fixed some problems since that date. datascroller also has some issues solved. So, it is not enough to speak about the SNAPSHOT, the date is important.

                    • 8. Re: rich:datascroller don't work properly
                      Adrian Mitev Master

                      Sergey, what do you think about posting the daily build as online demo?

                      • 9. Re: rich:datascroller don't work properly
                        Sergey Smirnov Master

                        It is already posted. See the very top "Sticked" post on this forum.