0 Replies Latest reply on May 14, 2007 4:37 AM by ypasmk

    Datamodel question

    ypasmk

      I have a list that I want to expose using the Datamodel annotation

      @DataModel
      List<Users> listUsers;
      


      also Users entity contains a list of names like

      public class Users {
      
      ..
      List<Names> names
      ..
      }
      



      in my xhtml page i have this code

      <h:dataTable value="#{listUsers}" var="users" rowClasses="odd,even" headerClass="tableHeader" border="0" cellpadding="1" cellspacing="1" first="#{myBean.firstRowIndex}" rows="#{myBean.noOfRows}" width="500" footerClass="tableHeader">
      
      <h:column>
      <f:facet name="header">
      <h:outputText value="User name" />
      </f:facet>
      <h:commandLink action="#{myBean.details}">
      <h:outputText value="#{users.names[?].lastname}" />
      </h:commandLink>
      </h:column>
      </h:dataTable>
      
      


      and I wonder if somehow I can print the listUsers.names.get(0).lastname in my xhtml page, which is the first name Object that this user has...