Integrating SmartGWT Layout in Vaadin 7
Asked Answered
F

1

6

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.
Faenza answered 26/2, 2013 at 4:43 Comment(2)
Some one please answer this.!Faenza
That's SmartGWT layout, because a "smart GWT layout" means something else for me (opposite of "dumb GWT layout!). I edited the question to fix that.Buckra
E
1

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

Elegist answered 27/2, 2013 at 12:1 Comment(3)
Oops.. It seems to be tough to add a smart GWT widget.. Did u try that? worked for u?Faenza
i am working on it... but it does not seem that complicated. the tutorial is very helpful in this situation ;). are you using the vaadin plugin for eclipse? than you can easily create a gwt widget with a small example....very helpful for understanding ^^Elegist
Yes. I'm using vaadin plugin for eclipse.Faenza

© 2022 - 2024 — McMap. All rights reserved.