On Jan 5, 2010, at 12:00 PM, Michal wrote:

> On Tue, Jan 5, 2010 at 10:28 AM, Felix Gilcher
> <[email protected]> wrote:
>> Request attributes are global while template variables (which are in fact 
>> ExecutionContainer attributes) are local to that container execution. A 
>> request attribute set in in slot will be available to all slots that execute 
>> later and to all templates that are rendered later while a template variable 
>> set in a slot will only be available in that template. In general, use 
>> template variables since that protects you from naming collisions.
> 
> Ah: thanks for this clarification.
> 
> 
>> It is possible to use request attributes to handle javascript/css 
>> inclusions, however, there are a few things to look out in combination with 
>> caching. The general recommendation is to use response attributes from 1.1 
>> on.
> 
> Can I ask what the things to look out for are?

If you set the attributes in the view of a slot, they are not cached by 
default. Thus, if the view result is cached and you forget to add extra caching 
rules, missing js/css files may occur. There might be other issues when the 
attributes are restored from the cache like overwriting previously set values 
etc. You may need to assign a namespace to each slot etc... It's more or less a 
big mess. Use response attributes since they are designed to solve that exact 
problem.

> 
> Michal.
> 
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
> 

--
Felix Gilcher

Bitextender GmbH
Paul-Heyse-Str. 6
D-80336 München

T: +49 89 57 08 15 16
F: +49 89 57 08 15 17
M: +49 172 840 88 28

[email protected]
http://www.bitextender.com/

Amtsgericht München, HRB 174280
Geschäftsführer: David Zülke, Florian Clever


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to