Writing custom implementations of VTree and VScrollTable

'Hi all,

For the past week, I’ve been implementing a custom drag and drop API for Vaadin for use within a Web browser embedded with Berkelium. What this allows me to do is to drop content from a desktop application into a Vaadin web application which runs embedded within the host application. I had to write some custom client side widgets and I had to learn how the client-side to server-side communication mechanisms work, but this was actually quite easy.

During the course of my experiment, I had to create a custom VTree implementation which can capture and propagate events which are currently not propagated by Vaadin (such as a drag start event). My initial idea was to subclass VTree. However, some fields of that class (such as the mouseDownEvent in the VTree.TreeNode class) are marked as private with no getters. I found that I had no option but to create a new class of the same name with cut and paste code which is obviously not very elegant and quite brittle.

I wonder if going forward it would be possible for the Vaadin API to expose some of the fields using accessor methods (or mark the fields as protected) so that they can be used by a subclass.


Guillaume Belrose.