Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ext.WickedFormPanel = Ext.extend(Ext.FormPanel, {
- initComponent: function() {
- Ext.WickedFormPanel.superclass.initComponent.apply(this, arguments);
- this.getForm().on('actioncomplete', function(form, action) {
- if (action.type == 'load') {
- var json = Ext.decode(action.response.responseText);
- var combos = this.findByType('combo');
- Ext.each(combos, function(combo) {
- if (json.data[combo.displayField] && !Ext.isEmpty(combo.getValue())) {
- combo.setRawValue(json.data[combo.displayField]);
- }
- });
- }
- }, this);
- }
- })
Add Comment
Please, Sign In to add comment