0 Replies Latest reply on Apr 29, 2008 3:28 PM by Maximiliano Carrizo

    Facelets and DataModelSelection

    Maximiliano Carrizo Newbie

      I'm trying to make a dataTable custom tag with facelets.


      This is the code of my original dataTable:


      <table jsfc="h:dataTable" value="#{users}" var="user" rendered="#{users.rowCount>0}">
                          
           <td jsfc="h:column">
                <th jsfc="f:facet" name="header">
                     <span jsfc="h:outputText" value="Action"/>
                </th>
                <a jsfc="s:link" value="View User" action="#{usersList.selectListElement}"  />
           </td>
      
      </table>
      



      This is my new code:


      <t:dataTable elements="#{users}">
           <td jsfc="h:column">
                <th jsfc="f:facet" name="header">
                     <span jsfc="h:outputText" value="Action"/>
                </th>
                <s:link value="View User" action="#{usersList.selectListElement}"  />
           </td>
      </t:dataTable>
      



      This is t:dataTable code:


      <ui:composition>
           <table jsfc="h:dataTable" value="#{elements}" var="var" rendered="#{elements.rowCount>0}">
                <span jsfc="ui:insert" />
           </table>
      </ui:composition>
      



      The first dataTable renders, on action, the following link:


      ...usersList.seam?dataModelSelection=user:users[5]&cid=24&actionMethod=pages....
      



      And the second:


      ...usersList.seam?dataModelSelection=&cid=24&actionMethod=pages....
      



      As you can see, facelets template 'eats' the current user link. Any ideas ? Thank you !!