{"id":8064,"date":"2012-09-24T15:05:08","date_gmt":"2012-09-24T09:35:08","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=8064"},"modified":"2016-12-19T15:30:58","modified_gmt":"2016-12-19T10:00:58","slug":"grails-pageproperty-tag","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/grails-pageproperty-tag\/","title":{"rendered":"Grails pageProperty tag"},"content":{"rendered":"<p>In my current project, I tried to call a javascript function on <strong>onload event<\/strong> of body tag of gsp page:<br \/>\n[html]<\/p>\n<p>&#8230;<\/p>\n<p>[\/html]<\/p>\n<p style=\"padding:10px\">\n<p>But this <strong>onload event<\/strong> was not fired, because <strong>Grails<\/strong> picks the body tag from layout and not from the view. So I added the following line in body tag of my layout<br \/>\n[html]<\/p>\n<p>&#8230;<\/p>\n<p>[\/html]<\/p>\n<p style=\"padding:10px\">\n<p>In above example <strong>pageProperty<\/strong> tag fetched the onload attribute from body tag of my view and added it to the body tag of my layout. That&#8217;s how it worked.<\/p>\n<p>Amit Kumar<br \/>\n<a href=\"http:\/\/www.tothenew.com\/blog\/author\/amit.kumar\/\">amit.kumar@intelligrape.com<\/a><br \/>\nin.linkedin.com\/in\/amitkumar0110<br \/>\ntwitter.com\/amit_kumar0110<br \/>\n<strong><a href=\"http:\/\/www.tothenew.com\/blog\/author\/amit-kumar\/\">More Blogs by Me<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my current project, I tried to call a javascript function on onload event of body tag of gsp page: [html] &#8230; [\/html] 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 [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2},"categories":[7],"tags":[4840,1037,536],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/8064"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=8064"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/8064\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=8064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=8064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=8064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}