Would this be a correct tag in GSP?
我是 grails 的新手。
这是否是标签的正确语法?
1 2 3 4 5 | <g:each in="${empactUser.getAuthorities()}"> <g:if test="it.getAuthority().startsWith("ROLE_PROJECTID")"> <g:link action="edit" params="[id: it.getAuthority(13).]"> Project </g:link> </g:if> </g:each> |
谢谢。
你可能想要这样的东西......
1 2 3 4 5 | <g:each in="${empactUser.getAuthorities()}"> <g:if test="${it.getAuthority().startsWith("ROLE_PROJECTID")}"> <g:link action="edit" params="[id: it.getAuthority(13).id]">Project</g:link> </g:if> </g:each> |
如果不自己运行它,您确实会在 if 标记
上丢失 gstring 语法
1 | <g:if test="${it.getAuthority().startsWith("ROLE_PROJECTID")}"> |