I have a superclass Person
:
public class Person {
public abstract Type getType();
}
I have 2 subclasses of it:
<
This is caused by a bug in state management of Mojarra's <ui:repeat>
which will expose when you use EditableValueHolder
components (input fields) inside the <ui:repeat>
as well. This is fixed as per issue 3215. The fix is available in Mojarra 2.2.7 and for JSF 2.0/2.1 backported to Mojarra 2.1.29 as per issue 3221. So upgrading to at least that version (or just the latest available as per Mojarra homepage) should do it.
Otherwise, your best bet is to replace <ui:repeat>
by <c:forEach>
.
In my case I didn't had the option to upgrade Mojarra's version and to avoid c:forEach (that causes many side-effects when used with ui optionally rendered components) I replaced ui:repeat with a p:dataList and it worked. You'll have to do some CSS styling to hide the bullets but I think it's worth the price. I hope it helps someone ;)