RootPanel slot1 = RootPanel.get("slot1");if(slot1 != null) //add somethingIan http://examples.roughian.com 2009/8/28 ccx163 <[email protected]> > > Many thanks for the explanation, and for your link. I've sent you my > details, so I'll go through your tutorials. > > So how would I implement it so that I can have a single module, and > have that set up the widgets so that they can be used independently? > > At the moment I have implemented it as 2 separate modules, but as we > get more and more modules this is going to get quite large, and a lot > of duplicated code for the server (rpc) calls. > > Maybe your tutorials tell me this, If so then great. I'll get > there..... > > Many thanks. > > > > On Aug 28, 1:18 pm, Ian Bambury <[email protected]> wrote: > > Because your app is giving up when it can't find slot 1. > > It also gives up when it can't find slot 2, but by then it has shown the > > button. > > > > Look in the other window that pops up when you start your app and you'll > see > > > > java.lang.NullPointerException: null > > > > Ian > > > > http://examples.roughian.com > > > > 2009/8/28 ccx163 <[email protected]> > > > > > > > > > Hi, > > > > > I'm just getting to grips with GWT and have created some cool > > > widgets. However, I have a problem. The following illustrates this > > > > > If I have a GWT app that in the 'onModuleLoad()' of the entry point > > > class has the following > > > > > RootPanel.get("slot1").add(new Button ("button")); > > > RootPanel.get("slot2").add(new Label ("label")); > > > > > Then I have an html page with > > > > > <div id="slot1"></div> > > > <div id="slot2"></div> > > > > > Then the button and label show. > > > > > If I just have > > > > > <div id="slot1"></div> > > > > > Then the button shows. > > > > > However, If I just have > > > > > <div id="slot2"></div> > > > > > Then I would expect just the label to show, but it doesn't! > > > > > Any ideas why not? > > > > > My actual application is more complex, but still just adds different > > > widgets to the root panel. As I want to embed these widgets in an > > > existing servlet application I want to call the different widgets on 2 > > > different html pages. So one page would show widget1, and another > > > widget2. This has the same problem as above that widget2 does not > > > show. > > > > > Many thanks > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
