【发布时间】:2012-08-23 17:03:12
【问题描述】:
在我的 JSF 页面中,我有以下内容:
<h:outputText value="#{entity[column.key]}" />
我的实体豆(简单版):
public class Entity implements Serializable {
private int id;
private Entity entity;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Entity getEntity() {
return this.entity;
}
public void setEntity(Entity entity) {
this.entity = entity;
}
}
当我的 [column.key] 变量保存为值“id”时,将显示实体的 id 属性。 当我的 [column.key] 变量保持为值“entity.id”时,我收到一个错误:
/WEB-INF/flows/parametersPage/parametersPage.xhtml @51,66 value="#{entity[column.key]}":在 eu.acsone.agc.db 类型上找不到属性“entity.id” .entity.Entity
debug的时候看到bean中设置了entity,所以不为null。
希望大家帮忙,谢谢!
我正在使用: * 莫哈拉 2.1.7 * Primefaces 3.3.1
【问题讨论】:
标签: java spring jsf primefaces