I want to add a column in a celltable/datagrid which contains image + text. I just do some research and found out maybe there are 3 ways to do this.
make an ImageResourceCell and a TextCell then combine them into a composite cell. (did not see any example or reference yet, it just comes out from my mind. maybe this will not work)
use IconCellDecorator. I checked the documentation. It said that "A Cell decorator that adds an icon to another Cell". Not sure if it can do what I want. Still I dont find any example about it.
make a custom cell. There is a example about combing the color name and color style in GWT offical website. I tired this way to combine image and string. But it is not working. Maybe there is something wrong with my codes since I dont totally understand the codes.
Could anyone provide me some examples about achieving this. You could do any ways you know. Just type some codes and show me example.
Thank you so much.
Best Regards
this is not exactly what you searched, but I think you will be able to modify my example. Here I used a CompositeCell to get a Cell containing 2 different images, each of it rendered in an ImageCell.
I added the column to a DataGrid, worked fine for me.
Greets, Nicole