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?

4

1 回答 1

2

您的选择cellTable.getEmptyTableWidget()已经是正确的。之后您需要将 Widget 转换为您添加的内容(在您的情况下Label)。所以做这样的事情:

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

no从您的餐桌上接收。

问候,噪音

于 2012-12-01T09:28:26.347 回答