Hi James,
is it possible for you to use the <s:component...... > tag??
I think that is exactly what you are searching for.
As an example:
<s:component template="menuEntry.jsp" theme="foo">
<s:param name="menuName">downtime</s:param>
<s:param name="menuLink">http://www.mylink.org</s:param>
</s:component>
To make this work, you have to create a folder "/template/foo" and place the
menuEntry.jsp in it.
This file could look like
<a href="%{parameters.menuLink}" ><s:text name=" %{parameters.menuName}" /></a>
Just for example....
Hope that helps!
Regards
Jan
-----Ursprüngliche Nachricht-----
Von: James Carr [mailto:[email protected]]
Gesendet: Mittwoch, 17. Dezember 2008 17:35
An: [email protected]
Betreff: How can I "parameterize" include files?
Hi all,
I have a common navigation bar I have at the top of a bunch of pages,
but I'd like for certain buttons to not be present on some pages. I
tried using <s:param> and <s:if> , but to no avail.
For example:
<s:include value="includes/something.jsp" >
<s:param name="foo" value="true"/>
</s:include>
and in the included file have this:
<s:if test="foo">
<!-- content -->
</s:if>
However this doesn't seem to work. For now I've resorted to use the
jakarta taglibs for conditional statements, but I'd rather use the
struts2 tags.
Thanks,
James
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]