作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有类似于下面提到的代码。
<g:each in="${Accounts}" var="account">
<li>
<g:hiddenField name="id" value="${account.id}" />
<g:hiddenField name="memberId" value="${account.memberId}" />
<g:hiddenField name="accountType" value="${account.type}" />
<label><input type="checkbox" />${member.name}</label>
</li>
</g:each>
最佳答案
GSP:
<g:form controller="some" action="updateAccountIds">
<g:each in="${Accounts}" var="account">
...
<label><g:checkBox name="checkedAccount" value="${account.id}"/>${member.name}</label>
</g:each>
</g:form>
def updateAccountIds(){
def ids = params.list 'checkedAccount'
log.info "checked = $ids"
doOtherStuff()
}
关于grails - 如何在gsp/groovy中获取检查项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59825080/
我是一名优秀的程序员,十分优秀!