Tuesday, November 24, 2009

JSF SelectOneMenu valueChangeListener

Today I used the following code in one of my projects...(the below is just a pseudo code..)



Inside the bean I had:
    public void mymethod(ValueChangeEvent ve)
    {
      ...
      ...
    }


I hoped that changing value on the select menu would fire the method but instead nothing happened...if you are also stuck at this point...change the code as follows:



Notice the onchage attribute that is newly added...this will fire the method...

Hope this helps...

0 comments:

Post a Comment

About This Blog

In this blog you will find simple but great ideas on various topics ranging from food recipes to investment strategies. I hope the ideas presented in this blog will help you all in some way or other. Also included are the recent and hot news around the world...

Go ahead and grasp my ideas...

Disclaimer and Terms of Use

All the ideas and opinions provided herein are intended to share and inform simple and useful information. They come with no warranty of any kind. If you should choose to interpret graspmyideas.blogspot.com information as perfect working ideas, or advice or if you want to completely rely on these ideas, you do so at your own risk.

This site is offered as is and without warranties of any kind. We are not responsible for timeliness, accuracy, unavailability or interruptions in availability, viruses or other defects in the site or its contents. In no event shall graspmyideas.blogspot.com site or its authors are responsible for any damages to users or their computer systems.


Your Ad Here

  © Blogger template AutumnFall by Ourblogtemplates.com 2008

Back to TOP