我有一个数据表,每行都有一个按钮:
<ice:dataTable ... var="item">
<ice:column>
<h:commandButton value="Download" action="#{mybean.downloadItem(item)}" />
</ice:column>
</ice:dataTable>
在后端bean中有这个方法:
public void downloadItem(Item item) {
// ...
}
一切都正常运行(当单击方法时执行),但是Eclipse验证失败,并显示以下奇怪的消息:方法必须具有签名 "String method(),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), 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 method(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String)”,但是实际上签名为“void method()”。
我该怎么办?
如果相关的话,我正在使用Tomcat 7上的Eclipse Indigo SR1。
public String downloadItem(Item item) { ...; return null; }
会使Eclipse满意,而不会改变应用程序的行为,对吗? - MestreLion