Re: Strip header contributors from Ajax response.

2010-05-06 Thread Apple Grew
Hi All, Thanks for all the responses. I got this solved by making my behavior extend AbstractHeaderContributor. In its getHeaderContributors() I return the list of headers only if response is not ajax. In case of ajax I simply return null. Regards, Apple Grew my blog @ http://blog.applegrew.com/

Re: Strip header contributors from Ajax response.

2010-04-29 Thread DV
Another more complicated way seems to be using SharedResources and DynamicWebResources, an example of this, you can find it on "UploadStatusResource" class of wicket.extensions.ajax.markup.html.form.upload package -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Strip

Re: Strip header contributors from Ajax response.

2010-04-29 Thread DV
Good Afternoon, I've working on this theme, and I found a solution to avoid the strip of our resources. On the Ajax Behavior, we put this lines: ResourceStreamRequestTarget targetRes = new ResourceStreamRequestTarget( new PackageResourceStream(MyScopeClass.class,"resources/myJS.js")); targetRes

Re: Strip header contributors from Ajax response.

2010-04-23 Thread Pointbreak
if (!AjaxRequestTarget.get()) renderMyJavascript(); On Thu, 22 Apr 2010 09:10 +0530, "Apple Grew" 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 r

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Apple Grew
x, yeah /shrug with the caveat for hosting solutions. > >> > > >> > tim > >> > > >> > -Original Message- > >> > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > >> > Sent: Thursday, April 22, 2010 8:08 PM > >> >

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Igor Vaynberg
sting solutions. >> > >> > tim >> > >> > -Original Message- >> > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] >> > Sent: Thursday, April 22, 2010 8:08 PM >> > To: users@wicket.apache.org >> > Subject: Re:

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Apple Grew
ing solutions. > > > > tim > > > > -Original Message- > > From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > > Sent: Thursday, April 22, 2010 8:08 PM > > To: users@wicket.apache.org > > Subject: Re: Strip header contributors from Ajax respons

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Igor Vaynberg
org.apache.wicket.markup.html.IHeaderContributor -igor On Thu, Apr 22, 2010 at 8:35 PM, Apple Grew 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. >

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Igor Vaynberg
Igor Vaynberg [mailto:igor.vaynb...@gmail.com] > Sent: Thursday, April 22, 2010 8:08 PM > To: users@wicket.apache.org > Subject: Re: Strip header contributors from Ajax response. > > amd this bloating has caused a noticeable slowdown in your site's > response times? how much

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Apple Grew
@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 wrote: > am

RE: Strip header contributors from Ajax response.

2010-04-22 Thread Tim L Casey
. Inlined ajax, yeah /shrug with the caveat for hosting solutions. tim -Original Message- From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] Sent: Thursday, April 22, 2010 8:08 PM To: users@wicket.apache.org Subject: Re: Strip header contributors from Ajax response. amd this bloating has

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Igor Vaynberg
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 a

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Apple Grew
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

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Apple Grew
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

Re: Strip header contributors from Ajax response.

2010-04-22 Thread Igor Vaynberg
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, App