当事件组件被触发时,我正在使用richfaces并尝试在bean中调用方法。我想直接调用“set”属性。
xhtml:
h:selectBooleanCheckbox value="#{!mbean.myFlag}" immediate="true">
<a4j:ajax event="click" immediate="true"></a4j:ajax>
</h:selectBooleanCheckbox>
豆:
@SuppressWarnings("serial")
@ManagedBean(name = "mbean")
@ViewScoped
public class MyMbean implements Serializable {
private Boolean myFlag;
...
/** @see #myFlag*/
public Boolean getMyFlag() {
return flagCartaEmitida;
}
/** @see #myFlag*/
public void setMyFlag(Boolean myFlag) {
this.myFlag= myFlag;
}
...
单击复选框时出现错误:
javax.faces.component.UpdateModelException: org.apache.myfaces.view.facelets.el.ContextAwarePropertyNotWritableException: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation
谢谢。