Could anyone suggest why the Click Event doesn't fire in the following
example code?
Many thanks
John
public class OKDialog extends DialogBox {
public OKDialog() {
Button okButton = new Button("OK");
//add a button in dialogBottomCenterInner div
Element bottomMiddle = getCellElement(2, 1);
okButton.removeFromParent();
remove(okButton);
// Add the buttons to the top row of the decorator panel. We
need to
// logically adopt the caption so we can catch click events.
DOM.appendChild(bottomMiddle,
okButton.asWidget().getElement());
adopt(okButton.asWidget());
okButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
GWT.log("Clicked!");
}
});
}
}
--
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.