Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

XML - adding elements created by DOM doesnot show up when added to Horizontal Panel

 
Thread Tools Search this Thread
Old 09-19-2006, 07:33 AM   #1
Default adding elements created by DOM doesnot show up when added to Horizontal Panel


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
  Reply With Quote
Old 09-19-2006, 01:50 PM   #2
Martin Honnen
 
Posts: n/a
Default Re: adding elements created by DOM doesnot show up when added toHorizontal Panel



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/
  Reply With Quote
Old 09-19-2006, 02:55 PM   #3
dheerajsah@gmail.com
 
Posts: n/a
Default Re: adding elements created by DOM doesnot show up when added to Horizontal Panel

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

  Reply With Quote
Old 09-19-2006, 03:01 PM   #4
Joseph Kesselman
 
Posts: n/a
Default Re: adding elements created by DOM doesnot show up when added toHorizontal Panel

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
  Reply With Quote
Old 09-19-2006, 03:17 PM   #5
Martin Honnen
 
Posts: n/a
Default Re: adding elements created by DOM doesnot show up when added toHorizontal Panel



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/
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump