views:

113

answers:

1

Hi,

I am trying to use GWT-Connector in one of my classes to create the connection point to the widgets. Here is what i have:

public class Test extends Composite{

 RequiredData rd = new RequiredData();
 public Test(){
  TextBox t1 = new TextBox();
  t1.setSize("100px", "20px");
  t1.setText("Hi");
  t1.setTitle("textbox");

  CustomShapeRet r = new CustomShapeRet();

  VerticalPanel v1 = new VerticalPanel();
  v1.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE);
  v1.setStyleName("vertical");
  v1.add(r);
  v1.add(t1);
  AbsolutePanel ap = new AbsolutePanel();
  ap.setSize("120px", "100px");
  ap.add(v1, 0, 0);
  Diagram d1 = new Diagram(ap);
  Shape s = new Shape(v1);
  s.showOnDiagram(d1);
  initWidget(ap);
 }
}

When i run my program it is not displaying the vertical panel properly. Here is how it looks: http://www.cs.uofs.edu/~sudhakaras2/absolute,jpg But when i remove the following code:

 Diagram d1 = new Diagram(ap);
 Shape s = new Shape(v1);
 s.showOnDiagram(d1);

it just works fine.

Question:

  1. Is my gwt-connector usage correct?
  2. Do i have to add this absolute to rootpanel for connector to work?
  3. Is there a way to get around this?

Any suggestion will be of great help. Thank you.

A: 

Hi,

I am face this problem as well.. Do u find any solution for it?

guaz
Not really. I tried a lot of stuff sadly nothing seemed to work so i included this bit of code in my main entrypoint class and worked.
sprasad12