• 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

ValuechangedEvent in JSF

 
Greenhorn
Posts: 13
Oracle Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have such a form in jsf 2.0 in which user can change locale:

When user click on radio button to change locale the form submits and validation logic performs and error messages are shown to user. But i don't want error messages to be shown to user while he or she simply change locale. When I delete required="true" from both input fields then user doesn't see the error messages. How can i avoid error messages to be shown to the user?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default, all controls on a form are submitted when the form is submitted, and that means that all controls must contain valid properties or the value events won't fire, the backing properties won't update and the action method won't be invoked.

In straight JSF2, you can probably do AJAX, and someday I'll even bother to learn how. In the RichFaces custom tagset, they have an AJAX support tag (a4j:support) that has an option named "ajaxSingle", and when it's set to "true", only the control that's firing that event is posted.
reply
    Bookmark Topic Watch Topic
  • New Topic