voyent
How to bypass validators?  XML
Forum Index -> Portals & Portlets
Author Message
maxi_ng

Joined: 11/Jan/2008 00:00:00
Messages: 92
Offline


I have a portlet that its fields have validator.
When I click submit, it works fine.
but I have a [cancel] button there to go back to the previous page (by changing panel stack id).
when I click it, all validators do there validation and [cancel] button action cannot go back.
How do I make the [cancel] button bypass those validators and also preserve the [submit] button validations?
Timbo

Joined: 20/Jul/2007 00:00:00
Messages: 33
Offline


Hi!

You have to put immediate="true" on your cancel button to bypass validation and immediate="false" (by default) on your submit button.

Timbo
maxi_ng

Joined: 11/Jan/2008 00:00:00
Messages: 92
Offline


it works!! you are a life saver Timbo!
I have read the TLD and have no idea what immediate does.
I understand now, thank you!
phil.gunbin


Joined: 30/Jan/2008 00:00:00
Messages: 29
Offline


Be aware that when you click a button with immediate=true, your submitted values in components are not cleared (and the desired behaviour very often is to clear them instead). Here are some workarounds. http://wiki.apache.org/myfaces/ClearInputComponents
[Email]
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team