aspose file tools*
The moose likes JSF and the fly likes a4j:commandLink not working inside a4j:repeat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "a4j:commandLink not working inside a4j:repeat" Watch "a4j:commandLink not working inside a4j:repeat" New topic
Author

a4j:commandLink not working inside a4j:repeat

sergio martin
Greenhorn

Joined: May 17, 2010
Posts: 3
Hello everybody.

I have this piece of code. Everything is rendering fine, but somehow, the links inside the repeat are not arriving to the server.
What´s weird is that the first part of the code (the one that is not inside the repeat) is working fine. To my eyes, both are the same and, at least, are rendering equally in my browser.

I´m new to richfaces... any clue?
(The value of the param is hardcoded for testing purposes...)

Thanks a lot!!

CODE:
<a4j:form>
<div>
<a href="#" title="">John Doe</a>
<a4j:commandLink reRender="results-view" action="#{actionsContainer.userManagementActions.loadUser}" title="Edit" styleClass="edit">
<f:param name="userName" value="john"/>
<h:outputText value="Edit" /> <small>Edit user<b></b></small>
<a4j:support event="onclick">
<f:setPropertyActionListener value="../user-mng/users-edit.xhtml" target="#{layout.displayAs}" />
</a4j:support>
</a4j:commandLink>
</div>

<a4j:repeat value = "#{usersBean.users}" var = "user">
<div>
<a href="#" title=""><h:outputText value = "#{user.firstname}"/><h:outputText value=" " escape="false" /><h:outputText value = "#{user.lastname}"/></a>
<a4j:commandLink reRender="results-view" action="#{actionsContainer.userManagementActions.loadUser}" title="Edit" styleClass="edit">
<f:param name="userName" value="john"/>
<h:outputText value="Edit" /> <small>Edit user<b></b></small>
<a4j:support event="onclick">
<f:setPropertyActionListener value="../user-mng/users-edit.xhtml" target="#{layout.displayAs}" />
</a4j:support>
</a4j:commandLink>
</div>
</a4j:repeat>
</a4j:form>
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
have you heard of <a4j:keepAlive>

try it out
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a4j:commandLink not working inside a4j:repeat