Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid second call of getBody() crash in SGWT 4.0

$
0
0
Hi,
I'm trying smartgwt 4.0p from 2013-08-28
I have FF 23 ang GWT 2.5.1

If I create Listgrid, the first call of getBody() is OK, but the second call cresh with this error:

Code:

13:26:27.422 [ERROR] [mainModule] 13:26:27.421:WARN:Log:Specified ID: MyGrid_body collides with the ID for an existing SmartGWT component or object. The existing object will be destroyed and the ID bound to the new object.
Here is the complete example:

Code:

@Override
public void onModuleLoad() {
  final ListGrid grid = new ListGrid();
  grid.setID("MyGrid");
  grid.setWidth100();
  grid.setHeight100();

  grid.setFields(new ListGridField("field1"), new ListGridField("field2"));
  grid.addDrawHandler(new DrawHandler() {
       
        @Override
        public void onDraw(DrawEvent event) {
                SC.say("Width : " + grid.getBody().getInnerWidth());
                SC.say("Height: " + grid.getBody().getInnerHeight());
        }
  });

  grid.draw();
}

Thanks Pavel

Viewing all articles
Browse latest Browse all 4756

Trending Articles