Inside my controller I have an action with this return:
render {
li {
input(name:'question'+questNumber)
remoteLink(action: 'addResponseToQuest',onsuccess:'logTestData(data)',"Link")
}
}
The list element is correctly rendered, but the remotelink no.
How can I use render the same result as tag?
With encodeAsHTML() nothing happens.
Thanks in advance
Luis
Prefix your tags with mkp.yieldUnescaped
, eg:
render {
li {
input(name:'question'+questNumber)
mkp.yieldUnescaped remoteLink(action: 'addResponseToQuest',onsuccess:'logTestData(data)',"Link")
}
}
The render
closure is an instance of a Groovy MarkupBuilder , see its docs for explanation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.