This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes ValueChangeListener in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "ValueChangeListener in JSF" Watch "ValueChangeListener in JSF" New topic
Author

ValueChangeListener in JSF

Ralph Hoch
Greenhorn

Joined: Jun 04, 2011
Posts: 4
Hi,

Currently I'm trying to create dynamically several components (HtmlSelectOneMenu) and display them. This part is working fine. But now I'm trying to add a ValueChangeListener to each of those components but somehow this listener does not get called. I tried several things (including a class that implements the ValueChangeListener interface) but it is still not working.



So far this is what I got but somehow the processValueChange-Function does not get called. I read that you have to submit the form first and after that you get the valueChangeEvent but also this doesn't seem to work.

Does someone have an idea? I'm actually trying to get the event when the value is changed (don't want to submit the form) and I'm using richfaces and ajax (but this is the next step).

EDIT:
ok it seems to be the h:head attribute that causes the problem. So my question is: Does someone have an idea on how you can set AjaxBehavior on a dynamically created component?

Thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ValueChangeListener in JSF
 
Similar Threads
How to get Values out of dynamic created panel
Dynamic HtmlSelectOneMenu : How to set the selected value in dropdown?
populate selectOneMenu with list containing various type of object
Help with h:selectOneMenu
Listener not invoked with a built HtmlSelectOneMenu component