Jsf 不是有效的方法表达式
我定义了这样一个组合:Jsf 不是有效的方法表达式,jsf,jsf-2,el,composite-component,Jsf,Jsf 2,El,Composite Component,我定义了这样一个组合: <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:compos
<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()
有人能帮我吗?这确实不是一个有效的方法表达式。方法表达式旨在调用支持bean操作方法。它打算用于
UICommand
组件的action
属性。你看到的只是一个值表达式。从复合属性定义中删除方法签名
。这样,它将被视为一个值表达式
<composite:attribute name="varAction" required="true" />
不客气。既然你是新来的,别忘了在答案对解决问题最有帮助的时候标上“接受”。另见