Hi,
Not sure I can really comment on if what you are doing has various
issues or not. However, I do something similar in one of my apps, but
use slightly different DOM methods and I haven't seen the performance
issues you mention. Maybe you might get some mileage changing some of
the methods; here is what I have:
String intro =
DOM.getInnerHTML(RootPanel.get("introduction").getElement());
HTML introHTML = new HTML(intro);
introHTML.setStyleName("text");
tp.add(introHTML, "introduction");
DOM.setInnerHTML(RootPanel.get("introduction").getElement(), "");
This moves the content of my "introduction" div from legacy HTML into
its own panel (in this case part of a (badly) named tabbed panel, tp)
- the only thing it doesn't do is "clone" the style so I have to
reapply the style name in the code.
//Adam