Why not make it 2 separated forms?

Beause of the layout that would mean nesting two forms, and I'm not sure how that works out in different browsers. I might have to go that way, but wouldn't it be nice/possible to skip validation but still bind the model object changes with getDefaultFormValidation() == false or something like that?

-- Edvin




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]





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

Reply via email to