2009-12-11 81 views
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.E​​LException:错误解析: javax.servlet.ServletException:

我只使用简单的ManagedBeans,没有EJB。

谢谢。

回答

2

统一表达式语言(所有那些东西)作为JSP规范的一部分来维护。您可能需要更新版本的JSP API。我看到Glassfish v3包括EL 2.2。我相信这个规范包含了你想要的功能。