Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Can I pass parameters to MsgBox Callback?

  1. #11
    Sencha User
    Join Date
    Mar 2007


    Go back and read the API doc for createDelegate, specifically what the argument format is

  2. #12
    Sencha User
    Join Date
    Mar 2012


    Not sure if anyone still needs the answer to this question. I came here through Google trying to figure out how to do just this. Found the answer in Ext.window.MessageBox documentation.

    If you allow for a third parameter in your callback function, the config object passed to the show method is passed to the callback. You can put anything you like in that object and then access it in the callback function.

    Here's a snippet of my code with the variable names generalized.

    var intThingId = button.up().up().getSelectionModel().getSelection()[0].get('intThingId');
                title: 'Proceed?',
                msg: 'You are about to do this thing. Are you sure?',
                buttons: Ext.Msg.YESNO,
                fn: processResult,
                icon: Ext.window.MessageBox.QUESTION,
                myController: this,
                intThingId: intThingId
            function processResult(button, whateverThisIsIDoNotKnow, configObj) {
                if (button == 'yes') {
                    console.log('yes button clicked');
                    configObj.myController.getSomeStore().load({ params: JSON.stringify({ intThingId: configObj.intThingId }) });
                } else {

Page 2 of 2 FirstFirst 12

Similar Threads

  1. How to pass value from json request to Ext.Field?
    By boydapa3 in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 21 Mar 2007, 7:22 AM
  2. Is it possible to pass a full Querystring into params?
    By deanotron in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 15 Mar 2007, 7:56 PM
  3. msgbox and onkeypress
    By alien3d in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 28 Feb 2007, 11:58 PM
  4. Pass Parameters to Handlers
    By Domitian in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 2 Feb 2007, 3:58 PM
  5. how do you pass parameters?
    By Slapyo in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 30 Nov 2006, 2:15 PM

Posting Permissions

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