在GWT 2.5中,如何填充基于AbstractCell的单元的多个部分 [英] In GWT 2.5, how do I populate multiple parts of a cell based up AbstractCell
问题描述
我有一个基于AbstractCell的ContactCell类。
它有两个标签和一个图像(在GWT 2.5的UiBinder中定义)。
如何Column.addColumn()添加一个此自定义单元格到一个CellTable?
如果是这样,当getValue()只返回简单的值(如String)时,如何使用getValue()方法填充ContactCell的字段)。
栏<联系人,字符串> column = new Column< Contact,String>(
new ContactCell()){
@Override
public String getValue(Contact object){
return object ... CAN ONLY RETURN一个价值。如何使用2个标签&图片?
}
};
如果基于 AbstractCell
是使用 UiBinder
定义的,那么它目前不是(GWT 2.5
)单元格为 CellTable
。
I have a class ContactCell based on AbstractCell. It has two Labels and one Image (defined in GWT 2.5's UiBinder).
How do I Column.addColumn() to add a this custom cell to a CellTable?
And If so, how do I use the method getValue() to populate the fields of ContactCell when getValue() only returns simple values (such as String).
Column<Contact, String> column = new Column<Contact, String>(
new ContactCell()) {
@Override
public String getValue(Contact object) {
return object... CAN ONLY RETURN ONE VALUE. HOW TO POPULATE 2 LABELS & IMAGE?
}
};
If the cell based on AbstractCell
is defined using UiBinder
then it's not currently (GWT 2.5
) possible to add such cells to a CellTable
.
这篇关于在GWT 2.5中,如何填充基于AbstractCell的单元的多个部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!