Why not make it 2 separated forms?


Edvin Syse wrote:
> 
> Hi,
> 
> I have a form where some of the components have validators (Required,
> EmailValidator etc). The form uses CompoundPropertyModel for my 
> object. Upon entering some text in one input field and clicking a button,
> a ModalWindow opens and shows a searchresult based on the input.
> 
> The button is a AjaxSubmitLink. The problem is that this operation is
> performed BEFORE the rest of the form is filled out, so validation 
> fails (since lots of fields are missing input at this stage), and the
> ModalWindow doesn't open. If I turn off validation everything is good, 
> but I need the validation for when the form is complete and finally
> submitted :)
> 
> If I change to an AjaxLink, I can get the ModalWindow to open, but then
> the input data isn't propagated to the model, so I can't get hold of 
> it in the ModalWindow. I have also tried overriding
> getDefaultFormProcessing() and returning false, but then obviously the
> model isn't 
> updated either, so I'm stuck.
> 
> Maybe I'm going about this the wrong way.. Any suggestions? Should I use
> another form without validation just for this one textfield?
> 
> Sincerely,
> Edvin Syse
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Which-way-to-go--AjaxSubmitLink-or-AjaxLink--Neither-does-the-job-for-me-%3A%29-tp14506161p14507376.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to