Methods implementation for future grails project

Multi tool use
Methods implementation for future grails project
i just want to ask for any of your ideas on what method to be created, i mean a useful method that can be implement to any grails project. Thanks!
Here is my example method
String.metaClass.htmlEscape {
return org.apache.commons.lang3.StringEscapeUtils.escapeHtml4(delegate)
}
and here's how you call it in the controller
def kups = ([['name':'<marquee direction="up">"Sample 1"</marquee>'.htmlEscape()],['name':'<b>Sample 2</b>'.htmlEscape()]])
render kups as JSON
and the output is
<marquee direction="up">"Sample 1"</marquee> <b>Sample 2</b>
So guys please me for any method ideas Thanks :)
I actually use ajax for that sir
– Kim Remonte
Jul 3 at 14:35
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
but to render in the view to the user ?
– Jorge Aguilera Gonzalez
Jul 3 at 14:28