Tracking SplitPanel splitter position. Is it possible?

Hi people,

I was searching on how to keep track of the splitter position in a splitPanel. The SplitterClickListener doesn’t seem to provide what I need.

Thoughts?

JS.

Hi,

unfortunately there is no built in event/listener for the splitter position change. Please file an enhancement ticket to the Vaadin trac about the feature request.

In the meantime, the following server-side ‘hack’ would do the job:

 VerticalSplitPanel vsp = new VerticalSplitPanel() {
            @Override
            public void changeVariables(Object source,
                    Map<String, Object> variables) {
                super.changeVariables(source, variables);
                System.err.println(getSplitPosition());
            }
        };
        vsp.setImmediate(true);

Do note that the units of the value the getSplitPosition() returns are percentage by default.

-Tepi

Done.


http://dev.vaadin.com/ticket/7379

Thank you so much, the «hack» works perfectly.

JS.