Werner Punz wrote:


I think I found the affected part of the datascroller.
The think is, that the datascroller saves the current scroller
position over its id in the request parameter map.

But once the event is not triggered by the scroller,
the position is not saved over its name in the global request parameter map and basically the scrollers position setting routines in the
renderer are not triggered that way.

I will try to fix that in the weekend against the 1.0.9 sources.
I am not entirely sure about the best way to fix that.
But my best guess is the introduction of a saveState attribute, which
restores last position state from the session, if set to true, once the
renderer of the scroller runs against an empty attribute.

That way you can turn on the savestate restoration selectively upon a
given state of a backend bean.
Because often you dont really want to have the state safed.

I would rather not having to doctor around at the original sources yet or having to implement yet another component, since my schedule still is too tight, but oh well... That´s life.

Guess I have to answer myself again.

Well as it seems it is not really fixable by me at the moment, the problem is tied to the way JSF manages the requests. I am sure somebody with more knowledge about the internals might be able to fix it, but with my limited knowledge of things it would take too long.

There might be a workaroud however to get around that problem.
First of all you normally have those form like operations within a data table for triggering a small operation. I noticed that the datatable/datascroller unlike plain forms stays at the last stage at a page refresh and does not go back to the state before, like most pages/components do. The workaround to the problem of keeping a constant state of the scroller wile triggering operations might be, to bind ajax to checkboxes and send requests via ajax to the server, which marks the affected datasets in the session.

Then you can trigger the operation as well via ajax and after the operation is successfully finished a simple page refresh is possible.
The datamodel in the backend however probably has to be refreshed
by the ajax code if it is buffered or cached.

This solution should work around this rather nasty problem.

Reply via email to