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?
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