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 in its
cause. I have an editor component using CKEditor. The component
derives from Panel. In its onRender() method it has the
following code:

|    @Override
|    public void onRender() {
|        super.onRender();
|        final Response response = getResponse();
|        final String markupId = textField.getMarkupId();
|        JavaScriptUtils.writeJavaScript( response,
|            "if (CKEDITOR.instances['" + markupId + "']) 
CKEDITOR.remove(CKEDITOR.instances['" + markupId + "']);" // 
|            "var editor_" + markupId + " = CKEDITOR.replace('" + markupId + 
"');" //
|        );
|    }

This renders a little JS code block under the Wicket TextField
instance that holds the text for CKEditor.

The code works well if the editor component has been in the
page from the beginning. However if I make the component visible
via Ajax (e.g. after clicking an AjaxLink), the JS code is not
rendered at all.

I am still in the process of migrating my project from Wicket
1.4.x to 6.6.0. The above code worked flawlessly with 1.4.x.

Am I making a mistake, or is this a problem in Wicket?

Cheers,

M'bert

-- 
----------- / http://herbert.the-little-red-haired-girl.org / -------------
=+= 
Nachts wache ich schwei�gebadet auf, weil OE-begeisterte Newbies mit Bill 
Gates hinterm Newsserver Schwarze Messen feiern, und auch mein Psychologe 
ist schon total ratlos. Ich habe einfach fertig.  -- anonymer Troll in dsnu

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to