GWT GXT barcha qiymatlarni tanlangan qatordan oladimi?

Men GXt GWt dan foydalanaman va daraxtlar panjasidagi tanlangan satrlardan qadriyatlarni olishga harakat qilmoqdaman, lekin uni ishga solib bo'lmaydi.

Masalan, foydalanuvchi satrni chertgan bo'lsa, men ushbu qatordagi barcha ustunlar uchun qadriyatlarni olishni xohlayman.

cm = new ColumnModel(createColumnConfig());

// Create grids based on data (held in stores), and attach listeners for when a row is clicked 
final TreeGrid nightlyResultsGrid = createTreeGrid(nightlyResultsStore);

nightlyResultsGrid.addListener(Events.RowClick, new Listener()
{
    public void handleEvent(BaseEvent clickEvent)
    {
        GridEvent gridEvent = (GridEvent)clickEvent;

        gridEvent.getModel().get("Platform").toString();
        gridEvent.getModel().get("Date").toString();
        gridEvent.getModel().get("Build").toString();
    }
}

Yuqoridagi kod istisno qilishni davom ettiradi.

15: 58: 09.861 [ERROR] [asboblar paneli] Hech narsa topilmadi java.lang.NullPointerException: null     com.rory.mep.ui.metrics.client.UserInterface saytida $ 3.handleEvent (UserInterface.java:109)     com.extjs.gxt.ui.client.event.BaseObservable.callListener-da (BaseObservable.java:178)     com.extjs.gxt.ui.client.event.BaseObservable.fireEvent sahifasida (BaseObservable.java:86)     com.extjs.gxt.ui.client.widget.Component.fireEvent-da (Component.java:456)     com.extjs.gxt.ui.client.widget.grid.Grid.onClick saytida (Grid.java:811)     com.extjs.gxt.ui.client.widget.treegrid.TreeGrid.onClick saytida (TreeGrid.java:745)

Har qanday yordam juda qadrlanadi.

1

1 javoblar

Javadocsni ularni ishlatganingizda o'qish uchun o'qing. Grid docs-dan:

RowClick : GridEvent(grid, rowIndex, cellIndex, event)

Fires after a row is clicked.

  • grid : this
  • rowIndex : the row index
  • cellIndex : cell index
  • index : the cell index
  • event : the dom event

Modeli mavjud emas, shuning uchun getModel() null qaytariladi. Buning o'rniga, modelni olish uchun storeIndex bilan do'kondan foydalaning.

0
qo'shib qo'ydi