0 Replies Latest reply on Aug 7, 2008 9:18 AM by jp mejorada

    RichFaces Scrollable DataTable problem

    jp mejorada Newbie

      Hello. I am new to richfaces, and currently using RichFaces 3.1.4, because our app is not Jsf 1.2 compliant. The scrollableDataTable is really neat, but it doesnt quite give me what i need. My issue is dynamically setting row classes based on particular data values. Additionally, those row style classes need to be maintained when the client scrolls down/up.

      My current code is similar to the following:

      <rich:scrollableDataTable
      binding="#{siteAlarmBean.myScrollableDataTable}" rows="50"
      rowKeyVar="rkv" height="97%" width="100%"
      id="alarmTableData"
      value="#{siteAlarmBean.eventPanelAlarms}"
      hideWhenScrolling="true"
      var="epData" rowClasses="#{siteAlarmBean.rowClasses}">


      <rich:column sortable="false" id="rowNum">
      <f:facet name="header">
      <h:outputText styleClass="headerText" value="Row #" />
      </f:facet>
      <h:outputText value="#{rkv}" />
      </rich:column>
      <rich:column sortable="false" id="date">
      <f:facet name="header">
      <h:outputText styleClass="headerText" value="Date" />
      </f:facet>
      <h:outputText value="#{epData.dto.osDate}" />
      </rich:column>

      ....
      .....

      </rich:scrollableDataTable>

      siteAlarmBean is in request scope.
      siteAlarmBean.rowClasses returns a comma delimitted list of row styles, which correspond to a data elements returned from siteAlarmBean.eventPanelAlarms.

      If siteAlarmBean.eventPanelAlarms returns a list greater than 50, then the browser goes back to the server, and retrieves more rows. The problem is, the row classes seem to get lost. In other words, style class of Data rows>50 are not maintained. I need to set the row count to 50 for performance reasons.

      Any insight, patterns or alternatives to help me solve this is greatly appreciated.

      jmejorada@hai.com