![]() |
|
|
|||||||
![]() |
XML - adding elements created by DOM doesnot show up when added to Horizontal Panel |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
hi all,
I have created a DIV tag using DOM ..... Element div = DOM.createDiv(); and appended Label inside it. .... Element label = DOM.createLabel(); DOM.setAttribute(label, "value", "test"); DOM.appendChild(div, label); now when I add this div to a horizontal Panel it does not shows up. like HorizontalPanel hp = new HorizontalPanel(); DOM.appendChild(hp.getElement(), div); RootPanel.get("_slot1").add(hp); though if I debug to c if the html string is getting appended ..it is ! when I paste that string in the html viewer it shows up the content.... But in case I c it in the GWT output it does not. Summary: The problem is why does horizontal panel (or any other Higher level GWT panel) does not shows up the items added using DOM.createXXX() methods?? I even tried it using. DOM.appendChild(RootPanel.get("_slot1").getElement (),hp.getElement()); and through... setting the inner HTML as string DOM.setInnerHTML(RootPanel.get("_slot1").getElemen t(),hp.getElement().toString); pls help. thanx in advance. Dheeraj dheerajsah@gmail.com |
|
|
|
|
#2 |
|
Posts: n/a
|
wrote: > I have created a DIV tag using DOM > .... > Element div = DOM.createDiv(); W3C DOM would be e.g. Element div = domDocumentInstance.createElement("div"); or Element div = domDocumentInstance.createElementNS("http://www.w3.org/1999/xhtml", "div"); If you use something else then at least explain what kind of object DOM is, what language you are using. -- Martin Honnen http://JavaScript.FAQTs.com/ |
|
|
|
#3 |
|
Posts: n/a
|
hi Martin,
Well, I am using Google Web Toolkit for Client side rendering (Java). my objective is not in context to core javascript but about the GWT class HorizontalPanel which the GWT compiler inturn converts to the javascript language. The problem statement i would again repeat is - Why does HorizontalPanel (counterpart of Panel class in AWT (Java) ) which GWT provides does not shows up the items added using DOM.createXXX() methods?? like the example I stated in my previous post. Pls tell if there is still any doubts about the description of the problem. Dheeraj |
|
|
|
#4 |
|
Posts: n/a
|
wrote:
> Why does HorizontalPanel (counterpart of Panel class in AWT (Java) ) > which GWT provides does not shows up the items added That sounds more like a Java problem (or a Google Toolkit problem) than an XML or DOM problem. Did you remember to tell the HorizontalPanel to refresh itself from the model? -- Joe Kesselman / Beware the fury of a patient man. -- John Dryden |
|
|
|
#5 |
|
Posts: n/a
|
wrote: > Well, I am using Google Web Toolkit for Client side rendering (Java). > my objective is not in context to core javascript but about the GWT > class HorizontalPanel which the GWT compiler inturn converts to the > javascript language. > > The problem statement i would again repeat is - > Why does HorizontalPanel (counterpart of Panel class in AWT (Java) ) > which GWT provides does not shows up the items added using > DOM.createXXX() > methods?? Does Google offer any support or at least any forums for that toolkit? Then ask there, you are more likely to find expertise on specific software in a dedicated forum than here in comp.text.xml, in particular as the DOM you code is probably not even XML but HTML. -- Martin Honnen http://JavaScript.FAQTs.com/ |
|