I'm using JSF 2.0 with primefaces over JBoss 7. In some part of the code, I have the following:
public void setItemValue(int value) {
this.value = value;
}
and in the xhtml:
<p:commandButton ajax="true" value="Button" update="@form"
action="#{bean.setItemValue(1)}"/>
The problem is, when I click the button, I get an javax.el.MethodNotFoundException
, saying that setItemValue(java.lang.Long)
doesn't exists. Off course it doesn't, it should be a int or Integer value! Anyone has seen this problem? there is any alternative other than changing my method to receive a long? Thanks!
EDIT: Just downloaded the SNAPSHOT of JBoss 7.2, and it works fine on it. Looks like its a bug of JBoss 7.1.1 :(
Method not found: bean.setItemValue(java.lang.String)
. But the first try worked! The bad part is that I'm still not able to pass anInteger
orint
to a method through jsf, but this is a nice workaround :) – Saccular