1

我有以下标记文件:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a4j="http://richfaces.org/a4j"
>
    ...
    <h:inputText ...>
        <a4j:ajax listener="#{ajaxListener}" />                  
    </h:inputText>
    ...
</ui:composition>

ajaxListener属性配置为:

 <attribute>
   <name>ajaxListener</name>
   <required>false</required>
   <type>javax.el.MethodExpression</type>
   <method-signature>void listner(javax.faces.event.AjaxBehaviorEvent)</method-signature>
 </attribute>

当标签用作:

<wish:inputText id="nameEn"                   
                value="#customerAddBacking.customerBean.nameEn}" 
                label="#{lbs.CUSTOMER_NAME_EN}2"                    
                ajaxEnabled="true"
                ajaxListener="#{customerAddBacking.enNameChangeListener}" /> 

抛出以下异常:

javax.el.PropertyNotFoundException: The class 'com.wish.nags.web.view.client.setting.customer.CustomerAddBacking' does not have the property 'enNameChangeListener'.

这是如何引起的,我该如何解决?

如果我使用带有 的复合组件,它可以工作<cc:attribute method-signature>,但是我不能使用复合组件来避免此处描述的问题:panelgrid 内的复合组件未“扩展”

4

0 回答 0