grid.setCellDescriptionGenerator - help needed

I am trying to display a tooltip in a grid cell vaadin 7.6 and it doesn’t work here is my code - can anyone help?

grid.setCellDescriptionGenerator(new Grid.CellDescriptionGenerator() {
public String getDescription(Grid.CellReference cellReference) {
String tooltip = "";
if (cellReference.getPropertyId().toString().equalsIgnoreCase(CREATED_DATE)) {
String tt = (String) cellReference.getItem().getItemProperty("createdDateToolTip").getValue();
tooltip = tt;
} return tooltip;

Can you please elaborate a little more?
Is the Grid.CellDescriptionGenerator() not invoked at all or is it invoked and processed correctly but the tooltip is not shown on the browser?

Sorry, I don’t know - how do I find out?
the tooltip isn’t shown anyway

The best way is to attach your IDE debugger and place a breakpoint inside the getDescription method.

If you prefer an old style dirty way, place some System.out.println(“…”) inside the method and then check the console output

Can you please post some more code? How do you setup the grid and the container?

I am trying again to output

It is still null

more info:

IndexedContainer container;
Grid grid = new Grid() {

public Component getSearchResultComponent(ViewChangeListener.ViewChangeEvent event) {
container = new IndexedContainer();
container.addContainerProperty(“addOrRemove”, String.class, “”);
container.addContainerProperty(“export”, String.class, “”);
container.addContainerProperty(“createdDate”, Date.class, null);
container.addContainerProperty(“lastUpdatedDate”, Date.class, null);

for (TRVo vo : tRVOs) {
Item newItem = container.getItem(container.addItem());
newItem.getItemProperty(“createdDate”).setValue(vo.getCreatedDate()); newItem.getItemProperty(“lastUpdatedDate”).setValue(vo.getLastUpdatedDate());

GeneratedPropertyContainer gpc = new GeneratedPropertyContainer(container);

It seems your container has not “createdDateToolTip” property

how do I make it do that?

Same way you have done for createdDate or lastUpdatedDate properties.

What do you want to set as tooltip for CREATED_DATE cell? a property of your TRVo bean named createdDateToolTip or must it be a text you generate based on other properties?

I should try just setting it to a string first

I got a string displaying as a tool tip! Thanks
so there is some problem with the getItemProperty - that can wait!

Can you help me with displaying an image in a grid please?

Take a look at the
for the Grid component; in the section Column Renderers you will find what you need.

I’m getting there - now I am looking for combining image and text in a cell!