2015-11-27 9:36 GMT+01:00 Lukasz Lenart <[email protected]>:
> 2015-11-27 9:32 GMT+01:00 Lukasz Lenart <[email protected]>:
>>> As far I understand it requires FreemarkerServlet to be registered
>>> (Struts doesn't use it) and also FM Environment must have Tiles model
>>> registered already :(
>>
>> Problem solved! I had to register dedicated JSP servlet to support this :)
>
> Almost, Tiles tags are missing values - looks like the model has no
> Tiles definition in

The problem is with AttributeContext and ArrayStack. When evaluating
ftl file I see three AttributeContexts - empty,
with-attributes-from-tiles.xml, empty - and the last empty is used to
evaluate the ftl :\

In BasicTilesContainer method render() looks like this

protected void render(TilesRequestContext request, Definition definition) {
    AttributeContext originalContext = getAttributeContext(request);
    BasicAttributeContext subContext = new
BasicAttributeContext(originalContext);
    subContext.inherit(definition);

    pushContext(subContext, request);

    try {
        render(request, subContext);
    } finally {
        popContext(request);
    }
}

the first line will create an empty AttributeContext and will push to
the stack - why? Then the proper AttributeContext will be created and
pushed again (with values from tiles.xml). I cannot figure out where
the third ActionContext is created.


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

Reply via email to