[EMAIL PROTECTED] wrote:
I am using Struts Tiles to layout my site. I have a vboxmenu design which
contains 4 menu levels:
<definition name="doc.menu.main" path="/common/jsp/layout/vboxLayout.jsp" >
<putList name="list" >
<add value="common.menu.home" />
<add value="common.menu.authenticated"/>
<add value="common.menu.admin" />
<add value="common.menu.logout" />
</putList>
</definition>
I am wanting to control when the Authenticated menu and the Admin Menu are
displayed. For example, only display the admin menu if the user is in the
Admin Role. I know that the taglib tld has a role attribute, but the dtd
for tiles-def does not. Has anyone created anything simular with tiles?
As far as I'm aware, there's no way to do that at the tiles level. You
could either wrap the <add/> tags in your JSP with <logic:present role=...
or similar, or make the test in the JSP for the individual tiles, which may
be cleaner.
L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/~laurie/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]