[CLOSED] Conditional AjaxEvent Confirmation

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Conditional AjaxEvent Confirmation

    Hi Vald,

    according to this post:

    http://forums.ext.net/showthread.php?1613

    is now possible to set confirmation for AjaxEvent. Fine.

    In my case I found your script more usefull because I have to conditionally set if showing or not the Confirmation Ext alert.

    This line of code gives me error: ajaxEvents.click is null

    
    function continueAjaxEvent(btnId, text, sender, e) {
        if (btnId == 'yes') {
            sender.ajaxEvents.click.fn.apply(sender, [sender, e]);
        }
    }
    in confirmClick funcion I need something like:

    
    function confirmClick(button, e) {
    
    // don't need to show confirm
        if (myCondition)  
        {
            return true; 
        }
       else
       {
        
               Ext.Msg.confirm(
                    "CONFIRM",
                    "Are you sure?",
                    continueAjaxEvent.createDelegate(button, [button, e], true),
                    button
                );
        return false;
        }
    }
    As a request, is it possible to add a property "Condition" to AjaxEvent Confirmation?

    Maybe something like:

    
    <Confirmation 
                            ConfirmRequest="true" 
                            Title="Confirm" 
                            Message="Are you sure?" 
                            Condition="{myTextField.getValue() != ''}" /> 
    
    // OR more then one
    
    
    
    <Confirmation 
    
                            ConfirmRequest="true" 
    
                            Title="Confirm" 
    
                            Message="Are you sure?" 
    
                            > 
       <Conditions>
            <Condition Code="{myTextField.getValue() != ''}" />
            <Condition Code="{myStore.getCount() > 0}" />
       </Conditions>
    </Confirmation>
    However, for the moment I need the confirmClick function working.

    Thanx a lot

    Matteo
    Last edited by geoffrey.mcgill; Feb 20, 2011 at 4:15 PM.

Similar Threads

  1. [CLOSED] Conditional Confirmation
    By rmelancon in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 12, 2011, 2:46 PM
  2. Conditional RowExpander on GridPanel
    By deejayns in forum 1.x Help
    Replies: 0
    Last Post: Sep 29, 2010, 5:02 PM
  3. [CLOSED] GridPanel conditional edit
    By sharif in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 20, 2010, 1:05 PM
  4. [CLOSED] CheckboxSelectionModel + conditional select
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2009, 6:09 AM
  5. Conditional AjaxEvents
    By grmontero in forum 1.x Help
    Replies: 1
    Last Post: May 29, 2009, 10:40 AM

Posting Permissions