我有一个以javax.el.MethodExpression为属性的jsp标记:
<%@ attribute name="action" required="true" type="javax.el.MethodExpression" rtexprvalue="true" %>在同一个标签中,我有:
<h:commandLink action="#{action}">
link text
</h:commandLink>当我尝试单击该链接时,收到以下错误:
javax.faces.FacesException: #{action}: org.apache.jasper.el.JspMethodNotFoundException: /WEB-INF/tags/pager/pager.tag(17,1) '#{action}' Identity 'action' was null and was unable to invokecommandLink是否可以正确地调用"action“方法?
发布于 2010-03-31 04:34:01
不要创建JSP标记。创建一个JSF组件。扩展UIComponentELTag。Tutorials here。
或者,如果您正在使用Facelets,请考虑使用ui:composition的template。Tutorials here。
或者,如果您已经在使用JSF2.0,那么可以使用composite components更进一步。Tutorial here。
发布于 2010-03-31 02:51:54
我做JSF已经有一段时间了,但我非常确定方法表达式的形式是:#{bean.method}。你不能只说#{method}。
https://stackoverflow.com/questions/2547779
复制相似问题