From c4385f79ec5745b2b6ea5c0e0233a340e9b0593c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 26 Feb 2014 12:18:30 +0000 Subject: [PATCH] fixed can not access property uid of undefined, but there seems to be more problems with new persistent selection between "refreshs" --- etemplate/js/et2_extension_nextmatch_controller.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch_controller.js b/etemplate/js/et2_extension_nextmatch_controller.js index 2f3b001102..15d95748ab 100644 --- a/etemplate/js/et2_extension_nextmatch_controller.js +++ b/etemplate/js/et2_extension_nextmatch_controller.js @@ -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') {