Below is my attempt at creating a link who's onclick method calls a
java method. I set a break point on displaySomeInfo but it never gets
called.
Does anyone know what I'm doing wrong?

Thank you,

Scott



VerticalPanel panel;

public void onModuleLoad() {
        createCallback();
        panel = new VerticalPanel();
        panel.add(new HTML("<A href=\"#\" onclick=\"callback('ziggy
dog');return false;\">Click here.</A>"));
        RootPanel.get().add(panel);
}

private void displaySomeInfo(String aStringToDisplay) {
        panel.insert(new HTML(aStringToDisplay), 0);
}

private static native void createCallback()
/*-{
var that = this;
$wnd.callback = $entry(function()
{ [email protected]::displaySomeInfo(Ljava/lang/
String;); });
}-*/;

-- 
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