get scroll position of panel in vaadin 7.2.6

Hello,
i have declare a panel wich is scrollable and i also declare a clickListener on this panel in order to get the scroll position.
panel.addClickListener(new ClickListener() {
@Override
public void click(ClickEvent event) {
System.out.println("test ==> "+panel.getScrollTop());
}
});

the method “getScrollTop” return always 0 in any position of my scroll, it’s normal ? , how can i get the position of the scroll ?
i use 7.2.6 version of vaadin.server.

Than you for your help

Hello,

I had a similar issue with Vaadin Panel getScrollTop() and getScrollLeft(). The trick is that Panel must have set size to full:

Panel panel = new Panel();
panel.setSizeFull();

Panel panel = new Panel();
panel.setSizeFull();

After setting size of the Panel to full (calling panel.setSizeFull()), then

panel.getScrollLeft();
panel.getScrollTop();
panel.setScrollLeft(...);
panel.setScrollTop(...);

do as what it is expected.

I’m using Vaadin 7.6.6.

Hope this helps.