I have the following code snippets:

                VerticalPanel verticalPanel = new VerticalPanel();

                Element fieldset = DOM.createFieldSet();

                DOM.appendChild(verticalPanel.getElement(), fieldset);

                Label label = new Label("Messages");
                label.addClickHandler(new ClickHandler() {
                        public void onClick(ClickEvent event) {
                                    debug("Messages handler");
                                }
                        }
                );

Based on the above, I have the following 2 options:

                // Option 1: When I click "Messages", it calls debug("Messages
handler").
                // It works as expected.
                verticalPanel.add(label);

                // Option 2: When I click "Messages", it did not call debug
("Messages handler")
                // It does not work as expected. I expected that it should call 
debug
("Messages handler")
                DOM.appendChild(fieldset, label.getElement());

I am using GWT 2.0.

What did I do wrong on option 2? I want the label inside the fieldset.

Thanks in advance for your help

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to