Last active
December 15, 2015 17:59
-
-
Save jamestrandung/5300085 to your computer and use it in GitHub Desktop.
The order of Action and Listener in JSF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.beanBag; | |
@ManagedBean(name = "mrBean") | |
@RequestScoped | |
public class MrBean implements ActionListener { | |
private String type; | |
public void triggerActionListener() { | |
System.out.println("MrBean is called by buttons' actionListener."); | |
} | |
public void triggerAction() { | |
System.out.println("MrBean is called by button's action."); | |
} | |
public void setType(String type) { | |
System.out.println("MrBean is called by <f:setPropertyActionListener>."); | |
} | |
@Override | |
public void processAction(ActionEvent event) throws AbortProcessingException { | |
System.out.println("MrBean is called by <f:actionListener>."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<--- Start of Console ---> | |
MrBean is called by buttons' actionListener. | |
MrBean is called by <f:setPropertyActionListener>. | |
MrBean is called by <f:actionListener>. | |
MrBean is called by button's action. | |
<--- End of Console ---> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment