SHARE
TWEET

Untitled

a guest Mar 15th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. button.fireEvent('click', button);
  2.    
  3. 1)Create the event code in a function and call the function from both sides: btn.on("clic", ...) and from the code you want to simulate the click.
  4.  
  5. 2)Use: btnView.btnEl.dom.click();
  6.    
  7. Ext.create('Ext.Button', {
  8.     text: 'Click me',
  9.     renderTo: Ext.getBody(),
  10.     handler: function() {
  11.         alert('You clicked the button!');
  12.     }
  13. });
  14.    
  15. Ext.create('Ext.Button', {
  16.     text: 'Click me',
  17.     renderTo: Ext.getBody(),
  18.     handler: someOnClickFunction
  19. });
  20.  
  21. someOnClickFunction = function( aButton, aEvent, aeOpts)
  22. {
  23.     // Do something here
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top