我正在尝试在GXT 3中实现HasCell(C,T)。但是,使用C类型对象的重写函数为null。
public class ImageCell implements HasCell<SensorTreeModel, ImageResource>{
private ClickableImageResourceCell imageCell = new ClickableImageResourceCell();
private TextButtonCell textCell = new TextButtonCell();
@Override
public Cell<ImageResource> getCell() {
// TODO Auto-generated method stub
return imageCell;
}
@Override
public FieldUpdater<SensorTreeModel, ImageResource> getFieldUpdater() {
// TODO Auto-generated method stub
return new FieldUpdater<SensorTreeModel, ImageResource>() {
@Override
public void update(int index, SensorTreeModel object, ImageResource value) {
object.getName();
Window.alert("image Clicked");
}
};
}
@Override
public ImageResource getValue(SensorTreeModel object) {
// TODO Auto-generated method stub
return com.sencha.project.client.Resources.INSTANCES.add();
}}
getFieldUpdater中的object(SensorTreeModel)值和getValue都是null。请帮忙。提前致谢! :)