org.apache.wicket.markup.html.IHeaderContributor -igor
On Thu, Apr 22, 2010 at 8:35 PM, Apple Grew <appleg...@gmail.com> wrote: > @Igor > > I have a very tight budget so the resources are pretty limited, so I need to > save the bandwidth wherever possible. BTW I didn't find any class - > iheaderresponsecontributor. > > Regards, > Apple Grew > my blog @ http://blog.applegrew.com/ > > > On Fri, Apr 23, 2010 at 8:37 AM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote: > >> amd this bloating has caused a noticeable slowdown in your site's >> response times? how much latency is it adding to the response? >> >> that said, you can always output it using iheaderresponsecontributor >> and add an check if you are inside ajax or not using request.isajax() >> >> -igor >> >> On Thu, Apr 22, 2010 at 6:29 PM, Apple Grew <appleg...@gmail.com> wrote: >> > Hi Igor, >> > >> > It is not that duplicates items are getting rendered. What I want is that >> > the Js should be rendered ONLY when rendering in non-Ajax mode. In Ajax >> mode >> > the Js code should be stripped out. As these Js codes are not executed >> when >> > in Ajax response so it doesn't make sense to render them there. This >> > unnecessarily bloats the response. >> > >> > Regards, >> > Apple Grew >> > my blog @ http://blog.applegrew.com/ >> > >> > >> > On Thu, Apr 22, 2010 at 10:50 PM, Igor Vaynberg <igor.vaynb...@gmail.com >> >wrote: >> > >> >> wicket will filter duplicate contributions for you and even though >> >> they are rendered they are not executed. if you are writing out >> >> javascript directly you can set a string id which uniquely identifies >> >> the contribution and wicket will also filter by that. >> >> >> >> -igor >> >> >> >> On Wed, Apr 21, 2010 at 8:40 PM, Apple Grew <appleg...@gmail.com> >> wrote: >> >> > I have a component which contributes Js headers. This component is >> also >> >> > rendered by AjaxRequestTarget. The problem is that when rendering ajax >> >> > response the Js codes too are getting rendered. These Js codes were >> >> already >> >> > contributed when this component first rendered (in non-Ajax mode). >> >> > >> >> > To fix this what I initially did was that in the onBeforeRender method >> of >> >> > the component I was checking if the response NOT isAjax then add the >> >> header >> >> > contributors, else, remove them. This was working fine, but problem is >> if >> >> I >> >> > want to implement this is other components I would have to copy n >> paste >> >> the >> >> > codes. So I decided to implement a behavior. I added all the header >> >> > contributors to that behavior and it was supposed to do the job of >> adding >> >> n >> >> > removing the header contributors. But we can't modify hierarchy from >> >> > beforeRender of behavior so I am now stuck. Furthermore, this approach >> is >> >> > not capable of removing JS contributed by super calsses of the >> >> componenet. >> >> > >> >> > Please suggest. >> >> > >> >> > Thanks and regards, >> >> > Apple Grew >> >> > my blog @ http://blog.applegrew.com/ >> >> > >> >> >> >> --------------------------------------------------------------------- >> >> 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