It's possible but I wouldn't call it "alright" because it's illegal to
attach block elements to inline elements and therefore <span>
shouldn't be used as panel element even if you never plan to add any
other widgets.

Use Document.get().getElementById("loadingMessage") to get the element
and then use either Label.wrap() and setVisible() or use
setPropertyBoolean("visible", false) directly. I prefer the former.


On 12 Sep., 13:01, "Fred Janon" <[EMAIL PROTECTED]> wrote:
> My HTML page is like this:
>
>   <body>
>     <span id='loadingMessage'>Loading! Please wait...</span>
>     <div id='eventForm'></div>
> </body>
>
> In my code I use a RootPanel to hide the "Loading" message and another one
> to build the UI. Is it alright to use a RootPanel built on a "span" element?
>
> public void onModuleLoad()
>     {
>      VerticalPanel vPanel = new VerticalPanel();
>      vPanel.addStyleName("widePanel");
>      vPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
>
>      EventForm eventForm = new EventForm();
>      vPanel.add(eventForm);
>
>      // Add the Event Form to the RootPanel
>      Panel rootPanel = RootPanel.get("eventForm");
>      rootPanel.add(vPanel);
>
>      Panel loadingMessage = RootPanel.get("loadingMessage"); // *<==== is
> this OK?*
>      loadingMessage.setVisible(false);
>     }
>
> Thanks
>
> Fred
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to