我想直接从一个命令按钮调用一个setter和传递值。 我的问题是,二传手期待一个字符和JSF,如果它传递回为一个字符串。 有没有“修复”这在前端,而不必过载上我支持bean的setter的好办法?
的commandButton:
<p:commandButton value="SignOff"
actionListener="#{manageItemHandler.dataEntryOp.setBomComplete('Y')}"
rendered="#{speed2Session.isRendered('editManageItemOp')}"/>
从背衬豆的getter / setter:
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;
}
当我单击命令我得到
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)