How to solve this issue:
I want to Change key of my bean map with celledit feature from primefaces.
For editing the value of map it works well.
For changing the key i get following error:
javax.el.PropertyNotWritableException: The class 'java.util.HashMap$Node' does not have a writable property 'key'.
editable="true" editMode="cell" >
update=":form:msgs" />
解决方案
The reason that you get an error is that the keys in an entrySet are immutable. The entrySet() method returns a Set. If you look at the javadocs for Map.Entry you will see:
a V getValue() method,
a void setValue(V) method,
a K getKey() method, but
no void setKey(K) method
Basically, the key property is read-only per the JavaBeans convention. That's actually a good thing, because if you could modify a key in an Set you would have the difficult problem of what to do if the new key was the same as the key of another entry in the original map.