Doubt in the action method
Should the action method always contain a return type.
The return type is provided to specify the target to navigate.
Can't the target be specified in any other way for an action method without a return type.
I have an application where I have to add the user details to the database. Whenever the profile is added, the application should be notified. The managed bean (myBean) implements a listener, and the notification is done by overriding the abstract method, whose return type is void. I can't change the signature of this method.
The add functionality is implemented in the Listener's abstract method.
and the add functionality is invoked as follows
<h:commandButton action="myBean"/>
But If I have to specify a different target, for eg to display the error page How do i do this?
Please suggest some workaround.

