Here's my code (from a widget that extends Composite):
@Override
protected void onLoad() {
// Wait until elements are attached to DOM to enhance them.
fontFamilyTextBox.getElement().setId(GQueryHelper.getUniqueIdForElement());
$("#" + fontFamilyTextBox.getElement().getId()).as(Enhance).fontFamilyBox();
}
At runtime, this results in the following exception:
Caused by: java.lang.AssertionError: A widget that has an existing parent
widget may not be added to the detach list
at com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose(RootPanel.java:136)
at com.google.gwt.user.client.ui.TextBox.wrap(TextBox.java:69)
at gwtquery.plugins.enhance.client.fontpicker.FontPickerFactory.create(FontPickerFactory.java:32)
at gwtquery.plugins.enhance.client.fontpicker.FontPickerFactory.create(FontPickerFactory.java:1)
at com.google.gwt.query.client.plugins.Widgets.widget(Widgets.java:96)
at com.google.gwt.query.client.plugins.Widgets.widgets(Widgets.java:74)
at gwtquery.plugins.enhance.client.Enhance.fontFamilyBox(Enhance.java:104)
at gwtquery.plugins.enhance.client.Enhance.fontFamilyBox(Enhance.java:100)
at com.acme.widget.MainThemePropertyEditor.onLoad(MainThemePropertyEditor.java:114)
at com.google.gwt.user.client.ui.Composite.onAttach(Composite.java:171)
Original issue reported on code.google.com by ian.spri...@gmail.com on 26 Apr 2013 at 12:52
Original issue reported on code.google.com by
ian.spri...@gmail.com
on 26 Apr 2013 at 12:52