Created
May 2, 2012 13:18
-
-
Save tayfunoziserikan/2576474 to your computer and use it in GitHub Desktop.
remote combobobox form load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Load for record from grid data | |
* | |
* @param {Ext.data.Model} record | |
*/ | |
editPersonnel: function(record) { | |
var me = this, | |
formWin = me.application.getViewport().add( | |
Ext.widget('personnelManager_form', { | |
action: 'edit' | |
}) | |
); | |
formWin.show(); | |
// modify form panel | |
formWin.setIconCls('icon-application_form_edit'); | |
formWin.setTitle(Kebab.I18nHelper.t('kebab.texts.editRecord') + ': ' + record.data.name); | |
// load form from grid record | |
formWin.down('form').loadRecord(record); | |
// Bind combo value !!!! :s argh stupid code!!!! | |
formWin.getEl().mask('Please wait...'); | |
formWin.down('combo').getStore().load( | |
{params: {query: record.data.company_name}, callback: function() { | |
formWin.getEl().unmask(); | |
}} | |
); | |
formWin.down('combo').setValue(record.data.company_id); | |
formWin.down('combo').setRawValue(record.data.company_display_name); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment