I would like to call a setter directly from a command button and pass a value. My problem is that the setter is expecting a Character and jsf if passing it back as a String. Is there a good way to 'fix' this on the front end instead of having to over load the setter on my backing bean?
commandButton:
<p:commandButton value="SignOff"
actionListener="#{manageItemHandler.dataEntryOp.setBomComplete('Y')}"
rendered="#{speed2Session.isRendered('editManageItemOp')}"/>
getter/setter from backing bean:
protected Character bomComplete;
/**
* @return the bomComplete
*/
public Character getBomComplete() {
return bomComplete;
}
/**
* @param bomComplete the bomComplete to set
*/
public void setBomComplete(Character bomComplete) {
this.bomComplete = bomComplete;
}
When I click the commandbutton I get
11:47:19,270 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (http-steves-172.16.8.26-15081-1) JSF1073: javax.faces.event.AbortProcessingException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=centerForm:j_idt271, Message=Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String)
11:47:19,273 SEVERE [javax.enterprise.resource.webcontainer.jsf.context] (http-steves-172.16.8.26-15081-1) Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String): javax.faces.event.AbortProcessingException: Method not found: data.operation.OperationData@595025a.setBomComplete(java.lang.String)