Hi Just found out why this was happening. I narrowed the problem down to a certain widget.
It turns out that what I had done was extend Composite, but then called setElement(...) rather than initWidget(...). I changed the call to initWidget(...) (and wrapped everything in an HTML Panel - I'm using UI Binder) and it seems to work now! Just in case someone else has this issue I thought it would be worth mentioning :) Phill On Feb 26, 11:33 am, Phill Sacre <phillip.sa...@gmail.com> wrote: > Hi > > I have an issue when I try to remove / add a widget. > > The page looks something like this: > > <div id="header"></div> > <div id="content"></div> > <div id="footer"></div> > > Essentially what I want to do is change the value of the "content" div > when someone clicks on a menu item. > > So I have created a Command which looks like this: > > public void execute() { > RootPanel panel = RootPanel.get("content"); > Widget w = panel.getWidget(0); > panel.remove(w); > panel.add(newWidget); > > } > > (Slightly simplified but you get the idea) > > Unfortunately I then get this error message: > > (TypeError): this$static is null > stack: > $onDetach(null)@http://localhost:8080/app/3134230FB19C57076B5BB4A609D9E207.cache.html... > > I'm using Firefox 3.6, I noticed there was another issue with the menu > bar which I needed to add in a native method to fix. > > If anyone has any suggestions I'd be very grateful! I've only been > using GWT for a few days so still finding my feet with it. > > Thanks, > Phill -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.