Guest User

Untitled

a guest
Jul 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Ext.WickedFormPanel = Ext.extend(Ext.FormPanel, {
  2. initComponent: function() {
  3. Ext.WickedFormPanel.superclass.initComponent.apply(this, arguments);
  4.  
  5. this.getForm().on('actioncomplete', function(form, action) {
  6. if (action.type == 'load') {
  7. var json = Ext.decode(action.response.responseText);
  8. var combos = this.findByType('combo');
  9.  
  10. Ext.each(combos, function(combo) {
  11. if (json.data[combo.displayField] && !Ext.isEmpty(combo.getValue())) {
  12. combo.setRawValue(json.data[combo.displayField]);
  13. }
  14. });
  15. }
  16. }, this);
  17. }
  18. })
Add Comment
Please, Sign In to add comment