I have a JSF
+Spring Web Flow
application and I'd like to move from one view to another one using a method defined in the view's bean.
So, my flow.xml is like the following:
<flow ...>
<var name="myBean" class="mypackage.myclass" />
<view-state id="list">
<transition on="myEvent" to="#{myBean.onMyEvent()}"
</view-state>
</flow>
In the bean I've defined:
public String onMyEvent(final SelectEvent event) {
//Do something
return "input";
}
The button is simply:
<h:commandButton id="myButton" action="myEvent" ajax="false" value="myButton" />
When I push on the button that contains the action="myEvent"
I get the error:
EL1004E: Method call: Method onMyEvent() cannot be found on type [...]
So, what's wrong with my code? How can I call a method in my bean on some event?
Thanks.