It's not a secret anymore!
The moose likes JSF and the fly likes ActionListener NetBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "ActionListener NetBeans" Watch "ActionListener NetBeans" New topic

ActionListener NetBeans

martin monowitz

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"/>

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

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.
I agree. Here's the link:
subject: ActionListener NetBeans
It's not a secret anymore!