I believe we have identified a bug in version 6.0 though it appears to be in current 7 beta though we haven't fully tested on that version. The issue is the SelectItem's setValueMap method clearing it's pickList's formItem property, if the value map is set on an already drawn select item and the user does not open the drop down before the form is destroyed you will see an error stating "this.formItem is null or not an object". The cause is that in pickList.hide it attempts to use that property without checking that it exists not a bad place to fix it, however an easier fix is on the formItem's destroy method to check to see if the pick list is visible before calling hide on it. Below is the proposed patch:
for highly dynamic select items this is a common activity however in normal usage it's probably not that large of an impact. Thanks for you consideration.
-john
Code:
if(window.isc.FormItem) { window.isc.FormItem.addProperties({ destroy:function() { if(this.isDrawn()) { this.cleared(); } var pickList=this.pickList; this.pickList=null; if (pickList!=null&&pickList!=window.isc.PickList.$14w) { // $14w=_pickListInstance // \/ \/ \/ this is the change \/ \/ \/ if(pickList.isVisible()) { pickList.hide(); } // /\ /\ /\ this is the change /\ /\ /\ pickList.destroy(); } this.destroyed=true; this.form=null; this.$14x=null; // $14x=_dataElement var undef; if(window[this.ID]==this) { window[this.ID]=undef; } } }); }
-john
Comment