aspose file tools*
The moose likes Struts and the fly likes Tiles Question - howto solve variety body ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles Question - howto solve variety body ?" Watch "Tiles Question - howto solve variety body ?" New topic
Author

Tiles Question - howto solve variety body ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, good day and merry christmas ..i have an question in tiles , currently
i using the following template as my webpage layout

- header - location : top
- navigation menu - location : left center
- body - location : right center
- footer - location : bottom

so i create index page as follow :


there have several index which use to populate the same layout but different body through the navigation links by defined in navbar.jsp

say i have link1,link2,link3 as navigation links
when click link1, the same layout will display with body1.jsp and same as when click link2, the same layout will display with body2.jsp

my question is , while these body1,body2.jsp ..are actually as main page with several button reside, when user click on different button, it will fire different respective action, after finish the action, it will go to different other result pages ..so, as my case, should i have another few index page for different result pages ?

can someone please suggest some idea to solve the problem ? thank you very much for your time
[ December 26, 2004: Message edited by: Alvin chew ]
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
Do you have a Tiles-def.xml file?
You can create various definitons of pages.

Then you can extend this:




inside of your "default.jsp"
you would use these tags:


You would want to add some static html inside of the default.jsp so that everything looks formated properly (possibly using table tags) and possibly some "banner graphics" or any other content you want available on each page.

Then inside of your struts-config file you refer to the definition names instead of individual jsp pages.

hope that helped.

-Tad
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
thank you, Tad Dicks for explanation ..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tiles Question - howto solve variety body ?