wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Migration issue: JavsScriptUtils.writeJavaScript() in onRender() does not seem to work with Ajax?
Date Mon, 25 Feb 2013 14:36:45 GMT
On Mon, Feb 25, 2013 at 4:32 PM, Martin Dietze <di@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 component. For this event I have an
> AjaxCallListener like this:
>
> | AjaxCallListener myAjaxCallListener = new AjaxCallListener();
> | myAjaxCallListener.onBeforeSend( return "for ( instance in
> CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement();" );
>

except the leading "return" all looks OK to me.
Add some logging with console.log() and see what is available in the
context.


>
> This is necessary to copy the text the user has entered from the
> Javascript code back into the form component. On "save" I now
> get the following error:
>
> | Wicket.Ajax: An error occurred while executing Ajax
> request:ReferenceError: instance is not defined
>
> It looks to me like the script in OnDomReadyHeaderItem was
> executed allright, but the state inside the Javascript code
> has been lost in the meantime?
>
> Cheers,
>
> M'bert
>
> --
> ----------- / http://herbert.the-little-red-haired-girl.org /
> -------------
> =+=
> Arthur: "It's at times like this I wish I'd listened to my mother"
> Ford  : "Why, what did she say?"
> Arthur: "I don't know, I never listened"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message