开发者

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

开发者 https://www.devze.com 2023-03-09 17:07 出处:网络
<g:eachin=\"${flist}\"> <tr bgcolor=\"#ffffff\"> <td align=\"center\"><g:link controller=\"spider\" action=\"ThirdPage\" params=\"${it.get(\'dt\')}\">
<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

精彩评论

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