XPages:将特殊字符保存到dojo网格

时间:2015-12-05 22:27:43

标签: dojo xpages xpages-extlib

当我尝试将ä,ö等特殊字符保存到我的DojoGrid时,它通过xe:restService加载和保存数据,字符get messedup, 当我直接结束网格时它保存好,但是当我在后台处理并保存它时,它会得到messedup.below是我按钮上的脚本

var args = {
        onComplete: function() {},
        onError: function() { alert('Update error'); }
}
var grid = dijit.byId('#{id:grid}');
var selectedIDs =grid.selection.getSelected();
    var store = dataGrid.store;
    var Index = grid.selection.selectedIndex;
    if(Index != null){
        var curEntry = dataGrid.getItem(Index);

        var nextEntry = dataGrid.getItem(Index-1);
        currentViewIndex =  store.getValue(curEntry,"ViewIndex");
        nextViewIndex =  store.getValue(nextEntry,"ViewIndex");
        store.setValue(curEntry, 'ViewIndex',nextViewIndex);
        store.setValue(nextEntry, 'ViewIndex',currentViewIndex);
        grid.update();
        restService1.save(args)
        XSP.partialRefreshPost("#{id:gridDiv}",{});
    }

0 个答案:

没有答案