Ed,

The tile definition is initialized before the pages/jsp's/actions are
called.  You can therefore access any name in any component as long as that
component is tiles aware.  In the case of your JSP's, juse use the tiles
taglib and do what you did in header.jsp to obtain the title (a getAsString,
if I recall correctly).  In the case of an action, you'd need to subclass
the TilesAction to manipulate it directly (i.e. to set the title from within
the Action directly, or perhaps set a content section if the page is
dynamic).

Regards,
David
  -----Original Message-----
  From: Ed Dowgiallo [mailto:[EMAIL PROTECTED]
  Sent: Sunday, November 23, 2003 9:19 AM
  To: Struts Users Mailing List
  Subject: Inheritance in tile definitions II


  My thanks to all those who offered suggestions for my first problem.

  Let's say that I have the following in a definitions file:

    <!--
===================================================================== -->

        -->
    <!-- Form
       -->

        -->
    <!--
===================================================================== -->
    <definition name="form.layout" page="/layouts/formLayout.jsp">
      <put name="system-short-name" value="TDL"/>
      <put name="user-name" value="Guest"/>
      <put name="title"   value="Form Page Layout"/>
      <put name="header"  value="/common/header.jsp"/>
      <put name="content" value="${content}"/>
      <put name="footer"  value="/common/footer.jsp"/>
      <put name="debug"   value="/debug.jsp"/>
    </definition>
    <definition name="login.form" extends="form.layout">
      <put name="title"   value="Login Form"/>
      <put name="content" value="/security/login.jsp"/>
    </definition>

  When I access title using GetAsString from formLayout.jsp, I get the
expected value of Login Form.

  How do I access the value of title from header.jsp?

  Thank you,
  Ed

Reply via email to