• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setters not being called when using ajax

 
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

Please read my explanation of ajax at https://coderanch.com/t/594176/JSF/java/dynamic-div-reset#2708812
reply
    Bookmark Topic Watch Topic
  • New Topic