0
我有一個CellTable,我想做一個rowspan和colspan,但CellTable不給這個方法。CellTable - 我怎麼做rowspan和colspan
在我的ui.xml中我有我的CellTable。
<b:CellTable ui:field="groupViewTable></b:CellTable>
Java代碼的Celltable:
public CellTable<String> createGroupViewTable() {
groupViewTable = new CellTable<String>();
groupViewTable.setLoadingIndicator(null);
List<String> listObjects = new ArrayList<String>();
listObjects.add("Revenue");
listObjects.add("Teste");
TextColumn conceptColumn = new TextColumn() {
@Override
public String getValue(Object object) {
return "Concept";
}
};
groupViewTable.addColumn(conceptColumn, "Concept");
TextColumn proposalColumn = new TextColumn() {
@Override
public String getValue(Object object) {
return "Proposal";
}
};
groupViewTable.addColumn(conceptColumn, "Proposal");
TextColumn eurColumn = new TextColumn() {
@Override
public String getValue(Object object) {
return "EUR";
}
};
groupViewTable.addColumn(conceptColumn, "EUR");
TextColumn hoursColumn = new TextColumn() {
@Override
public String getValue(Object object) {
return "Hours";
}
};
groupViewTable.addColumn(conceptColumn, "Hours");
TextColumn lastEurColumn = new TextColumn() {
@Override
public String getValue(Object object) {
return "EUR";
}
};
groupViewTable.addColumn(lastEurColumn, "EUR");
groupViewTable.setRowCount(listObjects.size(), true);
groupViewTable.setRowData(0, listObjects);
return groupViewTable;
}
這CellTable是一個公正的測試。它顯示只有一行標題,但我想要一些類似的:http://www.w3.org/TR/html401/images/mergedcells.gif
我該怎麼做?感謝您的關注。
查找溶液這裏關於[colspan屬性和ROWSPAN在CellTable](http://stackoverflow.com/questions/14879353/colspan-and-rowspan-in-celltable )。 – Braj