I'm using GWT 2.4, SmartGWT 3.0, GWTP 0.7.
I mostly try to stick with SmartGWT widgets for my layout, but I'm trying to add a GWT widget (can be anything from a MapWidget to a ChartWidget from HighCharts or a GWT label) to a tab in the SmartGWT tabset. Then I get the following exception:
Caused by: java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list
This only happens in Dev mode. In production the assertions have been turned off, and my widgets do show up, but it makes it impossible to debug in Dev mode. As I understand it is because I'm mixing SmartGWT and GWT widgets.
Before GWTP, I was able to make this work, because to show my UI I would call draw()
on my root layout, which was a VLayout. Now that I'm using GWTP, it will show my layout for me when I fire the RevealRootContentEvent
, and it will add the layout by calling RootPanel.get().add(...)
, which I think is the reason why I'm having these problems now. All my layouts are still in SmartGWT.
Has anyone experienced the same issues (in the same setup) and how can this be handled?
RootPanel.get().add()
and just use thedraw
method ? Your problem is directly related to theRootPanel.get().add()
call – Jean-Michel Garcia