File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Tiles - different onload method for pages using same layout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles - different onload method for pages using same layout" Watch "Tiles - different onload method for pages using same layout" New topic
Author

Tiles - different onload method for pages using same layout

Mah Hasan
Greenhorn

Joined: Apr 19, 2007
Posts: 11
Hi all,

Is there a way to have a seperate onload for two different pages using the same Layout?

I am using Tile framework with Struts. I have a MyBasicLayout.jsp file. This file has the body tag. I have two other layouts extending from this layout. Is there a way I can call two different onload methods depending on which child layout I am displaying.

To clarify my question even further, if two pages are using the same layout and layout has the body tag. Is there a way to have different onload method for each of these pages?

Can different tiles have different onload methods?

Any help is appreciated.

Thanks,
Mahrukh.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
See question 4 of the JavaRanch Struts FAQ. The problem addressed in the FAQ is slightly different than yours, but once you read it, I'm sure you will see how you can use the same technique to solve your problem.


Merrill
Consultant, Sima Solutions
 
 
subject: Tiles - different onload method for pages using same layout
 
Similar Threads
Defining onLoad() function for a struts tiles page
Tiles and image preloading
Tiles Question - howto solve variety body ?
How to go back to a page
script tag location