Programming Tutorials

Comment on Tutorial - Action listeners in JSF By Charles



Comment Added by : Felipe

Comment Added at : 2010-02-18 05:03:51

Comment on Tutorial : Action listeners in JSF By Charles
hi,

i have a problem. I have the tipical common JSP page that is include by the rest JSP. This page is a filter page and that is include in the other pages with "jsp:include" tag. The filter page have buttons to search elements with the next date or the previous date, but must call diferent beans (each principal page have its own SearchBean) Each principal page, that includes the filter page, use "jsp:param" tag to indicate the actionListener that must be invoke. But when in the filter page i put "#{param.forwardActionListener}" in the "h:commandButton", i get an error when click.

Exemple:

test.jsp code

<jsp:include page="dateFilterPage.jsp" flush="true">
<jsp:param name="parentView" value="testSubview"/>
<jsp:param name="backAction" value="TestSimpleBean.action"/>
<jsp:param name="forwardAction" value="TestSimpleBean.action"/>
<jsp:param name="backActionListener" value="TestSimpleBean.backDate"/>
<jsp:param name="forwardActionListener" value="TestSimpleBean.forwardDate"/>
</jsp:include>

dateFilterPage.jsp code

<h:commandButton styleClass="esriToolDefault" id="FechaAdelanteBtn" value="forward date" action="#{param.forwardAction}" actionListener="#{param.forwardActionListener}"/>

The error is :

javax.faces.el.MethodNotFoundException: backActionListener: com.sun.faces.context.RequestParameterMap.backActionListener(javax.faces.event.ActionEvent)

How i can force to filter page to invoke the correct bean getter by param?

Thanks


View Tutorial