4 Replies Latest reply on Feb 12, 2009 7:49 PM by Nick Belaevski

    DataTable with Dynamic Columns

    Ramazan Pekin Newbie

      Hi, I am trying to generate dynamic columns, I have writed some codes like this but it is not working, can you suggest me anyway?

      
      <rich:dataTable value="#{controller.commissionList}" var="commission" columns="1" rows="3">
       <rich:column>
       <rich:dataTable value="#{commission.distPartyList}" var="distParty" cellpadding="0" cellspacing="0" width="700" border="0" rendered="true">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column colspan="100">
       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       <tr>
       <td align="left">
       <h:outputText value="#{commission.description}"/>
       </td>
       </tr>
       </table>
       </rich:column>
       <rich:column breakBefore="true">
       <h:outputText value="#{msg.distPartyType}" />
       </rich:column>
       <rich:columns value="#{commission.distPartyCreditRangeList}" var="distPartyCreditRange">
       <h:outputText value="#{distPartyCreditRange.minimumCredit} - #{distPartyCreditRange.maximumCredit}"/>
       </rich:columns>
       </rich:columnGroup>
       </f:facet>
       </rich:dataTable>
       </rich:column>
      </rich:dataTable>