I have a Map and made a form as follows:
//...
<b:form>
<p:dataTable value="#{mb.map}" var="price">
<p:column>
<h:outputText value="#{price.key.description}"/>
</p:column>
<p:column>
<b:inputText label="Price"
value="#{price.value}"/>
</p:column>
</p:dataTable>
<b:commandButton action="#{mb.save}" value="Save"/>
</b:form>
//...
When the form loads the #{price.value}
field is correctly filled with the value for each item in the map, but when I hit "Save", before it enters the mb.save()
function, it breaks with the following error:
javax.el.PropertyNotWritableException: The class 'java.util.HashMap$Node' does not have a writable property 'value'.