Hi,
I have some code that used to work with 8.2p and is now broken with 8.3p.
I have a form with 2 combo-boxes. The first combo-box is used to filter out the second. I therefore
rely on the getPickListFilterCriteria() pattern to do so, from my 2nd combo-box.
My problem is that when the getPickListFilterCriteria() method executes in my second combo-box,
this.form.getValue("combo_1") always returns undefined.
I inspected this.form.values from within getPickListFilterCriteria() and there are absolutely no values
in there, whatsoever ...
I've included our logic. Do you see anything that could have worked with 8.2p that wouldn't anymore with 8.3p?
Thanks,
I have some code that used to work with 8.2p and is now broken with 8.3p.
I have a form with 2 combo-boxes. The first combo-box is used to filter out the second. I therefore
rely on the getPickListFilterCriteria() pattern to do so, from my 2nd combo-box.
My problem is that when the getPickListFilterCriteria() method executes in my second combo-box,
this.form.getValue("combo_1") always returns undefined.
I inspected this.form.values from within getPickListFilterCriteria() and there are absolutely no values
in there, whatsoever ...
I've included our logic. Do you see anything that could have worked with 8.2p that wouldn't anymore with 8.3p?
Thanks,
Code:
//---------------- getComboOneFieldDefinition : function(properties) { var baseProperties = { name : 'level', title : MeiStrings.get('account.accountLevel'), hint : MeiStrings.get('account.hint.accountLevel'), showHintInField : true, width : 150, defaultToFirstOption : true, optionDataSource : 'dsAccountLevelPickerOptions', editorType : 'SelectItem', displayField : 'name', sortField : 'presentationOrder', valueField : 'primaryKey', addUnknownValues : false, validateOnExit : false, pickListFields : [{ name : 'name', width : '100%' }], }; return isc.addProperties(baseProperties, properties); }, //---------------- getComboTwoFieldDefinition : function(properties) { var baseProperties = { name : 'account', title : MeiStrings.get('account.search.field.title'), width : 300, editorType : 'ComboBoxItem', displayField : 'name', valueField : 'primaryKey', addUnknownValues : false, optionDataSource : 'dsAccountMemberPickerOptions', sortField : 'name', hint : MeiStrings.get('account.search.field.hint'), showHintInField : true, textMatchStyle : 'substring', pickListWidth : 450, pickListHeight : 245, synchronizedFromLevelFieldName : null, pickListFields : [ { name : 'code', width : '25%', title : MeiStrings.get('account.code') }, { name : 'name', width : '75%', title : MeiStrings.get('account.name') } ], init : function() { // following code is actually invoked using DelayCall but I removed to keep things a little simpler if (this.synchronizedFromLevelFieldName) { var levelPicker = this.form.getField(this.synchronizedFromLevelFieldName); if (levelPicker) { this.observe(levelPicker, 'dataArrived', 'observer.levelPickerChanged(observed)'); this.observe(levelPicker, 'changed', 'observer.levelPickerChanged(observed)'); } } return this.Super('init', arguments); }, levelPickerChanged: function(levelPicker) { this.resetField(); this.setHint(MeiStrings.get('account.search.field.hintWithLevel', levelPicker.getSelectedRecord().name)); }, getPickListFilterCriteria : function() { var criteria = this.Super('getPickListFilterCriteria', arguments); if (!criteria) criteria = {}; if (this.synchronizedFromLevelFieldName) criteria['dimensionLevel'] = this.form.getValue(this.synchronizedFromLevelFieldName); return criteria; } } return isc.addProperties(baseProperties, properties); }, // // Actual Form // form = DynamicForm.create ({ autoFocus : true, saveOnEnter : true, wrapItemTitles : false, titleOrientation : 'top', titleSuffix : '', requiredTitleSuffix : '', numCols : 4, cellPadding : 5, vAlign: 'top', valuesManager: this.valuesManager, fields : [ this.getComboOneFieldDefinition({ name : 'combo_1', width: 100, tabIndex : 1, shouldSaveValue: false, required: false }), this.getComboTwoFieldDefinition({ name: 'combo_2', width: 100, tabIndex : 2, synchronizedFromLevelFieldName : 'combo_1', shouldSaveValue: false, required: false }), ... ] ... });
Comment