Adding widgets to PagingScrollTable

5 views
Skip to first unread message

seakey

unread,
Jun 19, 2010, 10:52:56 AM6/19/10
to Google Web Toolkit
Hi,

I would like to add some gwt-widgets (e.g. like images) to
PagingScrollTable from google-web-toolkit-incubator. If my
understanding of it is correct, there must be an attribute in my
object for each cell of a row. So, if want to have widgets in my
table, there must be an attribute for this widget, i.e. there must be
something like

public Image getImage() {
return image;
}

public void setImage(Image image) {
this.image = image;
}

in my class.
But now, if I intend to serialize it via RPC, I get a
SerializationException, because Image isn't serializable.

So, isn't it possible, to add widgets to PagingScrollTable (with RPC-
stuff)? Or is there another way to do this?

Miroslav Genov

unread,
Jun 20, 2010, 5:04:34 PM6/20/10
to google-we...@googlegroups.com
If you have to use dynamic images, then you have to ask the server for a proper image to display it with Image.

For example:
String avatarUrl = userProfile.getAvatarUrl(); // it may point to http://myserver.com/avatar?id=101
Image avatar = new Image(avatarUrl);

but if you want to use a static image resources, then you can take a look into http://code.google.com/p/google-web-toolkit/wiki/ImageResource.


Regards,
  Miroslav
Reply all
Reply to author
Forward
0 new messages