I'll try it out! I was under the impression that the HTML widget did
not actually write to the HTML file, and so RootPanel.get(id) would
not work properly.
Thanks!
--Adrian
On Sep 5, 3:14 am, Pierre Mage <[EMAIL PROTECTED]> wrote:
> Good morning,
>
> Do you mean doing something like this (it works fine):
>
> Spike.html:
> <html>
> ...
> <body>
> <div id="spike"></div>
> ...
> </body>
> </html>
>
> Spike.java:
> public class Spike implements EntryPoint {
> public void onModuleLoad() {
> // gets the div from the host page and adds a HTML widget into
> it
> RootPanel.get("spike").add(new HTML("<div id=\"myHtml\"></div>"));
> // gets the div from the HTML widget and adds a Label widget
> into it
> RootPanel.get("myHtml").add(new Label("Hello World!"));
> }
>
> }
>
> --
> Pierre
>
> On Sep 3, 9:30 pm, Adrian Benton <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have been playing around with GWT and am very new to it. The
> > webpage I am trying to construct is essentially made up of a header, a
> > navigation sidebar, and a main page. Clicking on any of the buttons
> > on the sidebar will display new content on the main page. In order to
> > do this, I make a remote procedure call which returns an HTML object
> > whenever a button is clicked, and this HTML object is then placed in
> > the main page area (via RootPanel.get("main").add(newContent);). This
> > works fine if I want to simply display HTML in this area, however, I
> > would like to also include GWT widgets in this content area as well.
>
> > I was thinking that I could do this by altering the HTML to include
> > placeholders where these widgets could be inserted, then insert them
> > via the same method as I insert the HTML object into the main page
> > area.
>
> > --
> > i.e.,
> > (in HTML)
> > .
> > .
> > .
> > <div id="contentWidget"></div>
> > .
> > .
> > .
>
> > (in Java class)
> > RootPanel.get("contentWidget").add(new ContentWidget());
> > --
>
> > However, I guess this is not possible since the HTML widget is not
> > actual HTML, and GWT is unable to insert other widgets into it. Am I
> > right on this? What is the proper way to implement this? I really
> > don't think that creating a new class for each new content page (with
> > the HTML widgets, etc. all positioned properly) is the best way to go
> > about this.
>
> > Any help would be appreciated.
>
> > Thanks in advance,
>
> > --Adrian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---