struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael" <>
Subject [Tiles] - Definition inheritence question
Date Mon, 02 Sep 2002 13:44:04 GMT
I've been playing with Tiles for several days, getting some simple
examples to work.  I've read all the documentation several times but I'm
missing a key part of the definition inheritence I think.  Can somebody
please clarify this for me?  Here's what I'd like to do:

I'd like to have a main page that specifies a header, menubar, body, and
footer.  Then in the pages of my website, I'd like to insert tiles into
the body.  So far it's very easy if I only have one tile to insert into
the body.  But I'm really stuck on how to insert two tiles into the same
body.  This is what I've tried:


  <!-- Doc index page description  -->
  <definition  name="default_layout"
	  <put name="header"  value="/jsp/common/header.jsp" />
	  <put name="menubar" value="/jsp/common/menubar.jsp" />
	  <put name="footer"  value="/jsp/common/footer.jsp" />

  <definition name="plant_status_page"
    <put name="body1" value="plant_list"/>
    <put name="body2" value="subsystme_list"/>


  <!-- Header Page Information -->
  <tiles:insert attribute="header" />

  <!-- Menu Bar -->
  <tiles:insert attribute="menubar"/>  

  <!-- Main Body Information -->
  <tiles:insert attribute="body"/>

  <!-- Copyright Information -->
  <tiles:insert attribute="footer"/>



  <!-- Header Page Information -->
  <tiles:insert attribute="body1" />


  <tiles:insert attribute="body2"/>


This works, but the problem is I don't get the header & footer defined
in the default_layout.jsp.  Now I can cut & paste the header & footer
code into plant_status_body.jsp but I think there has to be a better way
to do this.  Can someone please tell me if this is possible and how?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message