0
votes

I'm quit new to grails and took over another persons coding

I'm having problems with getting params from my gsp viewer to my groovy controller And when I get the right params it does not change to the right viewer and just goes back to the index sight

<td valign="top" class="value">
    <g:textField name="key" value="${key}" class="form-control" />
</td>

<button class="download">
    <g:link action="show"><g:message code="defualt.button.show.label" default="?Visa" /></g:link>
 </button>
1
what are the params you want to get to your controller? If you want to add params to your link, you have to use the params-attribute for your g:link-tag : docs.grails.org/latest/ref/Tags/link.htmlrdmueller
its the key value from my textField, but with params in g:link it can not seem to find the value from my textfieldFaunus

1 Answers

2
votes

Your Controller Code:

def key= params.key

Your GSP Code:

<g:form action="show">
<td valign="top" class="value">
    <g:textField name="key" value="${key}" class="form-control" />
    <g:submitButton name="download" value="download" />
</td>
</g:form>