我正在开发一个 JSF2 Icefaces Web 应用程序。我有以下看法:
<h:dataTable value="#{myFormBB.userRolesBean.userRoleList}" var="row">
<h:column>
<ice:selectBooleanCheckbox value="#{row.teamUser}" />
保存上述内容时出现以下异常<ice:selectBooleanCheckbox>
。
Application caught instance of: javax.faces.component.UpdateModelException
["http-bio-8081"-exec-9] ERROR com.abc.mp.em.common.ui.exception.handler.ExceptionHandler - error
javax.faces.component.UpdateModelException: javax.el.PropertyNotFoundException: /sections/response/myForm.xhtml @599,78 value="#{row.teamUser}": Property 'teamUser' not writable on type boolean
at javax.faces.component.UIInput.updateModel(UIInput.java:849)
at javax.faces.component.UIInput.processUpdates(UIInput.java:731)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1109)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1109)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1109)
at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:1109)
我已经在支持 bean 中正确定义了属性及其 getter 和设置。
protected boolean teamUser;
public boolean isTeamUser() {
return teamUser;
}
public void setTeamUser(boolean teamUser) {
this.teamUser = teamUser;
}
这是如何引起的,我该如何解决?我需要使用转换器吗?