File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes How to avoid a4j:support in a4j:commandLink? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to avoid a4j:support in a4j:commandLink?" Watch "How to avoid a4j:support in a4j:commandLink?" New topic

How to avoid a4j:support in a4j:commandLink?

sergio martin

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

Someone told me that I don´t need a4j:support inside a a4j:commandLink because support is already included in commandLink. The thing is that i´m new to richfaces, and I don´t know how to include in the commandLink the support that I actually have in my code (see below) .

<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}" />

Thanks in advance for your help!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

You don't need the a4:support because you can just use the "onclick" on the a4j:commandLink.

However, you're overloading a lot of glop onto that one command link. What are you actually trying to accomplish that would require such a baroque construct?

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: How to avoid a4j:support in a4j:commandLink?
It's not a secret anymore!