dev@javaserverfaces.java.net

UI:repeat and partial updates

From: Michal Petrov <mpetrov_at_redhat.com>
Date: Tue, 2 Dec 2014 08:33:02 -0500 (EST)

Hi all,

issue #3152 broke many RichFaces components and I've been trying to fix that, I've filed #3452 but that was closed as "Working as intended" with a suggested workaround.

I've been trying to work with that but came to the conclusion that the workaround (rerendering the entire ui:repeat) is not the way to go. What we need is components inside ui:repeat to behave the same way as they do outside but given the nature of the ui:repeat there exists only one ComponentStateHolder shared among all rows, so rerendering the ui:repeat will make all its rows apply the saved state. For example we have a dataTable that allows sorting - prior to 2.2.6 we could sort each table independently, now if we rerender the entire component all tables will be sorted. Similar thing happens in the reproducer I provided for #3452, with the workaround - the messages display correctly for the first row, but not for the second one, because the states get mixed up.

Is there a way to somehow keep multiple states separate within one ComponentStateHolder? Or is this simply not going to work the way we'd like?

Thanks in advance,
Michal Petrov