1 2 Previous Next 16 Replies Latest reply on Sep 26, 2008 11:18 AM by shiocaltz

    scrollableDataTable problem.

    daedlus

      Hi
      i tried to use scrollableDataTable to display as below:
      but the rendered output has extra column and doesnt display correct number of rows as specified in rows attribute.

      also how do i use the sort and pagination functionality?

      help much appreciated.

      <h:form>
      <rich:scrollableDataTable id="id_Table" height="500px" width="500px" rows="5" value="#{bean.myList}" var="row" >
      
      <rich:column id="id_Id">
      <f:facet name="header">
      <h:outputText value="ID" />
      </f:facet>
      <h:outputText value="#{row.id}" />
      </rich:column>
      
      <rich:column id="id_name">
      <f:facet name="header">
      <h:outputText value="Name" />
      </f:facet>
      <h:outputText value="#{row.name}" />
      </rich:column>
      
      </rich:scrollableDataTable>
      </h:form>
      



        • 1. Re: scrollableDataTable problem.
          fmars

          Is there such a component "scrollableDataTable"?

          • 2. Re: scrollableDataTable problem.
            fmars

             

            "fmars" wrote:
            Is there such a component "scrollableDataTable"?


            Yes, there is. But i didn't know it, because there is no section about it in richfaces_reference.pdf

            • 3. Re: scrollableDataTable problem.
              maksimkaszynski

               

              "daedlus" wrote:
              Hi
              i tried to use scrollableDataTable to display as below:
              but the rendered output has extra column and doesnt display correct number of rows as specified in rows attribute.

              also how do i use the sort and pagination functionality?

              help much appreciated.



              There's no pagination in scrollable table. If you want pagination, check dataTable together with dataScroller.
              ScrollableDataTable has another powerful feature - scrolling. By using rows attribute you can set up ajax scrolling, which will load rows on demand.
              Your example doesn't work because you set rows attribute to a number lesser than your grid size. Scrollable data table isn't yet smart enough to calculate how much rows it actually needs to fill the grid view port. We are working on it.

              To make your example work specify bigger value of rows attribute, say 20.


              • 4. Re: scrollableDataTable problem.
                ratondeau

                Hi

                tried the richfaces-demo nightly build from August, 30th. Problem: you can see the table row through the vertical scrolbar and if you scroll the selected row to the vertical scrollbar position the scrollbar diappears.

                See attached image. Happens inn FF 2.003 and IE7.

                The selection dissappears after additional rows are requested. I know that this component is still under construction, but it is surely not supposed to behave like this.

                [img]https://fotoalbum.web.de/alben/m.graehn/forum/printImage?imageId=76192268&imageType=image[/img]

                Greets

                Matt

                • 5. Re: scrollableDataTable problem.
                  maksimkaszynski

                  Sorting functionality.
                  There's sortExpression attribute on rich:column component.
                  It can be either literal, or EL-expression.

                  Example:

                  <rich:scrollableDataTable var="item" value=#{list}"">
                  
                  <rich:column sortExpression="#{item.sender.name}" sortable="true">


                  Clicking on this column will cause data to be sorted by result of evaluation of #{item.sender.name} for every row.

                  <rich:column sortExpression="id">

                  Data will be sorted by value of item's id property.

                  <rich:column id="name" sortable="true"

                  If sort expression is not set, scrollable table attempts to use column id as sort expression


                  • 6. Re: scrollableDataTable problem.
                    daedlus

                    ok thx for the reply am now using rc4 version.
                    the display is still not right it is displaying extra column in the table and also the horizontal scroll doesnt make the col headers move along with content. but if change the grid size to some other value it works . i am doing this in IE6

                    i have uploaded the screen shot

                    http://www.uploadhouse.com/viewfile.php?id=442128
                    
                    http://www.uploadhouse.com/viewfile.php?id=442131
                    


                    • 7. Re: scrollableDataTable problem.
                      daedlus

                      if i restrict the width of scrollableDataTable to width of my cols then the extra column stays hidden.

                      also when i tried using the rich:datascroller along with the scrollableDataTable after i do some scrolling , the sorting function on cols no longer works and also header no longer moves with the table content on horizontal scroll.

                      • 8. Re: scrollableDataTable problem.
                        maksimkaszynski

                        ScrollableDataTable isn't supposed to be used together with dataScroller.
                        Do you really need them to work together?

                        • 9. Re: scrollableDataTable problem.
                          daedlus

                          Like you said before

                          ScrollableDataTable has another powerful feature - scrolling. By using rows attribute you can set up ajax scrolling, which will load rows on demand.
                          


                          how do i use this feature without scroller

                          • 10. Re: scrollableDataTable problem.
                            ilya_shaikovsky

                            scrollabletable - will load new rows via ajax after you scroll the table using standard scroll controls.

                            • 11. Re: scrollableDataTable problem.
                              daedlus

                              so it the html scroller that appears with scrollableDataTable and not the rich:dataScroller
                              (shud not be used with scrollable table) that does the magic
                              am i correct?

                              • 12. Re: scrollableDataTable problem.
                                ilya_shaikovsky

                                yes standard scroll will load data via ajax out-of-the-box. :)

                                • 13. Re: scrollableDataTable problem.
                                  daedlus

                                   

                                  "maksimkaszynski" wrote:
                                  ScrollableDataTable isn't supposed to be used together with dataScroller.
                                  Do you really need them to work together?


                                  using rich:datascroller with scrollable table, will it be supported in later version?

                                  • 14. Re: scrollableDataTable problem.
                                    maksimkaszynski

                                    Want it so badly? Submit request to jira. If we get enough votes - we'll implement it.

                                    1 2 Previous Next