BUG: HLayout.getDropComponent not called/unable to overwrite

Hello.
I think it’s a bug but posted over here, maybe there is a workaround.

On a hlayout I need to know when a component is dropped together with the component and it’s position.

From docs I found that:
“When canDropComponents is true, getDropComponent method will be called when a component is dropped onto the layout to determine what component to add as a new layout member.”

It says also to override the method for specific behavior. Problem is that it’s never called.

Oh by the way I didn’t forgot to call setCanDropComponents(true);

Is there something I could miss or it’s a bug?

Also: any workaround for this, as addDropHandler is called but I don’t know how to get the dropping component instance?

Humm still unable to make it work as intended, but found a workaround by adding

addDropHandler(new DropHandler() {
	public void onDrop(DropEvent event) {
		Canvas dragTarget = EventHandler.getDragTarget();
		if (!getDropComponent(dragTarget, getDropPosition())) {
			event.cancel();
		}
	}
});

listener on the hlayout.

Now my redefined getDropComponent is called as it should.

Still I think it’s a bug…

You can now override Layout.getDropComponent(..). Change is in SVN.

Sanjiv