1

我正在开发一个适用于 JSF 2 和 PrimeFaces (3.5) 的 Liferay protlet。我正在使用 Eclipse,当我在 Project Facets 中启用“Java Server Faces”时,我收到了这个惊人的错误

    Multiple annotations found at this line:
- Syntax error in EL
- Method must have signature "String method(), String method(String), String method(String, String), String method(String, String, String), String method(String, String, 
 String, String), String method(String, String, String, String, String), String method(String, String, String, String, String, String), String method(String, String, String, String, String, String, 
 String), String method(String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String), String method(String, 
 String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String), String method(String, 
 String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, 
 String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, 
 String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, 
 String, String), String method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, 
 String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String), String method(String, String, String, String, String, String, String, 
 String, String, String, String, String, String, String, String, String, String, String, String)" but has signature "String method(ABC)"

导致这种情况的xhtml代码是:

<p:column headerText="Some Column Headed">  
    <h:outputText value="#{ mysteryBean.getABCName(widgetVarInstanceOfClassABC)}" />  
</p:column>

BackingBean 的 (@ManagedBean) 代码(上面引用为神秘豆)是:

public String getABCName(ABC abc) throws Exception{
    // Used to get something that is not available through the get functions of ABC Class 
    // Do stuff related to the instance...
    return something;       
}

到目前为止,我的代码运行良好,没有任何问题。
我知道 Eclipse EL 语法和验证存在问题,但我不确定是不是这样,或者我做错了什么。我应该担心吗?

4

1 回答 1

5

忽略它。

方法签名验证不适用于 Facelets 页面。您可以在 Eclipse 首选项中禁用验证,请参阅Method must have signature "String method() ...[etc]..." but has signature "void method()"

于 2013-05-23T12:34:54.590 回答