I have had several pages that will not initially load the wicket-ajax
functionality.  The page will load but the throttler is missing or it
will complain that submitFormById is undefined.  Refreshing the page
loads the ajax scripts and everything works fine.  I did alittle
snooping and found that on the first load wicket doesn't add the
wicket-ajax.js to the markup.  That's why some functions are undefined.
I setoutputmarkupid(true) on all the related things as far I can tell.
Does the order of setting markup Id and adding things to the page
matter?  ie.

...

form.setoutputmarkupid(true);

add(form);

...

versus

...

add(form);

form.setoutputmarkupid(true);

...

 

As a hack I added the script include myself...

 

<script type="text/javascript"
src="/quickstart/app/resources/wicket.ajax.AbstractDefaultAjaxBehavior/w
icket-ajax.js"></script>

 

and then it worked on page load.  What step am I skipping that keeps
wicket from doing this for me initially?

 

Thanks In Advance.

 

John Carlson

Reply via email to