1. #1
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192
    Vote Rating
    1
    nadeemshafi9 is on a distinguished road

      0  

    Default mask a form_panel on submit

    mask a form_panel on submit


    mask a form_panel on submit ?

    can this be done throgh config options or does it require listeners etc ?

    thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Include a waitMsg in the load/submit options.

    The BasicForm waitMsgTarget config option determines how the waitMsg is displayed (you'll probably want to set it to true).

  3. #3
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192
    Vote Rating
    1
    nadeemshafi9 is on a distinguished road

      0  

    Default


    yes i saw it and i couldent figure out what it took in

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    waitMsg is simply a text.

    waitMsgTarget can be:
    true - show a standard mask with a loading message.
    Element/DOM/element id - The target element for the mask (in case you want to mask more than the panel itself).
    false/0/null/undefined - show a wait MessageBox.

  5. #5
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192
    Vote Rating
    1
    nadeemshafi9 is on a distinguished road

      0  

    Default


    thanks

  6. #6
    Sencha User nadeemshafi9's Avatar
    Join Date
    Mar 2009
    Location
    Bucks, Hearts - UK
    Posts
    192
    Vote Rating
    1
    nadeemshafi9 is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    waitMsg is simply a text.

    waitMsgTarget can be:
    true - show a standard mask with a loading message.
    Element/DOM/element id - The target element for the mask (in case you want to mask more than the panel itself).
    false/0/null/undefined - show a wait MessageBox.
    thsi dosent seem to work

    Code:
    Ext.getCmp('purchaseFieldSet').addButton(
                                            new Ext.Button({
                                                text: 'ok',
                                                minWidth: 100,
                                                listeners: {
                                                    click: function() {
               HERE!!!!                               Ext.getCmp('purchaseForm').getForm().waitMsgTarget = true;
                                                        Ext.getCmp('purchaseForm').getForm().submit({
                                                            clientValidation: true,
                                                            timeout: 10000, 
                                                            url: '/api/purchase/submitdetails',
                                                            params: {
                                                                x: 'x'
                                                            },
                                                            success: function(form, action) {
                                                               if(action.result.success == 'true'){
                                                               }
                                                               Ext.Msg.alert('Success', action.result.msg);
                                                            },
                                                            failure: function(form, action) {
                                                                switch (action.failureType) {
                                                                    case Ext.form.Action.CLIENT_INVALID:
                                                                        Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
                                                                        break;
                                                                    case Ext.form.Action.CONNECT_FAILURE:
                                                                        Ext.Msg.alert('Failure', 'Ajax communication failed');
                                                                        break;
                                                                    case Ext.form.Action.SERVER_INVALID:
                                                                       Ext.Msg.alert('Failure', action.result.msg);
                                                               }
                                                            }
                                                        });
                                                    }
                                                }
                                            })
                                        );
                                        Ext.getCmp('purchaseForm').add(Ext.getCmp('purchaseFieldSet'));
                                        Ext.getCmp('purchaseForm').doLayout();


    do you recon it could be because its nto a standard submit ? but a button that does an ajax call submit

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    83
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    I don't see a waitMsg in your submit() parameters.

Thread Participants: 1