Mojarra 2.1.6 / Glassfish 3.1.2
I have something like this
<ui:repeat var="item" value="#{bean.items}">
<h:inputText value="#{item.longProperty}"/>
</ui:repeat>
where Item is an object with a Long property
public class Item {
private Long longProperty; // + getters/setters
}
It works fine as long as I’m setting longProperty to something not-null / non-empty.
When I do that, the null input is ignored and the old value is restored.
Similar results for Dates.
It makes no difference if I eliminate the reference to the var/status from the ui:repeat. Even explicitly referencing #{bean.items[0].longProperty} fails the same way.
The same exact h:inputText works fine outside of a ui:repeat and null/empty values work just fine.
Additionally, inside a ui:repeat, empty strings work ok, if the property is a String rather than an object that requires conversion.
To make it even weirder: if I put a valueChangeEvent on the input, I do see that event.getNewValue() returns null when I expect it – yet my setter is called with the old value.
Any idea what’s going on?
Turns out its a Mojarra / JSF implementation bug with ui:repeat
http://java.net/jira/browse/JAVASERVERFACES-1721