2008/10/28 Stephan Schröder <[EMAIL PROTECTED]>:
> <definition name="package_*.body_*" extends"{1}.layout">
Wildcards are not supported in the "extends" attribute.
> <definition name="*" extends"${package}.layout">
EL is not supported in the "extends" attribute.
> But is there an expression to compute the current package
> with the EL?
No.
> And how do i enable EL when i don't user the
> http://tiles.apache.org/framework/tutorial/advanced/el-support.html
> TilesServlet but the TilesListener (because i want
> FreeMarker-integreation)?
Simply replace the Servlet init parameters with context parameters.
> Do i have access to the value stack when using the EL?
Probably not.
> 3)using a ViewPreparer to create the right menu:
> in this version i wouldn't have my three base layouts but only one with a
> viewpreparer that initialises the menu structure
> <definition name="*" template="/layouts/baseLayout.ftl"
> preparer="MenuViewPreparer">
> <put-attribute name="menu" value="/tiles/dynamic_menu.ftl" />
> <put-attribute name="body" value="/tiles/{1}.ftl" />
> </definition>
>
> So the MenuViewPrepare would by responsible to figure out which package is
> used. That should work like this:
> public void execute(TilesRequestContext tilesContext, AttributeContext
> attributeContext) {
> switch( ServletActionContext.getActionMapping.getNamespace() ) {
> case: ...
> {
This could work.
> Which approach is preferable? Is there an even better approach?
The third, since it is the only that might work.
> I don't understand the "if you need"-part of this statement
> http://tiles.apache.org/framework/getting_started.html "if you need JSP
> support, copy the tiles-jsp-VERSION.jar in the WEB-INF/lib directory of your
> web application" .
> Don't you always use the JSP-Tags at least in your baseLayout-File?
> I guess i also have to include this when using FreeMarker because i call the
> JSP-Tags from within FreeMarker too!?
Well you are right :-) In fact that sentence is there for a future
support of Velocity in Tiles.
Antonio