8 Replies Latest reply on Sep 1, 2008 6:32 AM by ilya_shaikovsky

    write custom renderer for dataScroller

    altfatterz

      Hi,

      I would like to change the dataScroller renderer.
      Could you give a hint how to start? Should I start with CDK?

      Thanks

        • 1. Re: write custom renderer for dataScroller

          what the problem with the current one?

          • 2. Re: write custom renderer for dataScroller
            altfatterz

            Hi,

            I have to change the appearance quite much.
            - <<, << << - changing with images
            - getting rid of coloring the background, using different color, font...etc

            So far I managed to change quite much with inactiveStyleClass, selectedStyleClass, tableStyleClass..but what I couldn't change now were:

            the background color in the cell where the scrolling icons are rendered... where dr-dscr-button, dr-dscr-button-dsbld are used. Do you have any idea how to override those?

            Thanks

            • 3. Re: write custom renderer for dataScroller
              ziphyre

              Hi,

              I'm also interested in the answer of the first question. I want to change the behaviour of the scroller to something like this, for ex:
              < 3 | 9 >

              3 being the current page
              9 being the total number of pages
              <\>, links to previous or to next page

              So, a hint would be useful
              Thanks

              • 4. Re: write custom renderer for dataScroller
                ilya_shaikovsky

                if you'll read the datascroller section in developer guide - most of your problems will be solved. Set of facets could be defined in order to customize controls and create your "3 | 9" info block.

                • 5. Re: write custom renderer for dataScroller
                  ziphyre

                  thanks...

                  • 6. Re: write custom renderer for dataScroller
                    escher9694

                    Perhaps the previous poster's question was answered with a simple RTFM, but what if I really do need a custom renderer? I have a requirement to implement the following pagination:
                    < 1 ... 5 6 7 ... n >

                    Obviously, I'd like to leverage the fine work that went into RichFaces, but it isn't at all obvious how to integrate my own renderer. I downloaded the source and modified DataScrollerRenderer to do this. I haven't yet found where / how to define my own renderer implementation class instead of modifying RichFaces source. Can someone point me in the right direction?

                    • 7. Re: write custom renderer for dataScroller
                      escher9694

                      Let me clarify a bit. What I would like to do is package my modifications separately from the richfaces jars so that there is less confusion and maintenance headache. Can I create an my own jar with a faces-config.xml file pointing to a custom renderer implementation, but still leveraging the remaining RichFaces datascroller pieces?

                      • 8. Re: write custom renderer for dataScroller
                        ilya_shaikovsky

                        ok. Almost any JSF book contains a section about custom render-kit's usage. And all those JSF features like custom renderers writing - available for sure with rich faces.