Unfortunately, unless I'm missing something, that would lose the extension
to site.layout and the whole chain would be broken.  I guess I didn't
include enough of the tiles-defs.xml the first time.  Here it is:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles
Configuration 1.1//EN" "http://struts.apache.org/dtds/tiles-config_1_1.dtd";>
<tiles-definitions>

 <definition name="site.layout" path="/canada-layout.jsp">
   <put name="title" value="site.layout.title"/>
   <put name="pagetitle" value="passion"/>
   <put name="header" value="/tiles/header.jsp"/>
   <put name="body" value="/tiles/empty.jsp"/>
   <put name="footer" value="/tiles/footer.jsp"/>
   <put name="init" type="string">
     /**
      * Page Level Initialization
      */
     function init () {
     } //init
   </put>
   <putList name="styles">
   </putList>
   <putList name="scripts">
     <add type="string" value="javascript/util.js"/>
   </putList>
 </definition>

 <definition name="default.pane" extends="site.layout">
   <put name="body" value="default.layout" type="definition"/>
 </definition>

 <definition name="default.layout" path="default-layout.jsp">
   <put name="bluearea" value="/tiles/blank.jsp" type="page"/>
   <put name="whitearea" value="/tiles/blank.jsp" type="page"/>
   <putList name="breadcrumbs">
     <add value="/|head.home" type="string"/>
   </putList>
 </definition>

 <definition name="login.error" extends="default.pane">
   <put name="pagetitle" value="members" type="string"/>
   <put name="bluearea" value="/tiles/login-error.jsp" type="page"/>
   <putList name="breadcrumbs">
     <add value="/|head.home" type="string"/>
     <add value="/home|members" type="string"/>
     <add value="Sign-On Unsuccessful" type="string"/>
   </putList>
 </definition>

</tiles-definitions>

So the site.layout defines the highest level look and feel, with a header,
body, and footer along with provisions for additional CSS and JavaScripts.
The site.layout extends that and breaks the body of the site.layout into a
blue area (with breadcrumbs) and a white area.  Then the login.error is
supposed to define the pagetitle, some content for the blue area and a list
of breadcrumbs.  The pagetitle and breadcrumbs work exactly as expected, but
the blue area is being ignored.  I've got to say, it's a whole lot more
complicated than I would have hoped to get nested tiles working!!!
 (*Chris*)


On 10/16/06, Simon Pink <[EMAIL PROTECTED]> wrote:

It appears like you are extending default.pane with login.error, but the
default.pane is putting the default.layout back in (overidding login.error
)
when you call:

<put name="body" value="default.layout" type="definition"/>



Try extending default.layout with login.error and see if that works...


-----Original Message-----
From: Chris Pratt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 October 2006 12:18 p.m.
To: Struts Users Mailing List
Subject: Trouble with Nesting Tile Definitions

I'm seeing some weird behavior with my tiles definitions that I can't
explain and I was hoping someone smarter than me could lend an
eye.  Here's
an excerpt from my tiles-defs.xml:

  <definition name="default.pane" extends="site.layout">
    <put name="body" value="default.layout" type="definition"/>
  </definition>

  <definition name="default.layout" path="default-layout.jsp">
    <put name="bluearea" value="/tiles/blank.jsp" type="page"/>
    <put name="whitearea" value="/tiles/blank.jsp" type="page"/>
    <putList name="breadcrumbs">
      <add value="/|head.home" type="string"/>
    </putList>
  </definition>

  <definition name="login.error" extends="default.pane">
    <put name="pagetitle" value="members" type="string"/>
    <put name="bluearea" value="/tiles/login-error.jsp" type="page"/>
    <putList name="breadcrumbs">
      <add value="/|head.home" type="string"/>
      <add value="/home|members" type="string"/>
      <add value="Sign-On Unsuccessful" type="string"/>
    </putList>
  </definition>


I have a simple JSP that starts building the page and references the
login.error definition.  When the page gets built, the pagetitle and
breadcrumbs from the login.error definition appear on the screen, but the
bluearea defined in the default.layout definition is being used rather
than
the one specified in the login.error (which should override the one in
default.layout).  Am I missing something obvious here?
  (*Chris*)

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


Reply via email to