GeeCON Prague 2014*
The moose likes Struts and the fly likes Struts Tiles Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Tiles Problems" Watch "Struts Tiles Problems" New topic
Author

Struts Tiles Problems

vijay kumarg
Ranch Hand

Joined: Dec 14, 2006
Posts: 105
Hello All,
I am working on struts tiles.
I have some doubts and putting here.

1) If a definition extends another defintion and there is also a path then how the rendering will takesplace, like

<definition name="a.b.c" extends="d.e.f" path="ue/xyz.jsp" >
<put name="css" value="g.h.i"/>
</definition>

In this case how to proceed to know where will be the final rendering takesplace?
when i searched for the extended definition that defintion also have some path.
so which path for the jsp we need to consider for the rendering?

Thanks,
Vijay G
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
Ahhh...I work with tiles quite a bit and your snippet makes little sense to me, it should be like this:



Does that help? Obviously when you extend, you are overriding individual tiles while the others remain. This when download page is loaded it would load defaultHeader, download.jsp and footer.jsp
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
I think I understand now. You want to specify a layout template for both a.b.c and d.e.f? Don't. The point of using extension is so you can extend a template.

If you are trying to switch to another tile layout then you should create another base definition and extend that.
vijay kumarg
Ranch Hand

Joined: Dec 14, 2006
Posts: 105
Hi Chris,

Thanks for your reply.
we have a huge framework developed using tiles.In that we have 3 modules and a default module.On the top of app a tiles-layout.xml and tiles_def.xml are defined.
Also there are individual tiles_def.xml and obviously module struts-config.xml are defined.
I am having a lot of confusion when comes to actual rendering.It forcing me to follow trial and error way for rendering.
Let me put in detail
1) If a definition extends another one and also a path is defined like
<definition name="a.b" extends="c.d" path="/jsp/xyz.jsp>
and if that extended definition i.e. c.d also has a path attribute defined then which path we need to consider for rendering?
2)suppose if value attribute in <put> is also a defintion then where to look ? either in tiles_layout.xml or tiles-def.xml?

Please give me any useful links for in depth struts tiles if you have any.

Thanks,
Vijay G
[ April 25, 2007: Message edited by: vijay kumarg ]
amit punekar
Ranch Hand

Joined: May 14, 2004
Posts: 513
Hi there,
There is a good PDF on tiles which is extensive by Cedric dumolin.
visit this URL to get that
http://www2.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf

regds
Amit


Regards,
Amit
 
GeeCON Prague 2014
 
subject: Struts Tiles Problems