Grails在每个标签中都有id

时间:2011-05-22 23:16:25

标签: grails controller

嘿。如何将当前临时ID传递给glink中的控制器? (####)

<g:each in="${temp}">

  <li>Date: ${it.dateParticipated}, <br>Role: ${it.role}, <br>Acceptence: ${it.accepted}, <br>
  <g:link controller="conference" action="participated" params="[temp: it.conference.id]">
     Conference: </g:link>${it.conference},<br>
Status: ${it.status}<br>
<g:link controller="conferenceUser" action="edit1" params="[temp2: it]">#####
    - Update </g:link></li>

  <br>
</g:each>

1 个答案:

答案 0 :(得分:1)

只需添加“id”属性即可。

<g:link controller="conferenceUser" action="edit1" id="${it.id}" params="[temp2: it]">#####
        - Update </g:link>