开发者

how to pass value from list of maps in gsp to action?

<g:each  in="${flist}"> <tr bgcolor="#ffffff">
            <td align="center"><g:link controller="spider" action="ThirdPage" params="${it.get('dt')}">
            ${it.get('dt')}</g:link>
            </td></tr>
开发者_Go百科

wher flist is list of maps.now i want to pass dt which is key in map within list to controller action.i tried it with above codes but its not working.what mistake i am doing there.

Thanks in advance, laxmi


Your params should be a map. Looks like you are passing a value in params. you need to send a map in params.


are you sure that flist is of type List<Map>? have you tried to print out the flist params? are you sure that you have closed the each tag?

<g:link controller="spider" action="ThirdPage" params="[paramName: it.get('dt')]">${it.get('dt')}</g:link>

be careful that you pass the link params in the right way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜