Re: widget's parent does not implement HasWidgets

2011-12-27 Thread Ed
Put a breakpoint in Widget.removeFromParent and see why it throws that exception (at line 204). Apparently your display contains a parent Widget that doesn't implement the HasWidget interface. From your code this isn't clear. -- You received this message because you are subscribed to the Googl

widget's parent does not implement HasWidgets

2011-12-26 Thread mars
hi, i m having trouble with my GWT web app. i use the gwt-presenter module and try to follow it, but it failed at entryPoint file at the line RootPanel.get().add(appPresenter.getDisplay().asWidget()); throw the message as: java.lang.IllegalStateException: This widget's parent

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-20 Thread Shi
Thanks to both, I am reviewing the entire project to understand how to change it. Some things I had not written in the code above for simpler, but in my project the button has the ClickListener..for example. Thanks for your help Shi --~--~-~--~~~---~--~~ You receiv

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-20 Thread gregor
Hi Shi, Both Dean's comments are good advice IMO in principle - I think you definitely need to rethink your approach to this. To help out with the specifics of your case is a little tricky because unfortunately it is still very unclear exactly what you are trying to achieve. OK: > If in Login c

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-20 Thread Dean S. Jones
Encapsulate your components/Composites, go back to basic OO principals: What is the role of this component, what methods(Actions) does it expose, what properties are gettable/settable, what events/ Listeners does it fire. Imagine it is a "black box", base the public API on that "service contract".

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-20 Thread Shi
Hi, thank you for answers! So, I try to explain better. I have a menu created by MenuHome that contains items, HOME and LOGIN. Until yesterday I had left the code as that shown by gregor, but this does not work as I will. If in Login clicking on the button loginButton want to call another Widget (

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-19 Thread Dean S. Jones
Just a note on design: Composite is a minimalist Facade, a front to hide the implementation details of a new component. initWidget() could be passed a Button just as well as a complicated Panel hierarchy, it doesn't have to have a collection of Widget children. As a facade, you should never expos

Re: Exception: This widget's parent does not implement HasWidgets

2008-09-19 Thread gregor
rying to do? regards gregor On Sep 20, 2:33 am, Shi <[EMAIL PROTECTED]> wrote: > Hi! > I'm trying to make my class MenuHome as a container through the > abstract class com.google.gwt.user.client.ui.Composite.java  but I > have always the same problem: > This widget's

Exception: This widget's parent does not implement HasWidgets

2008-09-19 Thread Shi
Hi! I'm trying to make my class MenuHome as a container through the abstract class com.google.gwt.user.client.ui.Composite.java but I have always the same problem: This widget's parent does not implement HasWidgets. In the main class I want a panel that could contain all the widge