0
到现在为止,我用于JSF 1.2 commandLinks和setPropertyActionListener以传递例如DataTable的selectedItem。传递参数JSF 2.0
<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。
谢谢。