Jim,
sounds like you haven't realised that tiles attributes are not given global scope. You have to explicitly "useAttribute" each time. That includes when you nest a child tile - you must "useAttribute" on it first, and then have it <put> again in-between the <insert>s for the child.


On 03/02/2004 10:15 PM Anderson, James H [IT] wrote:
There's something I'm not understanding :-( I've got the following tiles definitions.

    <definition name=".mainLayout" path="/tiles/layouts/mainLayout1.jsp">
      <put name="header"  value="/tiles/header.jsp"/>
      <put name="footer"  value="/tiles/footer.jsp"/>
      <put name="content" value="${content}"/>                                << 
variable for substitution
    </definition>

    <definition name=".portfolioLayout" path="/tiles/layouts/portfolioLayout.jsp">
      <put name ="marketdata" value=".marketdata"/>
      <put name ="userinput"  value=".userinput"/>
      <put name ="dataview"   value="/tiles/dataview.jsp"/>
    </definition>

    <definition name=".marketdata" path="/tiles/layouts/marketdataLayout.jsp">
      <put name ="quotes"              value="/tiles/quotes.jsp"/>
      <put name ="smithbarneyresearch" value="/tiles/research.jsp"/>
      <put name ="marketwatch"         value="/tiles/marketwatch.jsp"/>
    </definition>

    <definition name=".userinput" path="/tiles/layouts/userinputLayout.jsp">
      <put name ="accountview"   value="/tiles/accountview.jsp"/>
      <put name ="app-specific"  value="${app-specific}"/>            << variable for 
substitution
    </definition>

and I want to create a new tile, substituting values for both variable:

    <definition name=".activity.detail" extends=".mainLayout">
      <put name="content"      value=".portfolioLayout"/>
      <put name="app-specific" value="/tiles/activityinfo.jsp"/>
    </definition>

But this doesn't work! The "content" variable is replaced as expected, but the "app-specific" variable
is ignored and doesn't show up at all. It looks like the only tile for which variable substitution is supported is the one that's specified in the "extends" attribute--not in any nested tile. Surely there must be a way to get around this...


jim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to