jsf - trying to add an actionlistener -


im trying add actionlistener menuitem primefaces component

itemlogout.addactionlistener(new actionlistenermanagedbean()); 

and in actionlistenermanagedbean use :

public class actionlistenermanagedbean implements actionlistener {       public actionlistenermanagedbean() {         super();      }      @override     public void processaction(actionevent arg0) throws abortprocessingexception {         system.out.println("test action listener called..");     }      public void actionperformed(actionevent e) {         if(e.getsource() == "aa"){     }      } } 

but not happens when click on logout item menu.

would me please ? in advance...

your e.getsource() == "aa" should e.getsource() == itemlogout.

basically e.getsource() returns object action invoked on.

i assuming actionlistenermanagedbean inner class.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -