You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Marieke Vandamme <ma...@tvh.be> on 2009/07/22 11:17:28 UTC

Check if ajax request in HeaderContributor

Hello,

How do I test if the request is an ajax request in the HeaderContributor?
Because I don't want to call renderJavascriptReference and 
renderCSSReference when processing ajax request.

Many thanks in advance! Marieke.
**** DISCLAIMER ****
<A HREF="http://www.tvh.be/newen/pages/emaildisclaimer.html">
http://www.tvh.be/newen/pages/emaildisclaimer.html </A>

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."

Re: Check if ajax request in HeaderContributor

Posted by Peter Ertl <pe...@gmx.org>.
check for

     AjaxRequestTarget.get() != null


Am 22.07.2009 um 11:21 schrieb Marieke Vandamme:

>
> I have specific components that need specific javascript or css  
> (jquery,
> scriptaculous,...).
> For those components I put the includes in headercontributor for those
> components.
> And when these are added to a page again, the js and css is loaded  
> again
> too. That I want to avoid.
> Thanks !
>
>
> Linda van der Pal wrote:
>>
>> So you are rendering the entire page again? Because usually you only
>> target certain areas of the page, so the headers don't come into the
>> picture.
>>
>> Linda
>>
>> Marieke Vandamme wrote:
>>> Hello,
>>>
>>> How do I test if the request is an ajax request in the  
>>> HeaderContributor?
>>> Because I don't want to call renderJavascriptReference and
>>> renderCSSReference when processing ajax request.
>>>
>>> Many thanks in advance! Marieke.
>>> **** DISCLAIMER ****
>>> http://www.tvh.be/newen/pages/emaildisclaimer.html
>>> http://www.tvh.be/newen/pages/emaildisclaimer.html
>>>
>>> "This message is delivered to all addressees subject to the  
>>> conditions
>>> set forth in the attached disclaimer, which is an integral part of  
>>> this
>>> message."
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 8.5.392 / Virus Database: 270.13.22/2253 - Release Date:
>>> 07/21/09 18:02:00
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Check-if-ajax-request-in-HeaderContributor-tp24602688p24602776.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org


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


Re: Check if ajax request in HeaderContributor

Posted by Marieke Vandamme <ma...@tvh.be>.
I have specific components that need specific javascript or css (jquery,
scriptaculous,...).
For those components I put the includes in headercontributor for those
components. 
And when these are added to a page again, the js and css is loaded again
too. That I want to avoid. 
Thanks !


Linda van der Pal wrote:
> 
> So you are rendering the entire page again? Because usually you only 
> target certain areas of the page, so the headers don't come into the 
> picture.
> 
> Linda
> 
> Marieke Vandamme wrote:
>> Hello,
>>
>> How do I test if the request is an ajax request in the HeaderContributor?
>> Because I don't want to call renderJavascriptReference and 
>> renderCSSReference when processing ajax request.
>>
>> Many thanks in advance! Marieke.
>> **** DISCLAIMER ****
>>  http://www.tvh.be/newen/pages/emaildisclaimer.html 
>> http://www.tvh.be/newen/pages/emaildisclaimer.html  
>>
>> "This message is delivered to all addressees subject to the conditions
>> set forth in the attached disclaimer, which is an integral part of this
>> message."
>>
>>   
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com 
>> Version: 8.5.392 / Virus Database: 270.13.22/2253 - Release Date:
>> 07/21/09 18:02:00
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Check-if-ajax-request-in-HeaderContributor-tp24602688p24602776.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: Check if ajax request in HeaderContributor

Posted by Linda van der Pal <lv...@heritageagenturen.nl>.
So you are rendering the entire page again? Because usually you only 
target certain areas of the page, so the headers don't come into the 
picture.

Linda

Marieke Vandamme wrote:
> Hello,
>
> How do I test if the request is an ajax request in the HeaderContributor?
> Because I don't want to call renderJavascriptReference and 
> renderCSSReference when processing ajax request.
>
> Many thanks in advance! Marieke.
> **** DISCLAIMER ****
> <A HREF="http://www.tvh.be/newen/pages/emaildisclaimer.html">
> http://www.tvh.be/newen/pages/emaildisclaimer.html </A>
>
> "This message is delivered to all addressees subject to the conditions
> set forth in the attached disclaimer, which is an integral part of this
> message."
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.392 / Virus Database: 270.13.22/2253 - Release Date: 07/21/09 18:02:00
>
>   


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