我希望我的表具有以下静态列标题:“姓名”、“姓氏”、“出生日期”,但我想在 *.ui.xml 中声明它们(而不是在代码中)。
现在,我正在通过这样的代码进行操作:
public PersonViewImpl extends Composite implements PersonView {
/*Lots of code removed for clarity*/
@UiField (provided = true) FlexTable personTable;
public PersonViewImpl(){
personTable.setText(0, 0, "Name");
personTable.setText(0, 1, "Surname");
personTable.setText(0, 2, "DOB")
}
}
我的 PersonView.ui.xml 中有这个
<g:FlexTable ui:field="personTable" />
我已经用谷歌搜索了几个小时,但仍然没有去。