you could try something like this

           RootPanel.get("entries").setInnerHTML("");

the clear() method doesn't work as you expected because it comes from
HasWidgets and it removes only the Widgets that where added to the
panel with add()

if   setInnerHTML(""); doesn't work as you wanted it, you could try to
make "loading" invisible
RootPanel.get("entries").getElement.getStyle().setProperty
("display","none");

Hope it helps
Good Luck


On Dec 14, 4:20 pm, Joe <[email protected]> wrote:
> Well Dennis,
>
> First, I need to know the following tag <div id="entries"> is the main
> tag in your Hosted HTML file??? if so, you should be able to remove
> everything inside it with the RootPanel.get().clear() method.
> However, if the tag <div id="entries"> was generated by the GWT
> compiler from a FlowPanel, or FocusPanel or any other panel, than you
> should call the panel.removeChild() method, which Im sure you're aware
> of that already :)
>
> If none of the above is your case, then please be more clear about it
> and if possibly, you could post your Java code here.
>
> Regards,
> Joe
>
> On Dec 14, 4:08 pm, Jan Ehrhardt <[email protected]> wrote:
>
>
>
> > RootPanel's clear method only removes GWT widgets. I would recommend to
> > prevent the mixing of HTML in your host page and GWT widgets. Use a label
> > widget instead.
> > If this isn't an option, you can do:
>
> > Element element = RootPanel.get("entries").getElement();
> > DOM.removeChild(element, 0);
>
> > This will manipulate the DOM directly and thus it's not recommended.
>
> > Regards
> > Jan Ehrhardt
>
> > On Sun, Dec 13, 2009 at 11:09 PM, Dennis Madsen <[email protected]> wrote:
> > > I've this HTML code:
>
> > >        <div id="entries">
> > >                <div class="loading">Loading guestbook entries..</div>
> > >        </div>
>
> > > When calling a "RootPanel.get("entries").clear();" I expected that all
> > > childs inside this div will be removed. But it doesn't. How can I
> > > really clear the div?
>
> > > --
>
> > > 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]<google-web-toolkit%2Bunsubs
> > >  [email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.

--

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