Guest User

Untitled

a guest
Jul 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. initComponent: function() {
  2. Res.CV.UI.FormDialog.superclass.initComponent.call(this);
  3. //inject a cv-validation-box into the bottom of the window
  4. this.add({xtype: 'cv-validation-box'});
  5.  
  6. var basic_form = this.getDialogForm().getForm();
  7. basic_form.on('actioncomplete', function(form, action) {
  8. if (action.type == 'load') {
  9. var json = Ext.decode(action.response.responseText);
  10. var combos = this.getDialogForm().findByType('combo');
  11.  
  12. Ext.each(combos, function(combo) {
  13. if (json.data[combo.displayField]) {
  14. combo.setRawValue(json.data[combo.displayField]);
  15. }
  16. });
  17. }
  18. }, this);
Add Comment
Please, Sign In to add comment