Maybe you can post additional details... and then maybe someone can spot
what's happening.
Best,

Ernesto

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

> It is added and a test script with an alert command tells me that it is
> executed too. But things like jQuery don't work.
>
> When I drop the lazy loading and replace it with the lazy loaded panel
> everything works.
>
> When I redraw the wohle panel in an Ajax call, everything works too.
>
> It's just the fact
>        1. having the javascript librarys loaded in the pages header section
> one time on the first page rendering heals all
>        2. having the javascript librarys loaded in the lazy loading ajax
> dom replacement it works only in IE. Even if the scripts are executed.
>
> I know, this may be a jquery/otherlib problem but perhaps someone else ever
> had this effect and found a workaround.
>
> Stefan.
>
> -----Ursprüngliche Nachricht-----
> Von: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
> Gesendet: Freitag, 9. Oktober 2009 20:14
> An: users@wicket.apache.org
> Betreff: Re: javscript header contribution in lazy load panels
>
> Why not use firebug and see your <script> section is added the head of the
> page?
> Ernesto
>
> On Fri, Oct 9, 2009 at 4:51 PM, Stefan Lindner <lind...@visionet.de>
> wrote:
>
> > 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
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to