Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating SmartGWT Layout in Vaadin 7

I want to use a SmartGWT Layout in Vaadin 7. I searched it everywhere; But, couldn't get the correct tutorial or any source code. Can anyone help me in this?

And, I tried in SmartGWT. I created a Layout in SmartGWT.

public class SmartGWTLayout extends Widget {
   public SmartGWTLayout() {
    TabSet tabSet = new TabSet();
    tabSet.setTabBarPosition(Side.TOP);
    tabSet.setWidth(400);
    tabSet.setHeight(200);

    Tab tTab1 = new Tab("Blue", "pieces/16/pawn_blue.png");
    Img tImg1 = new Img("pieces/48/pawn_blue.png", 48, 48);
    tTab1.setPane(tImg1);

    Tab tTab2 = new Tab("Green", "pieces/16/pawn_green.png");
    Img tImg2 = new Img("pieces/48/pawn_green.png", 48, 48);
    tTab2.setPane(tImg2);

    tabSet.addTab(tTab1);
    tabSet.addTab(tTab2);

    VLayout vLayout = new VLayout();
    vLayout.setMembersMargin(15);
    vLayout.addMember(tabSet);
    vLayout.setAutoHeight();

    vLayout.draw();
  }
}

I called the Layout in Vaadin like this.

            SmartGWTLayout aSmartGWTLayout = new SmartGWTLayout();
            vaadinLayout.addComponent((Component)SmartGWTLayout);

And, I'm getting this error

  HTTP Status 500 - java.lang.NoClassDefFoundError: com/google/gwt/core/shared/GWTBridge

  type: Exception report

  message: java.lang.NoClassDefFoundError: com/google/gwt/core/shared/GWTBridge

  description: The server encountered an internal error that prevented it from fulfilling this request.
like image 243
Gugan Avatar asked Feb 26 '13 04:02

Gugan


1 Answers

This is not the right way to use GWT Widget in Vaadin.

Try to follow this tutorial:

http://java.dzone.com/articles/using-gwt-widgets-vaadin-7

http://java.dzone.com/articles/using-gwt-widgets-vaadin-7-0

http://java.dzone.com/articles/using-gwt-widgets-vaadin-7-1

If you use the Vaadin Plugin for Eclipse: https://vaadin.com/eclipse

You can create a new Widget with all the features (necessary classes, xml files and widgetset) at:

Project/New/Other/Vaadin/Widget

like image 162
RAN Avatar answered Sep 30 '22 17:09

RAN