Results 1 to 3 of 3

Thread: How to pass extra arguments in handler specified as string

  1. #1
    Sencha User
    Join Date
    Aug 2015
    Posts
    13
    Vote Rating
    0
      0  

    Default How to pass extra arguments in handler specified as string

    Says I have something like this:

    { xtype: 'button', text: 'Trigger', handler: 'onClickTrigger' }

    The question is how do I pass custom arguments to onClickTrigger called from this button ?

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55
    Vote Rating
    21
      0  

    Default

    Hi--,

    Take a look at the Ext.util.Observable method, has some relevant configs you could use.

    http://docs.sencha.com/extjs/6.2.1/c...html#method-on

    Regards,
    Bryan

  3. #3
    Sencha User
    Join Date
    Aug 2015
    Posts
    13
    Vote Rating
    0
      0  

    Default

    It works if you have a 1 - 2 fields in your form, and each field just have 1 - 2 listeners.

    In complex form, I have like 10+ fields, if I do

    listeners: {
    checkchange: '_handler',
    args: // ...
    // ......
    }

    for everything, im pretty sure the view will become a mess very quickly

    What i was looking for is the ability to pack params into the string handler like

    { checkchange: '_onCheckChange:"Custom message"' }

Similar Threads

  1. adding extra arguments to update
    By Sarat Chandra Sekhar Ryal in forum Ext: Q&A
    Replies: 0
    Last Post: 10 Apr 2014, 9:20 AM
  2. Pass arguments to application?
    By mpost in forum Ext: Discussion
    Replies: 1
    Last Post: 31 Mar 2013, 7:21 AM
  3. MessageBox pass extra param to handler
    By Misiu in forum Ext: Q&A
    Replies: 1
    Last Post: 26 Jun 2012, 4:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •