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

Reply via email to