1

My code is

CellTable celltable = new CellTable();    
celltable.setEmptyTableWidget(new Label("No"));

Here I want to get this "No" from CellTable

I tried as cellTable.getEmptyTableWidget()).getElement().getInnerText()

But I don't know how to get it.

Can you help me?

Gnik
  • 7,120
  • 20
  • 79
  • 129

1 Answers1

2

Your choice of cellTable.getEmptyTableWidget() was right already. You need to cast the Widget afterwards to what you added (in your case Label). So do something like this:

((Label)celltable.getEmptyTableWidget()).getText()

To receive the no from your table.

Regards, noise

tommueller
  • 2,358
  • 2
  • 32
  • 44
  • This is working: cellTable.getEmptyTableWidget()).getElement().getInnerText(); Anyway thanks – Gnik Dec 01 '12 at 09:54