View Full Version : [2.1] EditorGridPanel combo setting incorrect value to store
saJoshua
23 Aug 2008, 7:40 AM
Hi,
In the application that I'm working on, I have a combobox in an editorGridPanel that is setting the store to equal the displayField text and not the valueField text.
I tried to create a simplified page to reproduce the issue, but that code works differently. It set the store to equal the valueField text.
I even tried cutting down listeners and so on in my application's page, but still haven't found the source of the issue.
I'm really perplexed over this. Does it sound familiar to anyone?
Thanks,
Joshua
jsakalos
23 Aug 2008, 11:02 AM
Combo can do it if its store has not been loaded or if there is no valueField configured. If these are not the case a demo code is needed.
saJoshua
25 Aug 2008, 12:35 AM
Hi Saki,
Thanks for replying on my post. I couldn't reproduce it in a test environment, so after basically hacking the whole application away to see what was causing the trouble, I found it to be this override:
Highlighted red is the added code.
Ext.override(Ext.form.ComboBox, {
getValue : function(){
if(!this.forceSelection && this.store.find(this.valueField,this.getRawValue()) <= 0){
return this.getRawValue();
}else if(this.valueField){
return typeof this.value != 'undefined' ? this.value : '';
}else{
return Ext.form.ComboBox.superclass.getValue.call(this);
}
}
});
The reason for this is actually a bug (methinks) such that combo's that allow custom text do not show up as dirty after typing a change. For now, I have commented out the override, but I'll need to sort it out before live.
I would really appreciate comments from you or anyone else interested in this.
Cheers,
Joshua
jsakalos
25 Aug 2008, 10:49 AM
Bug or feature request. Have you already reported it or asked for?
saJoshua
26 Aug 2008, 4:14 AM
I haven't reported it yet.
I would say it's a bug because I would expect the isDirty() flag to return true for a combo that allows custom text after custom text has been entered.
Joshua
saJoshua
26 Aug 2008, 9:04 AM
Look, let's not let this get ABANDONED!
Can one of those great people managing this forum mark it as a BUG or FEATURE REQUEST or something?! (I think it's the first of those, but don't let that stop you).
Thanks
jsakalos
26 Aug 2008, 11:30 AM
OK, I'll move it to bugs thread.
saJoshua
14 Sep 2008, 11:11 PM
- bump -
To clarify the bug :
When a combo that allows custom text to be entered is typed in, the "isDirty" function still returns false.
Can someone on the team please say whether this is intended behaviour. If it isn't , I started an override above (my changes colored red), but it was interfering with other behaviour. Maybe the team could use it as a base for making the change?
Thanks,
Joshua
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.