On Thu, Aug 16, 2012 at 6:26 PM, Jeremy Thomerson
<[email protected]> wrote:
> I haven't had time to dig into this, but has anyone else seen where
> duplicate JS detection is broken in 1.5.x?  For instance, add this twice in
> your page:
>
>       add(new AbstractDefaultAjaxBehavior() {
>          @Override
>          protected void respond(AjaxRequestTarget target) {
>          }
>
>          @Override
>          public void renderHead(Component component, IHeaderResponse
> response) {
>             super.renderHead(component, response);
>             response.renderJavaScript("function foo() { wicketAjaxGet('" +
> getCallbackUrl() + "'); }", "foo-func");
>          }
>       });
>
> I end up with two JS blocks in the output, both with the ID foo-func.
>  Since I provided an ID that was the same for both behaviors, Wicket should
> have only rendered one of those, right?

Right.
This is a bug if it really happens.

>
> I hope to have time to debug next week if others confirm they've seen this
> and I'm not missing something simple due to sleep deprivation :)
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*



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

Reply via email to