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

Setters not being called when using ajax

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a selectOneMenu where a user can pick what type of Person they are; Patient or Student. Depending on what they select a certain option is displayed... Patients can be smokers or non-smokers and Students can select their SchoolType (Highschool, College, etc). Can someone explain to me why when I use ajax the setter methods on my backing bean aren't being called. Ajax is rendering the correct options related to each Person depending on the current value in the select box. When I click the commandButton though, the values aren't being sent to the beans setters.

Thanks,
Alan

 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not an expert on the JSF2 ajax tag, bug its equivalent for RichFaces has the option to post only the attached control value OR the entire form containing the control (including other control values). I seem to recall that the default using the JSF2 ajax tag may be only the attached control value. So check the attribute options on the ajax tag.
 
Volodymyr Lysenko
Ranch Hand
Posts: 511
1
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

Please read my explanation of ajax at http://www.coderanch.com/t/594176/JSF/java/dynamic-div-reset#2708812
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic