A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Defining onLoad() function for a struts tiles page
Joined: Jan 03, 2005
Jul 26, 2006 09:21:00
I am using a
tiles inheritance to design my web pages.
There is a layout "Layout.jsp" page which defines <head> and <body> content for all the web pages.
I am having definitions in my tiles-def.xml for two
pages AppPage1 and AppPage2 which has their body content defined in "AppPage1.jsp" and "AppPage2.jsp" respectively.
I need to call onLoad() function only for AppPage1. on including "onLoad()" in the body attribute of "layout.jsp" it gets called for both the JSP pages. how to call it only for AppPage1?
Joined: Feb 15, 2005
Jul 26, 2006 10:12:00
In your layout.jsp page, specify onlode="init()". In AppPage1, definie an init() function that does what you want it to do. In AppPage2 and all other pages that could be put in this tile, define an init() method that is empty and does nothing.
I agree. Here's the link:
subject: Defining onLoad() function for a struts tiles page
Tracking User's requests.
t:jscookMenu with Tiles
Tiles with runtime attributes - response already commited
Passing Tiles into an IFRAME.
Problem With Tiles
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015