arT le Vark
26 Aug 2011, 2:03 PM
I have a combobox (cmbUserGroupId) with a remote store(autoLoad=false) defined in a view (SCRUMPLUS.view.User)
When a user dblclicks a grid item my controller fires the following function:
onEditUser:function(view,record,item,index,e,options)
{
var wndUser = Ext.create("SCRUMPLUS.view.User",{
title:Ext.String.format("Edit User [{0} {1}]",record.data.firstName,record.data.lastName),
isNew:false
});
var form = wndUser.down("form");
form.loadRecord(record);
form.getComponent("txtLogin").setReadOnly(true);
form.getComponent("cmbUserGroupId").setValue(record.data.userGroupId);
form.getComponent("cmbUserGroupId").setRawValue(record.data.userGroupLabel);
wndUser.show();
}
The combobox-part is how I used to do things in Ext 3, so even tho the store wasn't loaded, the combobox still displayed the "userGroupLabel", but when I called "getValue" it would return the "userGroupId" .
When I now (Ext4) try a "getValue" on the combobox or "form.getValues" it returns the raw value :(
saveUser:function(button,e,opt)
{
var win = button.up("window");
var form = win.down("form");
window.alert(form.getComponent("cmbUserGroupId").getValue());
//callAjax(this.onSaved,"UserService.svc/SaveUser",{user:form.getValues(),isNew:win.isNew},this,{close:false});
}
Is this behavior changed? Or am I missing something?
When a user dblclicks a grid item my controller fires the following function:
onEditUser:function(view,record,item,index,e,options)
{
var wndUser = Ext.create("SCRUMPLUS.view.User",{
title:Ext.String.format("Edit User [{0} {1}]",record.data.firstName,record.data.lastName),
isNew:false
});
var form = wndUser.down("form");
form.loadRecord(record);
form.getComponent("txtLogin").setReadOnly(true);
form.getComponent("cmbUserGroupId").setValue(record.data.userGroupId);
form.getComponent("cmbUserGroupId").setRawValue(record.data.userGroupLabel);
wndUser.show();
}
The combobox-part is how I used to do things in Ext 3, so even tho the store wasn't loaded, the combobox still displayed the "userGroupLabel", but when I called "getValue" it would return the "userGroupId" .
When I now (Ext4) try a "getValue" on the combobox or "form.getValues" it returns the raw value :(
saveUser:function(button,e,opt)
{
var win = button.up("window");
var form = win.down("form");
window.alert(form.getComponent("cmbUserGroupId").getValue());
//callAjax(this.onSaved,"UserService.svc/SaveUser",{user:form.getValues(),isNew:win.isNew},this,{close:false});
}
Is this behavior changed? Or am I missing something?