You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Anders Schürmann <an...@stud.cs.uit.no> on 2008/06/05 12:50:39 UTC
Can tiles refer to actions?
Hi! I'm using Tiles2 in hope of providing better structure to my Struts2 app. I got Tiles referring to JSPs to work ok, but I get a FileNotFound exception when referring to an struts-action. Is it not possible to have a tile refering to an action? e.g.
<definition name="overview" template="/MainLayout.jsp">
<put-attribute name="pageTitle" value="Welcome" />
<put-attribute name="header" value="/Head.jsp" />
<put-attribute name="mainNav" value="activities.action" />
<put-attribute name="footer" value="/Footer.jsp" />
</definition>
The tiled page I'm trying to crate should contain a dynamically generated menu in addition to some dynamic content on another tile. Is there a better way to achieve this?
Cheers, Anders
Re: Can tiles refer to actions?
Posted by Antonio Petrelli <an...@gmail.com>.
2008/6/5 Anders Schürmann <an...@stud.cs.uit.no>:
> <put-attribute name="mainNav" value="activities.action" />
You have to add the "/" before the name of the action.
For instructions on how to use "included" Struts actions see:
https://issues.apache.org/struts/browse/TILES-232
> The tiled page I'm trying to crate should contain a dynamically generated menu in addition to some dynamic content on another tile. Is there a better way to achieve this?
Yes, ViewPreparer:
http://tiles.apache.org/tutorial/advanced/preparer.html
Antonio