7 Replies Latest reply on Mar 14, 2007 11:21 AM by Ralph Perko

    datatable / datascroller issue

    Ralph Perko Newbie

      Hello,
      I am currently using <a:commandButton .. to populate a rich:dataTable.

      Part of what this does is submit some check boxes to determine which columns to show. This part works great. The problem is when I introduce the datascroller it completely ignores the backing bean data with the criteria as to which column should be displayed. The result is none of the optional columns are displayed. So in the example below "Date" will be displayed but not "Amount". Other than this the paging is working correctly.

      I tried putting everything relevant into the same <a:region to no avail. Any thoughts on what I could be doing wrong? - Thanks!

      <h:form>
       <a:region id="selectionRegion">
       <rich:simpleTogglePanel label="Selection Criteria" switchType="client">
       <h:panelGroup>
       <h:selectBooleanCheckbox value="#{backingBean.showColumn}"/>
       <h:outputText value="Show me"/>
       <a:commandButton value="Get Data"
       action="#{backingBean.fetchData}"
       reRender="ajaxTran"/>
      
       <a:status startText="Fetching Data..." stopText=""/>
       </h:panelGroup>
       </rich:simpleTogglePanel>
       <rich:simpleTogglePanel label="Ledger Transactions" switchType="client">
       <h:panelGroup>
       <a:outputPanel id="ajaxTran">
       <rich:dataTable id="tranTable">
       .........
       <rich:column>
       #{bean.date}
       </rich:column>
       <rich:column rendered="#{backingBean.showColumn}">
       #{bean.amount}
       </rich:column>
      
       </rich:dataTable>
      
       <rich:datascroller for="tranTable"/>
      
       </a:outputPanel>
       </h:panelGroup>
       </rich:simpleTogglePanel>
       </a:region>
      </h:form>