Wednesday, June 18, 2008

JSF action vs actionListener

Actions are designed for business logic and participate in navigation handling, whereas action listeners typically perform user interface logic and do not participate in navigation handling.

The expression of action must evaluate to a public method that takes no parameters, and returns an Object (the toString() of which is called to derive the logical outcome) which is passed to the NavigationHandler for this application.

The expression of actionListener must evaluate to a public method that takes an ActionEvent parameter, with a return type of void.

Sample method for ActionListener
public void xxxMethod(ActionEvent e) {

How to use the actionEvent? I need some samples here...

No comments:

Post a Comment