http://cwiki.apache.org/WICKET/conditional-validation.html see
alternative approach 

-----Original Message-----
From: Kaspar Fischer [mailto:[email protected]] 
Sent: Monday, January 19, 2009 5:19 AM
To: [email protected]
Subject: Re: Turn off form validation

On 19.12.2008, at 13:45, Martijn Dashorst wrote:

> Adding a new record to a list should not trigger model updates. It 
> should just add the thing and repaint the container with the added 
> item. If you use a (ajax)submit(link|button) you can
> setDefaultFormProcessing(false) on the button/link and wicket will not

> validate nor update model values, but keep the input of the user so it

> can be validated at actual form submission.

Where can I get the input if I do setDefaultFormProcessing(false) when,
as you say, model values or not updated?

> Validation is there to protect your domain objects from invalid data.
> Now you want to bypass this?

I agree. I just do not know yet how to realize this in Wicket. Let me
try to explain: I have a custom form component that allows the user to
add and remove tags. In order to add a tag, the user enters the tag's
name and clicks "Add". Obviously, when she clicks "Add", I do NOT want
the WHOLE form to be validated, as "Add" is not the form's "Submit", but
just an intermediate step in the process of filling out the form.  
Still, I want to get the new tag name she entered -- and for this, I
have to do setDefaultFormProcessing(true). Correct?

Kaspar

P.S. Noon, I think nested forms do not validate so I can't use them.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to