I am using a ModalWindow with a page containing a feedback panel, a form and
several AjaxButtons (that close the ModalWindow) on submission or cancel.

There are two required text fields. When I submit the form with empty fields
(fails validation), I get a warning in the logs: 

   Component-targetted feedback message was left unrendered. This could be
because you are ...

The feedback panel wasn't being updated so I thought maybe I needed to add
it to the target. So per 
http://apache-wicket.1842946.n4.nabble.com/Does-FeedbackPanel-have-to-be-added-to-Page-td1881721.html
this post , I use the AjaxFormComponentUpdatingBehavior. That works well --
but only for one field at a time. Unfortunately, I've got two fields ... and
I don't really want to trigger off of each onblur event. I want to wait
until the submission occurs.

But if validation fails, where do I hook into the flow to add the
feedbackpanel to the target so that my messages show up? I believe that, if
validation fails, my AjaxButtons event handlers are not reached and so the
feedback panel is never added to the target - and consequently, not updated
with the error strings.

What is the normal way to do this? To validate fields in a form and
dynamically update a feedback panel. Does the form have some type of Ajax
event handler with a target in the signature?

And on a side note, is it true that, if I want to close the ModalWindow on a
successful submission - I must use AjaxButtons since
modalWindow.close(..target..) requires an Ajax target. I'd like to close the
window from the Form's handler - but not sure how to do that since the
normal form handlers don't present a target to me. Feels like I'm working
around something but not quite getting it.

Thanks in advance.

-Luther

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Basic-validation-question-tp2719449p2719449.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to