Which render event should be used when replacing a4j:support with f:ajax tags?

276 Views Asked by At

Using Migrating from JSF 1.2 to JSF 2.0 and Migrating JSF 1.1 with Ajax4jsf 1.x to JSF 2 as guides to upgrade some JSP files to Facelets, I came across some a4j:support tags nested inside h:commandLink components in those JSP files, like this:

<h:commandLink action="someAction" title="#{someTitle}">
    ...
    <a4j:support event="onchange" reRender="someId"/>
</h:commandLink>

Going by the links mentioned above, I changed this in my Facelet to:

<h:commandLink action="someAction" title="#{someTitle}">
    ...
    <f:ajax event="change" render="someId"/>
</h:commandLink>

but this lead to some JSF error about the change event not being supported in the h:commandLink component.

Trying to use the advice from What values can I pass to the event attribute of the f:ajax tag?, I checked the documentation of h:commandLink and it turned out that onchange is indeed not among the attributes of h:commandLink.

So, my question now is: which of the attributes available in h:commandLink should be used in the Facelet's event attribute to keep the functionality of the a4j:support event="onchange" tag in my old JSP file?

0

There are 0 best solutions below