| Author |
ActionListener NetBeans
|
martin monowitz
Greenhorn
Joined: Mar 10, 2008
Posts: 1
|
|
Here is my newbie problem... i tried this in NetBeans 6.0: ... <h:messages style="color: blue"/><br> <h:commandButton id="button01" value="Click me" action="success"> <f:actionListener type="events.MyListener"/> </h:commandButton> ... package events; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionEvent; import javax.faces.event.ActionListener; public class MyListener implements ActionListener { public MyListener() { } public void processAction(ActionEvent ae) throws AbortProcessingException { FacesContext context = FacesContext.getCurrentInstance(); context.addMessage(null, new FacesMessage("button clicked")); } } My problem: nothing happens :P no errors, no crash, no exception, ...
|
 |
David O'Meara
Rancher
Joined: Mar 06, 2001
Posts: 13459
|
|
"johnny bravo", Welcome to the JavaRanch. We're a friendly group, but we do require members to have valid display names. Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed. Please edit your profile and correct your display name since accounts with invalid display names get deleted.
|
[ JavaRanch FAQ ][ Book Promotions ][ DbTamer ][ BumperStickers ][ JavaRanch Badges ]
|
 |
 |
|
|
subject: ActionListener NetBeans
|
|
|