How to add a vaadin component to vaadin custom widget

Hello
I created simple custom component extends SplitLayoutPanel:


public class ResizePanelWidget extends SplitLayoutPanel {

    public static final String CLASSNAME = "resizepanel";

    public ResizePanelWidget() {

    	super(5);
    	getElement().getStyle().setProperty("border", "3px solid #e7e7e7");
    	
        setStyleName(CLASSNAME);
    }
}

How can I add the Vaadin component into SplitLayoutPanel?

GWT widget SplitLayoutPanel takes isWidget but Vaadin component not extedns isWidget.

I want to do something like this:


@SuppressWarnings("serial")
public class TestvaadinUI extends UI {

	@Override
	protected void init(VaadinRequest request) {
		final AbsoluteLayout layout = new AbsoluteLayout();
		layout.setHeight("100%");
		layout.setWidth("100%");
		setContent(layout);	
		
		ResizePanel rPanel = new ResizePanel();
		rPanel.setHeight("100%");
		rPanel.setWidth("100%");

		[b]
rPanel.setWidget(0, new Label("Test Vaadin Label"), 30);
[/b]
		
		layout.addComponent(rPanel);
		
	}

}

But I do not know how get isWidget from Label.

I found this theme::

https://vaadin.com/forum/#!/thread/199257

But it was 3 years ago.
Maybe something has changed?

Hi,

Nothing has really changed in this regard in the three years. You still can’t use the server side components in GWT code, and you never will (the Label class is a pure server side class).

The client side parts are on their way (still), so there is hope that you can someday use all of the client side Vaadin widgets in your GWT app. For the Label, the client side widget class is VLabel, and that might be so simple that you can actually use it directly. But do note, that it that case the VLabel will be totally separate from any Label component on the server side. If you want your ResizePanelWidget to contain actual Vaadin widgets that correspond to a server side counterpart, you need create a Vaadin Connector and server side component API for you ResizePanelWidget, in order to be able to add Vaadin components inside it.

It’s not too complicated, but it might take some time to understand the concepts involved. There’s a great wiki tutorial you can read:
Creating a simple ComponentContainer