I guess I don't understand what you're trying to accomplish. So the div is already attached to the DOM of the host page, but at some point you're trying to pull that div into the GWT 'area' of the page? (When I say 'area' I mean the boundaries of whatever RootPanel element GWT is attaching itself to.) So is GWT doing any operations on the content of this div or are you just wrapping it in the GWT 'area' for layout / style purposes.
If it's just for the latter, and you absolutely need this div to remain in the host page's markup, then maybe you should change how GWT attaches to the host page. Instead of all attaching in one spot you could break it up into multiple sections. For ex: Header, Left Nav, Content, Footer, etc each attaching to a separate RootPanel element. You still would have a single GWT entry point, but different parts get attached to different elements of the host page and can flow around your div so you don't have to pull it into GWT. If that isn't of any help then could you explain a bit more what this div in the DOM does and why you're trying to pull it into GWT. On Mar 10, 3:47 pm, wera <svet...@gmail.com> wrote: > I forgot to mention that the Div that I should wrap is already in DOM. > I get it this way: > Element myBigDiv = DOM.getElementById("myDiv"); > > On Mar 10, 9:44 pm, wera <svet...@gmail.com> wrote: > > > Thanks > > I tried that, its like setting innerHTML. So it takes a lot time > > > I saw that there is a function HTML.wrap(Element) > > But I didn't succeed to use it, I get an exception when I add the > > created component to DOM > > > thank you > > > On Mar 10, 9:20 pm, "levi.bracken" <levi.brac...@gmail.com> wrote: > > > > Have you tried just setting the text in the constructor of the HTML > > > widget or HTML Panel? > > > > String customHtml = "<div>My Custom HTML...</div>"; > > > HTML myDiv = new HTML(customHtml); > > > > That should do the job unless your content is changing. It's > > > typically very fast. What kind of markup is in your html? > > > > On Mar 10, 2:10 pm, wera <svet...@gmail.com> wrote: > > > > > Hi all, > > > > > I have an HTML div that should be moved to GWT component efficiently. > > > > What do you recommend? > > > > > Before I was doing it by setting innerHTML in gwt HTML() component > > > > (http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/ > > > > src/com/google/gwt/user/client/ui/HTML.java?r=3173) > > > > > But it took too long to do it. > > > > > 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 Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---