Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
OK, I've changed the subject, as it seems like I'm running into a more general issue here. The original issue was JS code rendered into a flyout with search results in my application never made it into the markup the browser actually sees. Now I've identified another problem which seems identical

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Grigorov
Hi, Such kind of code should really be executed within #renderHead() with OnDomReadyHeaderItem. Don't let any JS try to use your HTML DOM elements before the DOM is available. On Mon, Feb 25, 2013 at 3:05 PM, Martin Dietze d...@fh-wedel.de wrote: OK, I've changed the subject, as it seems like

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: Such kind of code should really be executed within #renderHead() with OnDomReadyHeaderItem. Don't let any JS try to use your HTML DOM elements before the DOM is available. Thank you, in this case I get a Wicket Ajax error: | Wicket.Ajax:

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Dietze wrote: Thank you, in this case I get a Wicket Ajax error: | Wicket.Ajax: Wicket.Head.Contributor.processScript: [CKEDITOR.editor.replace] The element with id or name valueb54 was not found.: eval - if (CKEDITOR.instances['valueb54']) |

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Grigorov
Hi, The Ajax response processing looks like: - execute prependJavaScripts - replace components - execute ondomready scripts - execute appendJavascripts I.e. the component DOM element must be there. Show us your new code. On Mon, Feb 25, 2013 at 3:56 PM, Martin Dietze d...@fh-wedel.de wrote:

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: The Ajax response processing looks like: - execute prependJavaScripts - replace components - execute ondomready scripts - execute appendJavascripts I.e. the component DOM element must be there. Show us your new code. Thanks, it's here:

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Grigorov
On Mon, Feb 25, 2013 at 4:09 PM, Martin Dietze d...@fh-wedel.de wrote: On Mon, February 25, 2013, Martin Grigorov wrote: The Ajax response processing looks like: - execute prependJavaScripts - replace components - execute ondomready scripts - execute appendJavascripts I.e. the

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: replace with: response.render( OnDomReadyHeaderItem.forScript( script ) ); OK, did that. Now I am running into a different error when I press save on my editor component. For this event I have an AjaxCallListener like this: |

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Grigorov
On Mon, Feb 25, 2013 at 4:32 PM, Martin Dietze d...@fh-wedel.de wrote: On Mon, February 25, 2013, Martin Grigorov wrote: replace with: response.render( OnDomReadyHeaderItem.forScript( script ) ); OK, did that. Now I am running into a different error when I press save on my editor

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: | AjaxCallListener myAjaxCallListener = new AjaxCallListener(); | myAjaxCallListener.onBeforeSend( return for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); ); except the leading return all looks OK to

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Grigorov
On Mon, Feb 25, 2013 at 5:52 PM, Martin Dietze d...@fh-wedel.de wrote: On Mon, February 25, 2013, Martin Grigorov wrote: | AjaxCallListener myAjaxCallListener = new AjaxCallListener(); | myAjaxCallListener.onBeforeSend( return for ( instance in CKEDITOR.instances )

Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?

2013-02-25 Thread Martin Dietze
On Mon, February 25, 2013, Martin Grigorov wrote: Well, I have written a Wiki page and few blog articles about the changes in Wicket 6 but it seems you haven't read them before asking :-) I understand your point well, I myself have often spent lots of time writing documentation which people