-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I got a Listbox here where no items are selected.
I scroll to the middle of the listbox.
Then, I refresh its model (via lb.setModel(model);) which causes the listbox to automatically scroll back up.
Is there a way to save the last position of the listbox scroll bar and set it as the "new" scroll position after refreshing the listbox?
I think your problem is to identify which listbox item is in view before the refresh because you can always use :-
Clients.scrollIntoView(comp)
To reposition the listbox.
But which one is in view? What I mean her is that if they have not selected anything then which item is in view? The top one displayed, the middle or the bottom one? There are multiple items in view depending on how many of the total listbox entries your ZUL display at any one time.
Best of luck. Perhaps have a mold="paging" listbox instead?
Asked: 2011-10-06 09:54:29 +0800
Seen: 305 times
Last updated: Oct 06 '11