How to add GWT components in Vaadin 7?

Hi all,

I need to use GWT components in vaadin 7.

Like we do in vaadin 6 adding components to layouts and MainWindow,

  VerticalLayout layout = new VerticalLayout();

  Button button = new Button("Click Me"); 

  layout.addComponent(button);

It will just add the button component to verticalLayout.

How to add the GWT components to VerticalLayout in vaadin 7.

  VerticalLayout verticalLayout = new VerticalLayout();
	
  DisclosurePanel panel = new DisclosurePanel();
	
  verticalLayout.addComponent(); 

Is there any code sample for integrating GWT components in vaadin 7.

Thanks in advance for your kind reply.

regards,
Aravind

Hi Aravind
Vaadin and GWT differ in programming paradigms so that with GWT you build the model of your UI directly on the client side code where in Vaadin the UI model is constructed on the server-side but the internal mechanisms of Vaadin mirror the same model automatically to the client/browser. This is possible because all Vaadin Components have interconnected server (Java) and client-side (Java/GWT) counterparts.

To get a GWT widget working with Vaadin, you’ll first need to make a Vaadin Component out of it. Since you already have the client side implementation (DisclosurePanel), you’ll need to create the server-side counterpart for it and handle the communication between the two. You can find more information on this in
Vaadin Sampler
and the
Book of Vaadin

Tomi

Also check out
this link
, under the section “Custom widgets” for some tutorials

Thanks for your replies.