Grails pageProperty tag

24 / Sep / 2012 by Amit Kumar 0 comments

In my current project, I tried to call a javascript function on onload event of body tag of gsp page:


...

But this onload event was not fired, because Grails picks the body tag from layout and not from the view. So I added the following line in body tag of my layout


...

In above example pageProperty tag fetched the onload attribute from body tag of my view and added it to the body tag of my layout. That’s how it worked.

Amit Kumar
amit.kumar@intelligrape.com
in.linkedin.com/in/amitkumar0110
twitter.com/amit_kumar0110
More Blogs by Me

FOUND THIS USEFUL? SHARE IT

Leave a comment -