Hi Aaron,

If a minor modification to the layout file is acceptable, you can take
advantage of the fact that you can pass parameters to layout and access them
using EL expressions. In your layout file do something like this

<body onload='${!empty loadHandler ? loadHandler:''"}'/>

When you call the layout on the page that needs the handler do this:

<stripes:layout-render .... loadHandler="myLoadHandler">
...
</stripes:layout-render>

This will make the layout output <body onload='myLoadHandler'/>

The other pages can probably be left alone. They will output an empty
"onload" attribute on the body.

If that bothers you, you can restructure this to avoid outputting the onload
attribute if the variable is empty.









On Fri, Feb 26, 2010 at 9:18 AM, Aaron Stromas <passog...@gmail.com> wrote:

> Greetings,
>
> First off, I'm a Stripes novice and I hope I'm not asking something
> obvious. We have a standard layout defined for all pages but I need to add a
> onload event handler to the <body> tag of one of my pages. Since it is of no
> use to all pages, I don't want to modify the layout. Is there a way of
> accomplishing this?
> Thanks?
>
> -aaron
> --
>
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>


-- 
Ross Sargant
Software Engineer
p: 954-623-6015 x2108
email: rsarg...@tvrc.com

TVR Communications LLC
541 S. State Road 7,Suite 5,Margate, Florida,33068

http://www.tvrc.com
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to