7 Replies Latest reply on Apr 22, 2015 8:51 AM by asesovici

    vertical scroll bar in rich:extendedDataTable

    sandhyaradhakrishnan

      Hi,,

       

      I have a problem in rich:extendedDataTable with the vertical scroll bar. The last row of the table is not visible properly. Only half of the column is visible. I tried using

       

      .extdt-innerdiv {

          overflow-x: auto !important;

          overflow-y: scroll;

      }

       

      but the scroller considers the header as well. Please help.

        • 1. Re: vertical scroll bar in rich:extendedDataTable
          vi_mahe_ka1

          you can use scrollable datatable for getting vertical scroll bar.

          here is the sample code for scrollable data table

           

           

           

          <

          rich:scrollableDataTable value="#{bean.list}"

           

           

          height="200px" id="columns" var="result" width="200px">

           

           

           

           

           

          if you want vertical scroll bar in extendedDataTable just use height attribute.here is the sample code

          <

          rich:extendedDataTable value=

          "#{bean.list}"

           

           

           

           

           

           

          var="result" height="400px" width="100%"

           

          binding="#{bean.Table}"

          >

           

          • 2. Re: vertical scroll bar in rich:extendedDataTable
            sandhyaradhakrishnan

            I have used the height attribute , i get a scroll bar but the last row is not seen fully.

             

            <rich:extendedDataTable

                                 width="100%"

                                 height="350px"

                                id="dynamicTable"

                                enableContextMenu="false" 

                                var="fileData" reRender="dynamicScroller"

                                rowClasses="datatable-odd,datatable-even"

                                value="#{Bean.tableDataList}"

                                rows="#{Bean.displayRecordCount}"

                                noDataLabel="No records Founf"

                                tableState="#{Bean.tableState}">

            • 3. Re: vertical scroll bar in rich:extendedDataTable
              vi_mahe_ka1

              Try removing the rows attribute from the rich:extendedDataTable Tag

              here is the working code, which will give you vertical scroll bar

              Xhtml code

              <rich:extendedDataTable value="#{test.dynamicList}" width="100px"
                height="350px" id="dynamicTable" enableContextMenu="false"
                var="fileData" reRender="dynamicScroller"
                rowClasses="datatable-odd,datatable-even"
                noDataLabel="No records Founf">
                <rich:column>
                 <f:facet name="header">
                  <h:outputLabel value="test header" />
                 </f:facet>
                 <h:outputText value="#{fileData}" />
                </rich:column>
              </rich:extendedDataTable>

               

              Managed bean code:

              import java.util.ArrayList;
              import java.util.List;

              import javax.faces.bean.ManagedBean;
              import javax.faces.bean.ViewScoped;


              @ManagedBean(name = "test")
              @ViewScoped
              public class TestManagedBean {


              private List<String> dynamicList=new ArrayList<String>();
              public TestManagedBean() {
                for(int i=1;i<100;i++){
                 dynamicList.add(" proeprty "+i);
                }
              }


              /**
                * @return the dynamicList
                */
              public List<String> getDynamicList() {
                return dynamicList;
              }

              /**
                * @param dynamicList the dynamicList to set
                */
              public void setDynamicList(List<String> dynamicList) {
                this.dynamicList = dynamicList;
              }

              }

               

              • 4. Re: vertical scroll bar in rich:extendedDataTable
                sandhyaradhakrishnan

                I have done that too.. but still same issue persists..

                • 5. Re: vertical scroll bar in rich:extendedDataTable
                  vi_mahe_ka1

                  can you please attach the screen shot of your screen

                  in b/w you can adjust the height attribute of the table to see the last row

                  • 6. Re: vertical scroll bar in rich:extendedDataTable
                    sandhyaradhakrishnan

                    Increasing the height also dint help because the scroll bar took a certain place of the column. I solved the issue by adding padding to the styleClass(extdt.cell). Thanks a lot.

                    • 7. Re: vertical scroll bar in rich:extendedDataTable
                      asesovici

                      Is there any other solution to this? Applying a padding to the .rich-extdt-cell is not so desirable because it would apply to all cells, not just the last row.