wood burning stoves*
The moose likes Struts and the fly likes Nest tiles don't work :( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Nest tiles don Watch "Nest tiles don New topic
Author

Nest tiles don't work :(

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Hi,

This problem is quite hard to explain since it is the first time that I have encountered it. Basically I am trying to have tile reference from pages that are loaded using tiles as well.

I have a default.jsp page that is used as a template by all other pages. This default.jsp page has the following XTML:



In the tiles-def.xml file I have the following settings for the default definition.



Now I have the home.jsp page. In the tiles-defs.xml file I set the definition for home as follows:



This works fine, and the home page is loaded using with the header at top and footer at bottom. However I tried adding the a tile definition in the home page as follows:



I would expect that on the home page I get the title printed as well. However instead I get the following exception on screen:



Why is this happening? I do have the �title� attribute defined! Then why doesn�t it want to work?

Thanks for any comments,
Regards,
Sim085
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
hi,

tiles does have an individual scope (tiles-scope). that means that you are unable to access attributes from inside a nested scope unless you save them explicitly.

take a look at the answer i gave in this thread, that's pretty much the constellation you need as well.

there is an "advanced tiles" pdf available which explains those details, should you be more interested...

:-)

hope it helps,
jan
[ October 22, 2006: Message edited by: Jan Groth ]
Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
Thank You very much

That was really helpfull

Thanks,
Sim085
 
Don't get me started about those stupid light bulbs.
 
subject: Nest tiles don't work :(
 
Similar Threads
Struts Tiles Inheritance problem
confusion on struts tile
tiles definition problem
Tiles problem
Struts - tiles