4
我在调用控制器函数时必须呈现选择。在控制器中呈现Grails标记
class FormController {
def document() {
render """<g:select name="tipo" from="${['','one','two']}" />"""
}
}
它不工作..在HTML出现没事的时候我替换此功能的股利。
我在调用控制器函数时必须呈现选择。在控制器中呈现Grails标记
class FormController {
def document() {
render """<g:select name="tipo" from="${['','one','two']}" />"""
}
}
它不工作..在HTML出现没事的时候我替换此功能的股利。
使用tag as method call语法来代替:
render g.select(name:"tipo" from:['','one','two'])
//Build your output string as the next:
def output = g.select(name:"tipo" from:['','one','two'])
//And add any other string or tag if you need
output = "Tipo: " + output
render (text: output)
感谢:'渲染(文字:g.select(名称:从 “TIPO”:[ '', '一', '二']) )' – IgniteCoders