我收到错误
javax.el.PropertyNotFoundException:/member/apps/cms/edit.xhtml @ 228,49 value =“#{props.key}”:在类型java.util.HashMap上找不到属性’key’ $尝试显示下面的数据表时的值.
这是我的contentEditorBacking的相关部分:
@ManagedBean
@ViewScoped
public class ContentEditorBacking {
private Map properties = new LinkedHashMap();
public Collection getProperties() throws Exception{
return properties.values();
}
public static class Properties{
private String key;
private String value;
public Properties(String key, String value) {
super();
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String toString() {
return "key=" + key + ", value=" + value + "";
}
}
}
如何从我的属性映射中访问键值?