How to wrap the GWT SplitLayoutPanel in Vaadin?

I am a newbie of Vaadin. Could someone tell me how to wrap GWT SplitLayoutPanel in Vaadin in detail? I would like to try to use it as the main layout. Any suggestions would be appreciated.

I assume you have a GWT SplitLayoutPanel and would like to change it to a custom Vaadin widget. If that is the case, I have tried to do something similar, see my post https://vaadin.com/forum#!/thread/5063329

I cannot do it with a LayoutPanel (e.g. DockLayoutPanel), my post is on whether this is possible at all with any LayoutPanels (so far no responses).

However, if you use a regular (non-layout) panel (e.g. DockPanel), you should be able to wrap it into a Vaadin widget, following Chapter 16. But then there will be resizing issues when the browser window changes in size.

Thanks.

My problem is that I don’t know how to define and implement those RPCs between server/client side for GWT SplitLayoutPanel.

For my post re using layout panel in building a custom GWT widget. I finally get it to work.

I have built a custom GWT widget, which is based on extending a DockLayoutPanel. In this GWT widget, I do lots of client side intensive graphic operation (that’s why I want it to be in GWT, without taking a roundtrip to the server unless I want communication to happen). I managed to wrap it with the Vaadin connector and it becomes a custom Vaadin widget that I can embed in my Vaadin server-side code. See update to my post on this, which I will close soon.

In my previous post, I can do it only with extending a non-layout panel such as DockPanel, but not with DockLayoutPanel. I made a mistake when I put into into a Vaadin server-side program. The problem is not with the GWT widget or client side issues.

I expect it should work with SplitLayoutPanel as well.

Back to your question on how to define and implement those RPCs between GWT client side, and Vaadin server side. My suggestions are:

  1. Create a very simple Vaadin server side app (say MyVaadin, in a package say "com.examples).
  2. Follow Chapter 16 of Book of Vaadin to ask Eclipse IDE (with Vaadin) to generate a custom Vaadin widget for you (let’s say you name it MyGwt), with the connector and everything Vaadin can throw in. This should create MyGwt (which extends AbstractComponent) on the server side (under your package “com.examples”), and also and a package on the client side "com.examples.client’ which should contain the following java programs: MyGwtClientRpc, MyGwtServerRpc, MyGwtConnector, MyGwtState, MyGwtWidget).
  3. Create your Gwt widget which extends a LayoutPanel, say SplitLayoutPanel. Then have it implemented a few methods the Vaadin connector is expecting.
  4. Then you are done:) Have fun.

The instructions in Chapter 16 work fine. Just follow it, generate the connector, and try to link it with your simple Gwt widget. Dont do anything fancy until you get it to work first. The RPC’s are defined when they are generated. You just need to make sure your Gwt Widget supports a few things the codes are expecting. Then you can modify the server and client side RPC’s.