I have some Behaviors that extend AbstractDefaultAjaxBehavior. In the 
renderHead method of the Behaviors I use
        public void renderHead(IHeaderResponse response) {
                
response.renderJavascriptReference(WicketEventReference.INSTANCE);
        }

But that's not the problem. When I look into Ajax debug output I can see that 
the resource references are rendered correct. AND: in IE this works. This must 
be some sort of jQuery internal problem or some security problem in FF.

Stefan

-----Ursprüngliche Nachricht-----
Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com] 
Gesendet: Freitag, 9. Oktober 2009 15:36
An: users@wicket.apache.org
Betreff: Re: javscript header contribution in lazy load panels

How do you add the JavaScript? I have pages where components are added via
AJAX, which include JavaScript and CSS via
add(JavascriptPackageResource.getHeaderContribution(ResourceReference...));

and this works fine in any browser I have tested (IE, FF, Chrome, etc).

Best,

Ernesto


On Fri, Oct 9, 2009 at 2:25 PM, Stefan Lindner <lind...@visionet.de> wrote:

> Dear wicket users,
>
> I have a lazy loading panel. The components inside the generated panel
> (i.e. the panel that is generated inside the getLazyLoadComponent method)
> have some header contributing ajax behaviors (jQuery etc.).
>
> The lazyly loaded components render javascript resources to the head
> section oft he page.
>
> When the page is created, the header does not contain any <script
> src="..."> tags. That's clear because wicket does not know which resources
> are needed by the lazyly loaded panel. The <script src="..."> tags are part
> of the ajax answer.
>
> IN IE this works well but in other Browsers (Firefox, Chrome, Safari) the
> javascript functionality does not work.
>
> We have to put the <script src="..."> manually into the parent page.
>
> Is this a known behavior? Does anybody know a magic trick to get the
> javascript librarys working that are part oft he ajax response?
>

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

Reply via email to