如何让grails f:表工作(3.3.8)

如何让grails f:表工作(3.3.8),grails,grails3,Grails,Grails3,grails很好,但是在没有示例的地方,它很难使用 我认为: <f:table collection="${bankAccountList}"/> 及 我还尝试了该视图的官方文档中的内容: <f:table collection="bankAccountList"/> 我经常遇到的错误是: Class java.lang.NullPointerException Message Request processing failed; nested exceptio

grails很好,但是在没有示例的地方,它很难使用

我认为:

<f:table collection="${bankAccountList}"/>

我还尝试了该视图的官方文档中的内容:

 <f:table collection="bankAccountList"/>

我经常遇到的错误是:

Class
java.lang.NullPointerException
Message
Request processing failed; nested exception is org.grails.gsp.GroovyPagesException: Error processing GroovyPageView: [views/dashboard/index.gsp:10] Error executing tag <f:table>: [views/templates/_fields/_table.gsp:5] Error executing tag <g:sortableColumn>: null
类
java.lang.NullPointerException
消息
请求处理失败;嵌套异常为org.grails.gsp.GroovyPagesException:处理GroovyPageView时出错:[views/dashboard/index.gsp:10]执行标记时出错:[views/templates/_fields/_table.gsp:5]执行标记时出错:null
findAllByUser(用户)肯定会返回玩家的银行账户记录


有什么想法吗?

您没有提供足够的信息来确定问题出在哪里,但是如果您将
银行账户
实例的
列表
传递给
respond
方法,那么在视图中您将能够使用

位于的项目证明了这一点

请参阅上的
f:table
标记的使用


我希望这会有所帮助。

您是否正在使用
字段
插件的2.2.8版?
 <f:table collection="bankAccountList"/>
Class
java.lang.NullPointerException
Message
Request processing failed; nested exception is org.grails.gsp.GroovyPagesException: Error processing GroovyPageView: [views/dashboard/index.gsp:10] Error executing tag <f:table>: [views/templates/_fields/_table.gsp:5] Error executing tag <g:sortableColumn>: null