| Author |
tile question
|
Hong Yi
Greenhorn
Joined: Feb 13, 2008
Posts: 11
|
|
How do I add action to a common element (header.jsp) for tile layout? thanks
|
 |
Doug Slattery
Ranch Hand
Joined: Sep 15, 2007
Posts: 294
|
|
Hi Hong Yi, If I understand your question, you want to use header.jsp in several tiles?.?. That being the case, you can extend a tile from a parent. Example: Suppose you have an action mapping in your struts-config.xml to display your home page, which you want to incorporate header.jsp In your tiles-defs.xml, do the following: In this case, tile:showhome inherits tile:layout which contains header.jsp. Now, in layout.jsp, do something like this: Now, you can reuse layout by extending it in other tiles and changing the page.body name attribute to whatever jsp applies for the other pages. I hope that answers your question... Aloha, Doug -- Nothing is impossible if I'mPossible
|
 |
 |
|
|
subject: tile question
|
|
|