473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

Sep 19 '06 #1
4 1683


dh********@gmail.com 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/
Sep 19 '06 #2
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

Sep 19 '06 #3
dh********@gmail.com 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
Sep 19 '06 #4


dh********@gmail.com 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/
Sep 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sue | last post by:
On code-behind page: (attributes set programatically for each of these elements) linkbutton added to tablecell textbox added to tablecell tablecells added to tablerow tablerow added to table...
34
by: Adam Hartshorne | last post by:
Hi All, I have the following problem, and I would be extremely grateful if somebody would be kind enough to suggest an efficient solution to it. I create an instance of a Class A, and...
9
by: Michelle | last post by:
I have a div that is initially empty. Clicking on a button will add some text boxes and other controls so the user can add additional records. In IE all works fine but in Netscape 7.0 when I add...
2
by: Richard Muller | last post by:
Hi All, I'm running MSDE 2002, ver. 7.0.9466 with Net Framework 1.0, ver. 1.0.3705 over Win2000ProSP4. I created a new Visual C# project using the Windows Application template. I'm trying...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Carol | last post by:
Hi, I am working in C# I have created one usercontrol. Now added a panel to this control. In a panel i have added another control. Now, i have added this usercontrol to a form. Now, on button...
3
by: robert.oschler | last post by:
I have an AJAX driven page where I dynamically add rows to a known table on the page, based on the return document from the AJAX call, using DOM node methods (except for a small snippet of code,...
3
by: Ben Dewey | last post by:
Okay, so I have a base Page class called ArticlesPageBase. This base class has reads in an overridable ArticleId and Loads the data into a Panel object in the ContentPlaceHolder of the Master. ...
3
by: ton | last post by:
Hi, I'm using AJAXPRO this works very well. What I want to do is to add new page elements at my web site without using a postback. And I do not mean listitems but a complete dialog. Let me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.