Simple dynamic table with ice:columns  XML
Forum Index -> General Help
Author Message

Joined: 18/Sep/2009 00:00:00
Messages: 57

I have been trying to build a simple dynamic dataTable based on two lists.

rowModel is a ListDataModel of List<String> objects, where each list contains N Strings.
headerModel is a ListDataModel of N String objects.

I had problems with the way models were iterated until I introduced the varStatus attribute. The following ended working as expected.

         <ice:dataTable value="#{bean.rowModel}" var="row">
             <ice:columns value="#{bean.headerModel}" var="hdr" varStatus="sta">
                 <f:facet name="header">
                     <ice:outputText value="#{hdr}"/>
                 <ice:outputText value="#{row[sta.index]}"/>

Hope it helps someone.
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team