3 Replies Latest reply on Jun 1, 2009 4:46 AM by ilya_shaikovsky

    rich:ScrollableDataTable shows data but than rerenders to an

    derkd

      Hi all,

      I have a rich scrollableDataTable which is showing me eventually nothing.

      When I do a submit I retrieve data from a webservice and put that in a List. The data from the list is displayed in the scrollableDataTable for 1 second and then rerendered or something which results in an empty table. When I change the scrollableDataTable into a dataList or dataTable the displaying of the data is just fine. Except I need to be able to select a row so that's why I choose the scrollableDataTable.


      ZoekOpleidingAction in conversation scope (long running)

      @DataModel(scope = ScopeType.PAGE)
      protected List<IOpleiding> soiOpleidingen;
      
      private Selection selection
      
      //getters and setters
      


      soi_sectoren.xhtml
      <h:form>
      <rich:panel>
      <h:inputText id="ZoekOpleiding" value="#{ZoekOpleidingAction.zoekSOI}"
      valueChangeListener="#{zoekOpleidingAction.zoekSOIChanged}" style=" width : 350px;"/>
      
      <rich:messages/>
      <rich:scrollableDataTable id="soiResult" rowKeyVar="rkv"
      value="#{zoekOpleidingAction.soiOpleidingen}" var="_opleiding" columns="1" rows="50" style="table1" width="550px" rowClasses="row1" columnClasses="col1" height="400px" selection="#{zoekOpleidingAction.selecten}">
      
      <rich:column width="550px">
       <h:outputText value="#{_opleiding.omsOpleidingsnaam}"/>
      </rich:column>
      
      </rich:scrollableDataTable>
      


      I'm using Seam and richfaces 3.1.6SR1

        • 1. Re: rich:ScrollableDataTable shows data but than rerenders t
          derkd

          There was a mistake in the previous soi_sectoren.xhtml here the whole source of the soi_sectoren.xhml

          Is this a bug in the 3.1.6SR1 ScrollableDataTable??

          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
           xmlns:s="http://jboss.com/products/seam/taglib"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:rich="http://richfaces.org/rich"
           xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
           template="../layout/layout.xhtml">
          
           <ui:define name="body">
           <script src="../js/opleiding.js" type="text/javascript"></script>
           <style type="text/css">
           .table1 {
           background-color: #ffffff;
           font-size: 10px;
           border: 0px;
           border-color: #ffffff;
           }
           .row1 {
           background-color: #ffffff;
           font-size: 10px;
           border: 0px;
           }
           .col1 {
           background-color: #ffffff;
           font-size: 10px;
           border: 0px;
           border-right-color: #ffffff;
           border-bottom-color: #ffffff;
           }
          
           .richPanel {
           vertical-align:top;
           }
           .rich-sdt-row-active {
           background-color: #ffead9;
           }
           .rich-sdt-row-selected {
           background-color: #ffead9;
           }
           </style>
           <h:form>
           <h:panelGrid columns="2" width="100%" columnClasses="richPanel">
          
          <rich:panel>...</rich:panel>
          
          <rich:panel>
          
           <h:inputText id="zoekOpleiding" value="#{zoekOpleidingAction.zoekSOI}"
           valueChangeListener="#{zoekOpleidingAction.zoekSOIChanged}" style=" width : 350px;"/>
           <a4j:commandButton value="Zoek" action="#{zoekOpleidingAction.findOpleidingSOI}" type="submit" reRender="soiResult, informationOpleidingPanelTree, " />
          
           <rich:messages/>
          
           <rich:scrollableDataTable id="soiResult" rowKeyVar="rkv"
           value="#{zoekOpleidingAction.soiOpleidingen}" var="_opleiding" columns="1" rows="50"
           style="table1"
           width="550px" rowClasses="row1" columnClasses="col1" height="400px"
           selection="#{zoekOpleidingAction.selection}">
          
          
           <rich:column width="550px">
           <h:outputText value="#{_opleiding.omsOpleidingsnaam}"></h:outputText>
           </rich:column>
          
           </rich:scrollableDataTable>
          
          
           </rich:panel>
          
           </h:panelGrid>
          
           </h:form>
          
           <a4j:include viewId="toonOpleidingInfoTree.xhtml" ajaxRendered="true"/>
          
           </ui:define>
          
          </ui:composition>
          
          


          • 2. Re: rich:ScrollableDataTable shows data but than rerenders t
            derkd

            it does seem to work with an <h:commandButton> but I need to use the a4j:commandButton, am I doing something wrong?

            • 3. Re: rich:ScrollableDataTable shows data but than rerenders t
              ilya_shaikovsky

              yes.. such issues were reported at 3.1.x branch. https://jira.jboss.org/jira/browse/RF-3049
              but unfortunatelly we have no plans on support this branch in nearest future because of 3.3.x(JSF 1.2 maintenance releases) and 4.x(JSF 2 related) works.

              So you have two ways there:

              update to JSF 1.2 branch(preferrable, many issues already filxed and stabilization/optimization works continues)
              patch the table on your own checking it from 3.1.x branch sources or maybe ask about it using JBoss support subscriptions system.