fixed can not access property uid of undefined, but there seems to be more problems with new persistent selection between "refreshs"

This commit is contained in:
Ralf Becker 2014-02-26 12:18:30 +00:00
parent 095cb846f6
commit c4385f79ec

View File

@ -120,9 +120,10 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
*/
keepSelection: function() {
this.kept_selection = this._selectionMgr ? this._selectionMgr.getSelected() : null;
this.kept_focus = this._selectionMgr ? this._selectionMgr._focusedEntry.uid || null : null;
this.kept_focus = this._selectionMgr && this._selectionMgr._focusedEntry ?
this._selectionMgr._focusedEntry.uid || null : null;
},
getObjectManager: function () {
return this._objectManager;
},
@ -149,7 +150,7 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
var entry = this._indexMap[mapIndex];
entry.idx = mapIndex-1;
this._indexMap[mapIndex-1] = entry;
// Update selection mgr too
if(entry.uid && typeof this._selectionMgr._registeredRows[entry.uid] !== 'undefined')
{