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
More Blogs by Me


Leave a Reply

Your email address will not be published. Required fields are marked *