On Thu, Jan 27, 2011 at 9:19 AM, gex <jan_finis@gmx.de> wrote:
Hi, I just tried to load an image in GWT.
The code is the following:
final Image image = new Image();
image.addLoadListener(new LoadListener() {
public void onError(Widget sender) {
Test.label.setText("An error occurred while loading.");
}
public void onLoad(Widget sender) {
Test.label.setText("Image loaded.");
}
});
// Point the image at a real URL.
image.setUrl("images/kitty.jpg");
The kitty.jpg file is located in war/images folder.
The test label never shows any of the texts. Also setting breakpoints
in onLoad and onError are never reached. This means that the image is
neither loaded nor an error is raised. What can be the source of this
problem?
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment