Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ValuechangedEvent in JSF

 
Maks Besida
Greenhorn
Posts: 13
Chrome Java Oracle
  • Mark post as helpful
  • send pies
  • 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?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic