Widget myWidget = new TextBox();
myWidget.setId("myId");
this is not enough to call DOM.getElementById();

Here you need to make sure that your widget are attached/added to the
RootPanel.
RootPanel.get().add(myWidget);
once this is executed then you can use DOM.getElementById();

regards,
ruds
On Mon, Jan 26, 2009 at 8:13 PM, SoMa <[email protected]> wrote:

>
>
> rudolf michael wrote:
> > you have to make sure that your ID is already there before calling
> > getElementById.
>
> My id is existing. I initialized it in MyAppEntryPoint.java.
>
>
> > In other words make sure that your widget is attached to the document
> before
> > calling this method.
>
> Could you tell me how can I attach my widget to the document?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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