When the validation fails the onSubmit method is not called at all. There's an onError method that is called in this case.
-Matej Shawn Tumey wrote: > When validation should fail and the feedback panel should show up. > > *INFO: > *Initiating Ajax POST request on > /inl/secure/app/page?wicket:interface=:0:panel:reqForm:submit:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&wicket:ignoreIfNotActive=true&random= > > 0.393144868947922 > *INFO: *Invoking pre-call handler(s)... > *INFO: *Received ajax response (69 characters) > *INFO: * > <?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response> > *INFO: *Response parsed. Now invoking steps... > * INFO: *Response processed successfully. > *INFO: *Invoking post-call handler(s)... > > When the modal windows is shown because validation passes. > > *INFO: > *Initiating Ajax POST request on > /inl/secure/app/page?wicket:interface=:0:panel:reqForm:submit:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&wicket:ignoreIfNotActive=true&random= > > 0.9417643576134753 > *INFO: *Invoking pre-call handler(s)... > *INFO: *Received ajax response (1254 characters) > *INFO: * > <?xml version="1.0" encoding="UTF-8"?><ajax-response><component > id="panel_reqForm_classification" ><![CDATA[<div wicket:id="classification" > style="display:none" id="panel_reqForm_classification"><wicket:panel> > > <div wicket:id="content" id="panel_reqForm_classification_content"> > </div> > </wicket:panel></div>]]></component><component id="feedback" > ><![CDATA[]]></component><evaluate><![CDATA[var settings = new Object(); > settings.minWidth=200 ; > settings.minHeight=200; > settings.className="w_blue"; > settings.width="600"; > settings.height="400"; > settings.resizable=true; > settings.src="/inl/secure/app/page?wicket:interface=classification:0::"; > settings.iframeName="classification"; > settings.cookieId="modal-window-11554571"; > settings.mask="semi-transparent"; > settings.onCloseButton = function() { var > wcall=wicketAjaxGet('/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListener&wicket:behaviorId=0', > function() { }, function() { });return !wcall;}; > > settings.onClose = function() { var > wcall=wicketAjaxGet('/inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListener&wicket:behaviorId=1', > function() { }, function() { }); }; > Wicket.Window.create(settings).show(); > ]]></evaluate></ajax-response> > *INFO: *Response parsed. Now invoking steps... > *INFO: *Response processed successfully. > *INFO: *Invoking post-call handler(s)... > *INFO: *Calling posponed function... > > *INFO: > *Initiating Ajax GET request on > /inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListener&wicket:behaviorId=0&random=0.08781822351433555 > *INFO: *Invoking pre-call handler(s)... > *INFO: *Received ajax response (130 characters) > *INFO: * > <?xml version="1.0" > encoding="UTF-8"?><ajax-response><evaluate><![CDATA[Wicket.Window.get().close();]]></evaluate></ajax-response> > > > *INFO: *Response parsed. Now invoking steps... > *INFO: *Chanel busy - postponing... > *INFO: *Response processed successfully. > *INFO: *Invoking post-call handler(s)... > *INFO: *Calling posponed function... > *INFO: * > *INFO: > *Initiating Ajax GET request on > /inl/secure/app/page?wicket:interface=:0:panel:reqForm:classification::IBehaviorListener&wicket:behaviorId=1&random= > > 0.9822901756880449 > *INFO: *Invoking pre-call handler(s)... > *INFO: *Received ajax response (69 characters) > *INFO: * > <?xml version="1.0" encoding="UTF-8"?><ajax-response></ajax-response> > *INFO: *Response parsed. Now invoking steps... > * INFO: *Response processed successfully. > *INFO: *Invoking post-call handler(s)... > > Note - I'll be leaving work soon and may not be able to provide useful > responses until next week. > > Thank you for your assistance > > On 1/26/07, *Matej Knopp* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > One more thing. Can you please post also the content of javascript > console? And can is the onSubmit handler of AjaxSubmitButton really > called? > > -Matej > > Matej Knopp wrote: > > Nothing apparent. Can you post the markup too? > > > > Shawn Tumey wrote: > >> Thank you Matej, I was aware of this, but I still don't see what > I am > >> doing wrong. I believe I have included the relevant code. > >> > >> With the below code the form does not display the feedback panel > for > >> components that failed validation like it should. If all the fields > >> validate, the modalWindow is shown. > >> > >> What am I missing? > >> > >> The Wicket Ajax Debug tool shows the ajax request completing > normally > >> > >> <input type="submit" wicket:id="submit"/> > >> > >> > >> final ModalWindow classification = new > >> ModalWindow("classification"); > >> classification.setPageMapName("classification"); > >> classification.setPageCreator(new ModalWindow.PageCreator() > >> { > >> public Page createPage() > >> { > >> return new ClassificationPage(reqModel); > >> } > >> }); > >> classification.setWindowClosedCallback(new > >> ModalWindow.WindowClosedCallback() > >> { > >> public void onClose(AjaxRequestTarget target) > >> { > >> > >> } > >> }); > >> classification.setCloseButtonCallback(new > >> ModalWindow.CloseButtonCallback() > >> { > >> public boolean > onCloseButtonClicked(AjaxRequestTarget target) > >> { > >> return true; > >> } > >> }); > >> > >> final Form form = new Form("reqForm",formModel); > >> form.setOutputMarkupId (true); > >> form.add(classification); > >> > >> form.add(new AjaxSubmitButton("submit", form) { > >> protected void onSubmit(AjaxRequestTarget target, > Form form) { > >> classification.show(target); > >> } > >> }); > >> > >> --- > >> > >> On 1/26/07, *Matej Knopp* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>>> wrote: > >> > >> Hi > >> > >> I'm not sure what exactly are you trying to accomplish. But > in any case, > >> remember that the modal window is an ajax component, thus to > display it > >> you need an ajax request. > >> > >> So if you want to submit the form and open the ModalWindow > afterwards, > >> you need to use AjaxSubmitButton or AjaxSubmitLink. > >> > >> -Matej > >> > >> > >> > >> > ------------------------------------------------------------------------ > > >> > >> > ------------------------------------------------------------------------- > >> Take Surveys. Earn Cash. Influence the Future of IT > >> Join SourceForge.net's Techsay panel and you'll get the chance > to share your > >> opinions on IT & business topics through brief surveys - and > earn cash > >> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > >> > >> > >> > ------------------------------------------------------------------------ > >> > >> _______________________________________________ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > <https://lists.sourceforge.net/lists/listinfo/wicket-user> > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > opinions on IT & business topics through brief surveys - and earn > cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net 's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > -- > Shawn Tumey > Cofounder > MT Web Productions LLC > www.mtwebproduction.com <http://www.mtwebproduction.com> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > ------------------------------------------------------------------------ > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user