Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ajax4jsf: how to get selected value(s) from component with f:selectItems

 
Vlad Kolosnicin
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there !
I have a form with several components and need to get selected values from h:selectManyCheckbox to dynamically rerender other components. I've tried something like this:



but how can I send the selected item value to backing bean in ajax request ? Could anyone help ?

I am using myfaces 1.2 and a4j.
 
Venkat Sadasivam
Ranch Hand
Posts: 139
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try using valueChangeListener of selectMenyCheckbox component.
 
Vlad Kolosnicin
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks,
i've already found solution (highlighted):

inside the a4j:support tag:
<a4j:actionparam value="this.value"
assignTo="#{surveyBean.ajaxVoteOption}"
name="foo" noEscape="true"/>
[ August 14, 2008: Message edited by: Vlad Kolosnicin ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic