File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes sitemesh (composite views) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "sitemesh (composite views)" Watch "sitemesh (composite views)" New topic
Author

sitemesh (composite views)

Manjesh Patil
Ranch Hand

Joined: Sep 24, 2010
Posts: 41

Hi ,
I am using Sitemesh component to get composite view for one of my J2ee based application.

The problem is javascript function defn like function a() {} and the caller <body onload=a()/> of individual pages are not being copied to the final/resultant page.
It is copying the <body > tag of layout.jsp when this happens my onload functtion call and functions are missing,,

layout.jsp

<html>
<head>
<title>Your Company Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
</style>
<link rel="stylesheet" href="css/styles.css" type="text/css">
</head>
<body BGCOLOR="8BB381" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0" link="#eeeeee" align="center">
<jsp:include page="/includes/header.jsp"></jsp:include>
<table width="75%" cellspacing="0" cellpadding="0" border="0"
align="center" bgcolor="#C5908E" height="150%">
<tr height="30">
<td height="250" valign="top" width="160">
<table width="160" cellspacing="0" cellpadding="8" border="0"
height="150">
<tr >
<td class="menu">
<jsp:include page="/includes/navigation.jsp"></jsp:include>
</td>
</tr>

</table>

</td>
<td bgcolor="#f0ddc8" height="250" valign="top" >
<decorator:body />
</td>

</tr>
</table>
<jsp:include page="/includes/footer.jsp"></jsp:include>
</body>
</html>


one of individual page
abc.jsp

<html>
<title>create you profile</title>

<head>
<script type="text/javascript">
function toggleHopitalInfo(){
alert("toggling info");

}
</script>
</head>
<body onload="toggleHopitalInfo()">
<form method="post">
.
.
</form>
</body>
</html>


thanks in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60979
    
  65

Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sitemesh (composite views)