【发布时间】:2009-12-11 16:05:05
【问题描述】:
到目前为止,我在 JSF 1.2 commandLinks 和 setPropertyActionListener 中使用过,例如DataTable 的 selectedItem。
<h:commandLink action="#{Result.show}" value="#{foo.name}">
<f:setPropertyActionListener value="#{foo}" target="#{Result.selectedFoo}"/>
</h:commandLink>
在JSF 2.0 and JPA 的示例中,我看到了一个解决方案,其中选定的项目作为参数传递给函数。但是,如果我尝试在 Glassfish 2.1 服务器上执行此功能,我会遇到异常。
<h:commandLink action="#{Result.showFoo(foo)}" value="#{foo.name}">
</h:commandLink>
javax.faces.view.facelets.TagAttributeException: javax.el.ELException:错误解析: javax.servlet.ServletException:
我只使用简单的 ManagedBeans,没有 EJB。
谢谢。
【问题讨论】: