(0044774)
|
mtaal
|
2012-02-01 14:31
|
|
I was able to get a debug breakpoint at the point where it seems to fail:
isc_ResultSet_get() at ISC_Combined.js:14962
isc_ListGrid_setSelectedState() at ISC_Combined.js:7349
isc_ListGrid_setViewState() at ISC_Combined.js:7362
isc_c_Class_invokeSuper() at ISC_Combined.js:282
isc_c_Class_Super() at ISC_Combined.js:274
$LAB.script.wait.$LAB.script.wait.isc.OBViewGrid.addProperties.setViewState() at 95a14375df364b2101416b535cce4031.js:1136
$LAB.script.wait.$LAB.script.wait.isc.OBStandardWindow.addProperties.setPersonalization() at 95a14375df364b2101416b535cce4031.js:743
$LAB.script.wait.$LAB.script.wait.isc.OBStandardWindow.addProperties.initWidget() at 95a14375df364b2101416b535cce4031.js:733
isc_Canvas_init() at ISC_Combined.js:1998
isc_Class_completeCreation() at ISC_Combined.js:341
isc_c_Class_create() at ISC_Combined.js:211
showTab() at 95a14375df364b2101416b535cce4031.js:1688
getView() at 95a14375df364b2101416b535cce4031.js:1699
$LAB.script.wait.$LAB.script.wait.$LAB.script.wait.ViewManager.openView() at 95a14375df364b2101416b535cce4031.js:1700
$LAB.script.wait.$LAB.script.wait.$LAB.script.wait.ViewManager.openView.isc.Canvas.create.openView() at 95a14375df364b2101416b535cce4031.js:1687
isc_c_Class_fireCallback() at ISC_Combined.js:299
isc_c_Class__fireActionsOnPause() at ISC_Combined.js:306
isc_c_Class_fireCallback() at ISC_Combined.js:299
isc_c_Timer__fireTimeout() at ISC_Combined.js:1269
(anonymous function)() at :1
At that location there is this call:
this.getRange(_1,_1+1)[0]
This happens when the viewstate is set, the viewstate in previous mp's also included the selected record. This does not work nicely though as the selected record may not have been loaded yet.
The viewstate which the system tries to restore in the above case is this one:
["({selected:"[{id:\"FF80808131B9A70F0131B9BA18730058\"}]",field:"[{name:\"_editLink\",frozen:true,width:58},{name:\"active\",width:null},{name:\"module\",visible:false,width:null},{name:\"propertyList\",width:null},{name:\"selected\",width:null},{name:\"property\",width:200},{name:\"window\",width:100},{name:\"attribute\",width:200},{name:\"searchKey\",visible:false,width:null},{name:\"visibleAtClient\",width:100},{name:\"visibleAtOrganization\",width:100},{name:\"userContact\",width:100},{name:\"visibleAtRole\",width:100},{name:\"client\",visible:false,width:null},{name:\"organization\",visible:false,width:null},{name:\"creationDate\",width:100},{name:\"createdBy\",width:100},{name:\"updated\",width:100},{name:\"updatedBy\",width:100}]",sort:"({fieldName:null,sortDir:true,sortSpecifiers:[{property:\"window._identifier\",direction:\"ascending\"}]})",hilite:null,group:""})"]
At the point that the viewstate is restored no data is yet loaded, so the selected record is not yet there.
In current pi, the selected state is not stored anymore, but to support older version of the selected state we need to make changes.
In ob-view-grid.js in the setViewState method the following has to be changed:
Instead of this line:
this.Super('setViewState', arguments);
the following has to be done (inside the if):
delete localState.selected
this.Super('setViewState', ['(' + isc.Comm.serialize(localState,false) + ')']);
To prevent this the viewstate which is being restored should not have the selected property anymore. The change needs to be done
To prevent the autosave problem when there are errors in the personalization also the following change can be done:
in ob-standard-window.js in the setWindowSettings method:
- move these lines before the if (data && data.personalization):
this.getClass().windowSettingsRead = true;
this.getClass().uiPattern = data.uiPattern;
this.getClass().autoSave = data.autoSave;
this.getClass().showAutoSaveConfirmation = data.showAutoSaveConfirmation;
gr. Martin |
|