Advertisement
fahmihilmansyah

ControlExt

May 8th, 2014
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Ext.define('TUL.controller.Unit', {
  2.     extend: 'Ext.app.Controller',
  3.     views: [
  4.         'Unit',
  5.         ],
  6.     stores: ['Unit'],
  7.     models: ['Unit'],
  8.    
  9.     init: function() {
  10.         var b = this;
  11.         this.control({
  12.            
  13.             'unittul combo[action=cariUnit]': {
  14.                 //click: this.updateUser
  15.                 select:b.searchUnit
  16.             }
  17.         });
  18.     },
  19.     searchUnit : function(combo, selection){
  20.         var post = selection[0];
  21.         var ambilCombo= Ext.getCmp('comboUnit');
  22.         var setFoCombo= Ext.getCmp('cobatext');
  23.         ambilCombo.setValue(post.get('strnama_unit'));
  24.         Ext.getCmp('cobatext').Focus();
  25.        
  26.     },
  27.    
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement