"java.lang.NoSuchMethodException" error when call a managedbean int method
--------------------------------------------------------------------------
Key: MYFACES-2916
URL: https://issues.apache.org/jira/browse/MYFACES-2916
Project: MyFaces Core
Issue Type: Bug
Components: General
Affects Versions: 2.0.2-SNAPSHOT
Environment: OS:winxp
JDK: 1.6.0_20
Reporter: viola.lu
Priority: Minor
Attachments: el-exercises.war
1. Create a managed bean ,defind an int field
package coreservlets;
import javax.faces.bean.*;
@ManagedBean
public class SpanishColorMapper extends ColorMapper {
private int age;
public SpanishColorMapper() {
super("Spanish", "rojo", "anaranjado", "amarillo",
"verde", "negro", "blanco");
}
public int calYear(int x) {
return age + x;
}
public int getAge() {
return age;
}
public void setAge(int x) {
age = x;
}
}
2.Direclty call calYear method in xhtml like:
<td>#{spanishColorMapper.calYear(5)}</td>
but it's reported that :
java.lang.NoSuchMethodException:
coreservlets.SpanishColorMapper.calYear(java.lang.Long)
Caused by:
java.lang.NoSuchMethodException -
coreservlets.SpanishColorMapper.calYear(java.lang.Long)
Seems number is set as Long by default , not type as managedbean
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.