Creating a line for a link in grails without g: link
In the tag as shown below:
<a data-url="/new/request/showText/${requestInstance.id}"> view text</a> Is there a way to not hardcode the url like mine?
I tried using <g:link action="showText" id="${requestInstance.id}"> but this displays the anchor tag.
What can I do, but I'm just wondering if there is a better way to do this in the grail?
you can use
${createLink(action:'myaction',params:[datasetId:dataset.id])}
for complete control. It just returns something like http://myapp/myaction/123 and supports all the parameters supported by g:link .
More specific:
<a data-url="${createLink(action:'showText',id: requestInstance.id)}"> view text</a> must work.