Hi, Peter in my post I also xposed the same issue in my app, what I managed to do was

1. put an attribute into the base.layout tile.
2. I used the <tiles:useAttribute> tag to define that attribute in request scope. 3. Then in the other jsp you can use the struts tags for whatever you like, in your case you could use the <logic:equal> tags to decide what fragment of markup you want you show.

I don't know if it's the cleanest way but that's wat i've have managed to do so far, if any one else wants to share a different approach please do.

If you have any questions on the above just reply.
Cheers.

Peter Neu wrote:

Hello,

I got this scenario where I have a basic layout (header, nav-bar, body,
info, footer).

What I need to do is insert dynamically a tiles compenent in a jsp document
a few levels lower than the main document.
The main document is siteLayout.jsp the body is entry.jsp. How can I insert
in entry.jsp. Dynamically tiles tags? I need to do something like this:
----entry.jsp------

Case 1 :  <tiles:insert attribute="fworkSeletion1"/>
Case 2 :  <tiles:insert attribute="fworkSeletion2"/>

-----tiles-config.xml

<definition name="base.definition" path="/WEB-INF/JSP/fwork/siteLayout.jsp">
                <put name="header" value="/WEB-INF/JSP/fwork/header.jsp" />
                <put name="navigation" value="/WEB-
INF/JSP/fwork/navigation.jsp"/>
                <put name="footer" value="/WEB-INF/JSP/fwork/footer.jsp" />
        </definition>

<definition name="page.entry" extends="base.definition">
    <put name="body" value="/WEB-INF/JSP/fwork/entry.jsp" />
     <put name="info" value="/WEB-INF/JSP/fwork/info.jsp" />
 <put name="fworkSelection1" path="/WEB-INF/JSP/fwork/fworkSeletion1.jsp"
/>
 <put name="fworkSelection2" path="/WEB-INF/JSP/fwork/fworkSeletion2.jsp"
/>
        </definition>


Cheers,
Peter



---------------------------------------------------------------------
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]

Reply via email to