It seems that I finally have found an easy solution to the problem.
The state of the datamodel and the datscroller seems to be preserved
if there is no explicit forwarding set in the faces-config, thus
only a refresh with different parameters is issued.
I will try to give an example: I have a datatable with a connected
datascroller with a paginator:
The table has a command link somewhere
<h:commandLink action="#{DiffsyschangelogMaster.selectForOperation}">
<h:outputText id="selected" value="[x]"
rendered="#{bean.selectedForOperation}" />
<h:outputText id="notselected" value="[ ]"
rendered="#{!bean.selectedForOperation}" />
<f:param name="beanId" value="#{bean.id}" />
</h:commandLink>
The problem is now, if there is an explicit action from
#{DiffsyschangelogMaster.selectForOperation} value which is covered by
the faces-config, a full cycle is issued, that means that model
scroller resets to 1 due to internal handling of the objects (there
seems to be an interim page, which resets the data model position and
generates new models between encodeBeging and renderChildren, this looks
like a bug or unwanted sidebehavior to me).
The main difference is if you set the result value to something bogus,
which is not covered by the faces config... a simple form refresh with
is issued which recoveres the old model values if the
preserveDataModel="true" is set to true and hence the scroller position
is recovered and rendered anew with the old and the changed values.
No patch to the current sourcebase is needed nor do we need a new
scroller, the existing one seems to do the job just fine.
Werner