Handling Events in JavaServer Faces, Part 1
Subject:   Action methods Vs Action listeners
Date:   2006-09-19 02:02:36
From:   madhav_bhargava
Hi Hans,

As i understand: After executing Action methods the control goes to the Render response phase. Based on the String returned it decides where to go next using the JSF Navigation Handler. However action listeners which are registered to the component get executed but they do not direct the control anywhere. Depending on the immediate property they are either executed during the INVOKE APPLICATIOn or APPLY REQUEST VALUE phase.

The questions are:

1. If i want to only process data that the user has entered but remain on the same UI screen then what should be used - Action method or Action listeners?

2. Can we have more than one action methods for a component? Thinking logically it does not make sense.

3. When do we use Action listeners and when do we use Action apart from the situation where next action needs to be decided by the string that is returned from the action method?