Narayana Nagireddi
Narayana Nagireddi

Reputation: 749

f:setPropertyActionListener setter not being invoked

I'm using Icefaces 1.8.2 with jsf 1.1 The setter method of target field is not invoked before the commandLink action method.

<ice:panelSeries id="deptSeries" value="#{sessionScopedBean.deptList}" var="dept">
......
 <ice:commandLink actionListener="#{myActionBean.search}">
    <f:setPropertyActionListener target="#{sessionScopedBean.searchList}" 
                                              value="#{dept.myList}"/>
    <ice:graphicImage title="search" url="/images/search.gif"/>
    <f:param name="user" value="#{userBean.name}"/>
 </ice:commandLink>
......
</ice:panelSeries>

Upvotes: 1

Views: 795

Answers (1)

Kevin
Kevin

Reputation: 4128

Firstly, <setPropertyActionListener /> was introduced in JSF 1.2.

Secondly, the code actionListener="#{myActionBean.search}" represents an action listener, and not an action. Consequently, the method myActionBean.search() is called in the same phase of the JSF lifecycle as the property action listener.

Try changing the command link to look like this:

<ice:commandLink action="#{myActionBean.search}">
....
</ice:commandLink>

This link might be useful to gain an understanding:

Differences between action and actionListener

Upvotes: 1

Related Questions