[jboss-user] [JBoss Seam] - Seam newbie question
nepveul
do-not-reply at jboss.com
Wed Jan 30 22:44:31 EST 2008
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124983#4124983
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4124983
More information about the jboss-user
mailing list