As you might have noticed with newer versions of Mojarra (2.2.6+) some RichFaces components do not work well when placed inside ui:repeat (MyFaces are not affected). This applies to functionality where components switch between different things (changing tabs, sorting columns in a table) - the full list of issues we track can be seen here. A reliable workaround is to use a4j:repeat instead.

 

The problem occurred with fixing JAVASERVERFACES-3152 which changed the way component state is being saved and restored inside ui:repeat. As far as I understand there isn't a clear specification on how ui:repeat is supposed behave but the state saving mechanism is a core part of the JSF framework and we relied on the way it worked before, whether it was intended or not. The impact for RichFaces is that interactive components don't "remember" their previous state - for example expanding a collapsed rich:collapsiblePanel will not trigger a PanelToggleEvent for its @toggleListener because the information that the panel is collapsed is not available to the component. I have been trying to resolve the issue with the Mojarra team but so far we've gotten nowhere (I was suggested a workaround but it made the state apply to every component inside ui:repeat, not just the one - i.e. collapsing one panel would collapse all panels), while the impact to JSF is not as big and they do not need to make sure our components work I do believe that the current behavior is a bug since I've been able to observe some undesirable results in pure JSF environment.

 

Currently there is a JIRA ticket filed - JAVASERVERFACES-3833, if this issue affects your application consider voting for it.