Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ValueChangeListener in JSF

Ralph Hoch
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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).

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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic