JSF找不到功能

时间:2018-04-22 05:59:54

标签: jsf el

我的JSF编程出了问题,它正在抛出这样的错误消息

    javax.servlet.ServletException: /addCus.xhtml: The class 'gDANIEL.CustomerController' does not have the property 'addCustomer'.


root cause 
javax.el.ELException: /addCus.xhtml: The class 'gDANIEL.CustomerController' does not have the property 'addCustomer'.

有人说在CustomerController类中不存在addCustomer方法,我真的不明白我已经检查过,实际上它确实存在

CustomerController

    public String addCustomer() throws Exception{
    CustomerManager cusMgr = new CustomerManager();
    cusMgr.addCustomer(customerID, customerFirstName, customerLastName,customerAddress, customerPhone, customerEmail, notes);

    message = "Record Successfully Saved";
    return "add";
}

我正在调用函数的页面

    <p:commandButton value ="Save Customer Information " action ="#{customerController.addCustomer}" update="outputmessage">
    <p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
</p:commandButton>

0 个答案:

没有答案