wood burning stoves
The moose likes JSF and the fly likes ValuechangedEvent in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "ValuechangedEvent in JSF" Watch "ValuechangedEvent in JSF" New topic

ValuechangedEvent in JSF

Maks Besida

Joined: May 26, 2011
Posts: 13

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

Joined: Jun 25, 2001
Posts: 16473

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.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link: http://aspose.com/file-tools
subject: ValuechangedEvent in JSF