GXT 3 - &#34;对象&#34;的值对于实现HasCell <c,t>的类,为null

时间:2016-03-28 07:13:28

标签: gwt gxt treegrid

我正在尝试在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。请帮忙。提前致谢! :)

0 个答案:

没有答案