我定义了这样一种构图:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="varAction" method-signature="java.lang.String action()" required="true" />
</composite:interface>
<composite:implementation>
<h:outputLink value="#"
onclick="#{cc.attrs.varAction}"
styleClass="ES_popupClose">
<h:graphicImage url="/resources/images/close_panel.png" title="#{mess.labelClose}"/>
</h:outputLink>
</composite:implementation>
当我调用这个对象时
<es:esUtilClosePanel varAction="#{rich:component('ESBankDeletePanel')}.hide();"/>我得到以下错误:
非有效方法表达式的#{rich:component('ESBankDeletePanel')}.hide();:
有人能帮我吗?
发布于 2012-01-24 10:54:45
这确实不是一个有效的方法表达式。方法表达式旨在调用bean操作方法。它的目的是用于UICommand组件的UICommand属性。你所拥有的只是一个价值表达式。从复合属性定义中删除method-signature。这样,它将被视为一个值表达式。
<composite:attribute name="varAction" required="true" />https://stackoverflow.com/questions/8983861
复制相似问题