Hello, first of all very thanks to the Glassfish team for the great job done.
We found components added dynamically are not restored if they are inside a ui:repeat or h:dataTable (or any UIData). If the dynamic component is out of any UIData works properly.
I attach a simple test case.
The problem seems to be an inconsistency in the client IDs saved in the state map. In 2.1.6 the code line:
returns always false because finalCur.parentClientId is of type 'fmain:data:0:item' and target clientId is 'fmain:data:item' (without the ':0:')
I test 2.1.7 and 2.1.8 but seems to have the same problem. Maybe the problem is related to
JAVASERVERFACES-2283 or JAVASERVERFACES-2383 but not sure.