5 Replies Latest reply on Jan 30, 2012 9:49 AM by swastikpadhy84

    <rich:dataScroller>

    ravi.f39

      Hi ,

       

      I am facing a problem using rich datascroller .

       

      As per the requirment we have to disable the last button in datascroller. By default it shows all the buttons in datascroller.

       

      I tried to disable it like this

       

      <f:facet name="last_disabled" />

       

      This is not working.

       

       

      I created my own custom renderer class and overrided DataScrollerRenderer

      and commented the code to disable.

      And I configured in my  faces-config.xml like this

       

       

      <render-kit>

       

              <renderer>

                  <component-family>org.richfaces.Datascroller</component-family>

                  <renderer-type>org.richfaces.DataScrollerRenderer</renderer-type>

                  <renderer-class>com.cgi.bi.bkifs.ui.renderer.DataScrollerCustRenderer</renderer-class>

              </renderer>

             

          </render-kit>

       

      But my DataScrollerCustRenderer class is not called. Everytime DataScrollerRenderer class is been called . So, I edited the the faces-config.xml in richfaces jar and replaced it with my  custom renderer class.

      After doing that my custom Renderer class is called. So, now i can disable the last button.

       

      I want to call my custom renderer class through my faces-config.xml instead of from richfaces faces-config.xml.

       

      Pls any one help out in this. I am struggling since 1 week.

       

      Thanks & Regards,

      Ravi

        • 1. Re: <rich:dataScroller>
          swastikpadhy84

          Hi Ravi,

           

                  can you let me know which RF version you are using ?

           

          Regards,

          Swastik

          • 2. Re: <rich:dataScroller>
            ravi.f39

            Hi swastik padhy,

             

            I am using 4.0.0 version.

             

            Thanks & Regards,

            Ravi

            • 3. Re: <rich:dataScroller>
              swastikpadhy84

              Hi,

               

                          You can use

              <rich:dataScroller  for="table"  boundaryControls="hide" fastControls="hide"  />

               

              to hide the fastControls & boundaryControls.

               

               

              Regards,

              Swastik

              • 4. Re: <rich:dataScroller>
                ravi.f39

                Hi,

                 

                I worked on it before only.

                 

                This will not show first button.

                 

                Through facet I tried but still it is not showing.

                 

                 

                Thanks & Regards,

                Ravi

                • 5. Re: <rich:dataScroller>
                  swastikpadhy84

                  Hi,

                   

                          Then you have to write your own controller for the data scroller.

                   

                  <h:commandButton value="PREV" onclick="#{rich:component('ds')}.previous()" />

                  <h:commandButton value="NEXT" onclick="#{rich:component('ds')}.next()" disabled="true" />

                   

                   

                  <rich:dataScroller for="pics" id="ds"  stepControls="hide" boundaryControls="hide"

                                  fastControls="hide" maxPages="10" />

                   

                  Try this, I think it ll work for you.

                   

                  Regards,

                  Swastik