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?
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.