Why are you adding a DialogBox as a child of another widget to begin with?

On Monday, February 4, 2013 11:36:20 AM UTC+1, membersound wrote:
>
> Hi,
>
> what does a "IllegalStateException" mean for a DialogBox?
>
> java.lang.IllegalStateException: This widget's parent does not implement 
> HasWidgets
>     at 
> com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:204)
>     at com.google.gwt.user.client.ui.PopupPanel.show(PopupPanel.java:1016)
>     at com.google.gwt.user.client.ui.DialogBox.show(DialogBox.java:432)
>     at com.google.gwt.user.client.ui.PopupPanel.center(PopupPanel.java:523)
>
>
> I'm trying to just show the following custom dialog composite:
>
> MyDialog.java:
> class MyDialog extends Composite {
>     @UiField
>     DialogBox dialog;
>
>     public MyDialog() {
>         initWidget(..);
>         dialog.show(); //Exception
>     }
> }
>
> <g:FlowPanel>
>   <g:DialogBox ui:field="dialog">
>     <g:HTMLPanel>somestuff</g:HTMLPanel>
>   </g:DialogBox>
> </g:FlowPanel>
>
>
> MyModule.ui.xml (main module with Entry point):
> <my:MyDialog />
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to