1 Reply Latest reply on Sep 24, 2010 9:41 AM by Konstantin Mishin

    Scrollabledatatable not show scrollbar with CachedrowSetDataModel

    juan garcia Newbie

      I want to know why to link a scrollabledatatable with a cachedrowsetdatamodel not appear scrollbars

      Example:

      In jsp:

        <rich:scrollableDataTable   id="sampleData2" width="200px" height="300px"
                                    value="#{PruebaDataTable.dataTable1Model}" var="currentRow"
                                   frozenColCount="1" first="0" rows="5">
                                          <rich:column>
                                              <f:facet name="header"><h:outputText value="ID" /></f:facet>
                                              <h:outputText value="#{currentRow.idservidores}" />
                                          </rich:column>
                                          <rich:column >
                                              <f:facet name="header"><h:outputText value="Nombre" /></f:facet>
                                              <h:outputText value="#{currentRow.nombre}" />
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header"><h:outputText value="Descripcion" /></f:facet>
                                              <h:outputText value="#{currentRow.descripcion}"/>
                                          </rich:column>
                                      </rich:scrollableDataTable>

       

      In .java:

       

      private void _init() throws Exception {
                   dataTable1Model.setCachedRowSet((javax.sql.rowset.CachedRowSet) getValue("#{SessionBean1.servidoresRowSet}"));
               }

       

      private CachedRowSetDataModel dataTable1Model = new CachedRowSetDataModel();

          public CachedRowSetDataModel getDataTable1Model() {
              return dataTable1Model;
          }

          public void setDataTable1Model(CachedRowSetDataModel crsdm) {
              this.dataTable1Model = crsdm;
          }

       

       

      In SessionBean1.java:

       

        private void _init() throws Exception {

              servidoresRowSet.setDataSourceName("java:comp/env/jdbc/info_sistemas_MySQL");
              servidoresRowSet.setCommand("SELECT idservidores,nombre,descripcion FROM servidores");
              servidoresRowSet.setTableName("servidores");
          }
          // </editor-fold>

           private CachedRowSetXImpl servidoresRowSet = new CachedRowSetXImpl();

          public CachedRowSetXImpl getServidoresRowSet() {
              return servidoresRowSet;
          }

          public void setServidoresRowSet(CachedRowSetXImpl crsxi) {
              this.servidoresRowSet = crsxi;
          }