On 13-10-27 3:50 PM, Mick Semb Wever wrote:
ClamAV 0.96.5
Can you give me additional information on how the Contexts are working
and if my analysis is correct?
And yes you are correct.
basicTilesContainer.getAttributeContext(request)
should be returning a working AttributeContext for you.
It should not be null (or an empty deque) and should not be creating a
new one for you.
As AttributeContexts are pushed onto the stack, via
startContext(request), cascading attributes are copied over.
But you haven't configured any of your attributes to be cascading.
Can you try adding cascading="true" to your defaults list-attribute.
For example like
<put-list-attribute name="defaults" cascading="true">
<add-attribute value="{1}"/>
<add-attribute value="common"/>
</put-list-attribute>
I've tried with both cascade="true" and inherit="true", but neither seem to have any effect. What I have noticed is that the only time the "correct"
context is pushed onto the stack is in BasicTilesContainer.render() (line 235) when it is pushing the subContext onto the stack. Likely due to the
previous line: subcontext.inherit(definition), where definition seems to be the attributes as listed in the tiles.xml file.
Otherwise, I don't really see anywhere that the "inherit" or "cascade" settings make a difference. Do you know where in the code the cascade/inherit
settings are examined and where the necessary actions are supposed to take place? B/c the code which retrieves the context from the stack is fairly
simple - if the context is on the stack, use it, otherwise create a new empty one and push onto the stack
(BasicTilesContainer.getAttributeContext(request) - line 142).
Thanks,
Eric