Hi
I'm trying to add gwt components to smartGwt tabs. But It's throwing runtime assertion error.
Uncaught JavaScript exception [uncaught exception: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list] in , line 0
I did lot of ground worklike
1) Calling draw on smartTabSet after attaching root.
Throws :
Adding already drawn widget:isc_OID_21 to new parent:isc_OID_22. Child has been cleared so it can be drawn inside the new parent.
2) Shuffling the component creation.
3) Adding to smartGwt wrappers
But no use. This case is loading the tabs. But when I select second tab, the assertion error is coming. I'm following similar posts in this forum.
Please let me know how can add simple smartGWT Tabs to RootPanel.
my samplecode:
--------------------
TabSet tabSet = new TabSet();
HLayout wrapper = new HLayout();
wrapper.setWidth100();
tabSet.setWidth(580);
tabSet.setHeight(400);
Tab smartTab1 = new Tab("GWT Tab");
Canvas tabPane1 = new Canvas();
tabPane1.setWidth100();
tabPane1.setHeight100();
tabPane1.addChild(new com.google.gwt.user.client.ui.Label("hi-tab1"));
smartTab1.setPane(tabPane1);
Tab smartTab2 = new Tab("Another Tab");
Canvas tabPane2 = new Canvas();
tabPane2.setWidth100();
tabPane2.setHeight100();
tabPane2.addChild(new com.google.gwt.user.client.ui.Label("hi-tab2"));
smartTab2.setPane(tabPane2);
tabSet.setTabs(smartTab2, smartTab1);
tabSet.selectTab(0);
wrapper.addMember(tabSet);
tabSet.draw();
RootPanel.get().add(wrapper);
tabPane1.redraw();
-------------
-raghu
I'm trying to add gwt components to smartGwt tabs. But It's throwing runtime assertion error.
Uncaught JavaScript exception [uncaught exception: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list] in , line 0
I did lot of ground worklike
1) Calling draw on smartTabSet after attaching root.
Throws :
Adding already drawn widget:isc_OID_21 to new parent:isc_OID_22. Child has been cleared so it can be drawn inside the new parent.
2) Shuffling the component creation.
3) Adding to smartGwt wrappers
But no use. This case is loading the tabs. But when I select second tab, the assertion error is coming. I'm following similar posts in this forum.
Please let me know how can add simple smartGWT Tabs to RootPanel.
my samplecode:
--------------------
TabSet tabSet = new TabSet();
HLayout wrapper = new HLayout();
wrapper.setWidth100();
tabSet.setWidth(580);
tabSet.setHeight(400);
Tab smartTab1 = new Tab("GWT Tab");
Canvas tabPane1 = new Canvas();
tabPane1.setWidth100();
tabPane1.setHeight100();
tabPane1.addChild(new com.google.gwt.user.client.ui.Label("hi-tab1"));
smartTab1.setPane(tabPane1);
Tab smartTab2 = new Tab("Another Tab");
Canvas tabPane2 = new Canvas();
tabPane2.setWidth100();
tabPane2.setHeight100();
tabPane2.addChild(new com.google.gwt.user.client.ui.Label("hi-tab2"));
smartTab2.setPane(tabPane2);
tabSet.setTabs(smartTab2, smartTab1);
tabSet.selectTab(0);
wrapper.addMember(tabSet);
tabSet.draw();
RootPanel.get().add(wrapper);
tabPane1.redraw();
-------------
-raghu
Comment