I'm trying to upgrade a GWT 1.5 application into 2.0, and having
problems getting hyperlink/anchor clicks to work as before.
My 1.5 code is very simple, I'm creating a hyperlink and adding a
click listener to it:
Hyperlink loginLnk = new Hyperlink(msg.login(), "");
loginLnk.addClickListener(new ClickListener(){
public void onClick(Widget sender) {
login();
}
});
Now, in 2.0, Hyperlink.addClickHandler is deprecated (and nothing
happens when clicking it).
If I replace it with an Anchor, I'm redirected to onModuleLoad when
clicking it, and my handler doesn't run.
What is the correct way to implement this behavior in GWT 2.0 ?
--
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.