CellTable & ImageResource

112 views
Skip to first unread message

davidtse

unread,
Nov 15, 2010, 6:36:38 AM11/15/10
to Google Web Toolkit
Hello,

I'm trying since few hours to display an image located in a directory
of my website but without succes. My problem is when i create an image
the constructor Column want a Cell<Image> , please explain me how to
do? Or if you have an example, it would be great? Thanks per advance
and sorry for english faults,

John LaBanca

unread,
Nov 15, 2010, 1:22:42 PM11/15/10
to google-we...@googlegroups.com
You can't put an Image Widget, or any Widget, in a Cell.  Have you tried using ImageCell (which takes the URL src of the image) or ImageResourceCell (which takes an ImageResource)?

Thanks,
John LaBanca
jlab...@google.com



--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Daniele

unread,
Nov 16, 2010, 10:36:13 AM11/16/10
to Google Web Toolkit
I do like this:

ImageCell imgCell = new ImageCell();
Column<YourObject, String> imgColumn = new Column<YourObject,
String>(imgCell) {
@Override
public String getValue(YourObject obj) {
return obj.geturl();
}
};


YourObject is the object that I "display in the row".
Reply all
Reply to author
Forward
0 new messages