Thanks, that's a good option :) I went with rearranging the layout and using two forms, but I think a getDefaultFormValidation() method would be a nice addition to the framework :)

-- Edvin

Erik van Oosten skrev:
Another option is to attach onchange handlers to all components (with an
ajax behavior).

You can optionally do validation in the handler and contineously show
validation errors as the user leaves an input field.

Regards,
    Erik.


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

--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


---------------------------------------------------------------------
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