render Grails tag in controller

I've to render a select when calling a controller function.

class FormController {
    def document() {
        render """<g:select name="tipo" from="${['','one','two']}" />"""

it doesn't work.. In the html appear nothing when I replace a div with this function.


Use the tag as method call syntax instead:

render"tipo" from:['','one','two'])

//Build your output string as the next:
def output ="tipo" from:['','one','two'])
//And add any other string or tag if you need
output = "Tipo: " + output
render (text: output)

Need Your Help

How to realize a notification system like Facebook?

php mysql facebook design

I wanted to do a Facebook-similiar notifiaction system, but I just can't think of the way, how to realize it.

How to search and launch an already installed ipad application from another ipad application?

iphone objective-c

I am working on a iPad application which need to identify its related application is already installed in the iphone/ ipad. If it already installed in the device, i had to launch it from my applica...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.