XPages:如何在XSP.partialRefreshPost之后设置选择的dojo网格项

时间:2016-03-02 06:59:19

标签: javascript dojo xpages dojox.grid

我正在使用Dojo EnhancedGrid,并希望在调用XSP.partialRefreshPost或XSP.partialRefreshGet后选择一个项目

 var store = dataGrid.store;
    index = grid.selection.selectedIndex;
    var item = dataGrid.getItem(index);
    var id = store.getValue(item, "@unid");
    var remoteMethod = myRPC.sortGridPosition(index + 'DOWN');
    remoteMethod.addCallback(function(response){
        // handle whatever came back from the server

        XSP.partialRefreshPost("#{id:gridDiv}",{
            onComplete: function () {
            grid.selection.setSelected(response, true);
            grid.selection.setSelected(parseInt(index), false);
        }   
        });
    }); 

但我一直在检查错误找不到focusView of undefined, 如何在XSP.partialRefreshPost之后设置索引?

0 个答案:

没有答案