Re: Multiple conditional ${wrapped}?

Doug Kirk <[email protected]> Wed, 1 Sep 2004 17:29:33 -0500
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
Indeed, the solution presented below is best, because then the browser 
will just cache the entire .js file.

However, I've had problems using the XML shortcut for empty tags in 
this particular case, so always do <script src="..."></script>

Cheers,
doug


On Sep 1, 2004, at 4:49 PM, jim moore wrote:

Why not just put all the javascript functions in a .js file and then 
just
include that in the pages:

<script language="javascript" src="functions.js"/>

--jim

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Cyrille 
Bonnet
Sent: Wednesday, September 01, 2004 10:07 PM
To: [email protected]
Subject: [Mav-user] Multiple conditional ${wrapped}?

Hi Maverick users,

I have a simple problem. Of course, I'd like a simple solution :-)

We use a header JSP across many JSP pages. On some of those JSP pages, 
we
have Javascript functions available (inside the <head> tag), but not on 
all
pages.

We use the ${wrapped} and Maverick transformation to replace the <body>
content on our pages. But we can't have multiple ${wrapped} in one 
page, so
we can't use Maverick transform to replace the Javascript functions when
needed.

Ideally, we would have something like that in the header JSP:

<head>
	<c:out value="${wrapped}" escapeXml="false"/>  <-- "transform" this
to Javascript functions -->
</head>
<body>
	<c:out value="${wrapped}" escapeXml="false"/> <-- "transform" that
to body content -->
</body>

At the moment, we have the choice of several (unsatisfying) workarounds:
* have all Javascript functions in all pages,
* create a custom header for each set of Javascript functions

Any pointer would be appreciated.

Cyrille.





-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
[INVALID FOOTER]



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
[INVALID FOOTER]



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
[INVALID FOOTER]