I agree with djabi, that seem like a bad way to use GWT.

On Jan 26, 9:24 am, Djabi <[email protected]> wrote:
> Why don't you try
>
> void onModuleLoad() {
> RootPanel.get().add(new HTML("<p>Hello<p>World"));
>
> }
>
> If you really want to deal directly with the dom look at
> com.google.gwt.user.client.DOM but this is probably not the way you
> want to use GWT
>
> On Jan 25, 11:07 am, markww <[email protected]> wrote:
>
>
>
> > Ah actually it looks like this is needed:
>
> >     doc.getBody().appendChild(p);
>
> > Thanks
>
> > On Jan 25, 10:04 am, markww <[email protected]> wrote:
>
> > > Hi,
>
> > > I'm trying to use the new DOM classes, I'm not getting even a simple
> > > sample to work. I'd like to just try something like this:
>
> > > public class TestProject implements EntryPoint {
> > >     public void onModuleLoad() {
> > >         Document doc = Document.get();
> > >         ParagraphElement p = doc.createPElement();
> > >         p.setInnerText("hello!");
> > >     }
>
> > > }
>
> > > Is this the right way to go? Do I still need to call doc.appendChild
> > > (p)? If I try that, I get an exception:
>
> > > com.google.gwt.core.client.JavaScriptException:
> > > (HIERARCHY_REQUEST_ERR): HIERARCHY_REQUEST_ERR: DOM Exception 3
>
> > > is there a guide to DOM programming using GWT by any chance?
>
> > > 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.

Reply via email to