there is a change in wicket-ajax.js which should run those changes. i
tried them in a quickstart and it worked...

-igor

On Sat, Nov 5, 2011 at 4:29 PM, David Berkman <david.berk...@glu.com> wrote:
> OK. I pulled the latest Snapshot, which is also broken in its own way 
> (prepended scripts are included as <evaluate-priority> but still don't get 
> run). S, when is 1.5.3 due out, and is there a workaround, maybe via a 
> Listener, that would substitute for now?
>
> David
>
> -----Original Message-----
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
> Sent: Saturday, November 05, 2011 12:46 PM
> To: users@wicket.apache.org
> Subject: Re: AjaxRequestTarget does not allow prepending javascript
>
> fixed. see wicket-4200
>
> -igor
>
> On Fri, Nov 4, 2011 at 10:59 PM, David Berkman <david.berk...@glu.com> wrote:
>> Not sure why, but, in 1.5.2 (at least), the call order is such that
>> prependJavascript is not called on AjaxRequestTarget until after
>> constructResponseBody() has passed...
>>
>>
>>
>>                                Iterator<CharSequence> it =
>> prependJavaScripts.iterator();
>>
>>                                while (it.hasNext())
>>
>>                                {
>>
>>                                                CharSequence js =
>> it.next();
>>
>>
>> respondInvocation(bodyResponse, js);
>>
>>                                }
>>
>>
>>
>> ...assuring that no prepended scripts are attached to the ajax return.
>> At least from onBeforeRender().
>>
>>
>>
>> I can freely add any appended script I want, but no prepended ones.
>> This strikes me as not good. Very bad.
>>
>>
>>
>> My code bits...
>>
>>
>>
>>  @Override
>>
>>  protected void onBeforeRender () {
>>
>>
>>
>>    if ((activeRequestHandler =
>> getRequestCycle().getActiveRequestHandler()) instanceof
>> AjaxRequestTarget) {
>>
>>      ((AjaxRequestTarget)activeRequestHandler). prependJavaScript
>> ("alert('never called')");
>>
>>      ((AjaxRequestTarget)activeRequestHandler). appendJavaScript
>> ("alert('always called')");
>>
>>    }
>>
>>  }
>>
>>
>>
>> David
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to