3 Replies Latest reply on Jan 31, 2008 7:35 AM by Laurent Nepveu

    Seam newbie question

    Laurent Nepveu Newbie

      Hi!

      I'm relatively new to Seam and the related technologies (JSF, hibernate, etc.)

      I'm trying to build a very simple webpage. One of my entity is a User.

      I have some sort of UserList.xhtml page that displays all the user info + a link for each row. I want this link to call an action listener, something like that:

       <h:column>
       <f:facet name="header">action</f:facet>
       <s:link view="/#{empty from ? 'User' : from}.xhtml"
       action="#{bean.action}"
       value="Select"
       id="user">
       <f:param name="userId"
       value="#{user.id}"/>
       </s:link>
       </h:column>
      


      But I want my #{bean.action} to be parametrized.

      So I create a param to this page:
      <param name="action_"/>


      Then I change, the previous code to :

       <h:column>
       <f:facet name="header">action</f:facet>
       <s:link view="/#{empty from ? 'User' : from}.xhtml"
       action="#{action_}"
       value="Select"
       id="user">
       <f:param name="userId"
       value="#{user.id}"/>
       </s:link>
       </h:column>
      


      But that doesn't work, right, because it will resolve #{action_} as some piece of text like "tournamentHome.addUser", but not as a method reference like #{tournament.addUser}.

      I'm sure this is trivial...but can't seem to figure out out to parametrize correctly my action to put under my link.

      Thanks for your help!

      Laurent