4 Replies Latest reply on Sep 5, 2007 3:27 PM by ishabalov

    Dynamic value in column

    kewldude

      Is it possible to derive values for a column header coming from an EL ("#{item.columnValue}" ). I tried to do it using rich:datatable and rich:column, but it didnt work at all.

       <rich:dataTable width="100%" id="dataModelTable" rows="10" columnClasses="tableColumnCatItems"
       value="#{dataModel.tableModel}" var="item" binding="#{dataModel.table}" >
       <f:facet name="header">
       <rich:columnGroup>
       <h:column>
       <h:outputText value="No" />
       </h:column>
       <h:column>
       <h:outputText value="Item" />
       </h:column>
       <h:column>
       <h:outputText value="Image" />
       </h:column>
       <h:column>
       <h:outputText value="Price" />
       <h:outputText value="#{item.currency}" />
       </h:column>
       </rich:columnGroup>
       </f:facet>
      
       <rich:column>
       <h:outputText value="#{item.number}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{item.description}" />
       </rich:column>
      
      
       <rich:column>
       <h:outputText value="#{item.image}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{item.price}" />
       </rich:column>
      
      </rich:dataTable>
      


      I want to display the currency for the price and the currency value ,though it is the same for all the items, will come from the back end (which i want to get using EL ).