Here is the scenario:-
ControllerBean:-
private List<Attribute> attributeList;
//setter getters of the attributeList
Attribute:-
private String attributeName;
private String attributeValue;
//setter getters of the attributeName and attributeValue
JSF code:
<ui:repeat var="attribute"
value="#{controllerBean.attributeList}">
<h:outputLabel value="#{attribute.attributeName}"/>
<h:inputText value="#{attribute.attributeValue}">
</ui:repeat>
The issue:-
Everything works fine, all the values are binded with the list. When the attributeValue is filled in the text-box its updated in the corresponding attribute. When I change the value of the attribute, then too its reflected in the backing bean.
But when i try to clear the contents of the text-box then it does not set the attributeValue to empty string (or null). It keeps the previous filled value in the bean. As a result the user can never update the value of the specific attribute to null.
Any idea why? And what should I do to resolve this?