I have a Richfaces listShuttle component that I need to have the source values (left side) sorted. For this purpose, after the value of the component has changed, I have a backing bean method to sort the elements, and the I want to rerender the listShuttle.
the xhtml code:
<a4j:region>
<rich:listShuttle id="#{id}_listShuttle"
sourceValue="#{bean.displayedItems}"
targetValue="#{bean.selectedItems}" var="item"
fastOrderControlsVisible="false" orderControlsVisible="false"
fastMoveControlsVisible="false"
style="margin-right:15px;margin-bottom:15px;">
<f:converter converterId="#{converterId}" />
<a4j:support event="onlistchanged" action="#{bean.sortList}"
reRender="#{updateId}, #{id}_listShuttle" />
<rich:column>
<h:outputText value="#{item.name}" />
</rich:column>
</rich:listShuttle>
</a4j:region>
It is a component I use in more places, so I pass some parameters to it.
The problem is that the action action="#{bean.sortList}"
is executed after the rerender phase. I want this action to be executed before the rerender phase.
The order of the actions is this: - getDisplayedItems - setDisplayedItems - sortList
Any idea how to make the listShuttle rerender after the sortList action?