Results 1 to 2 of 2

Thread: Ext.NavigationView way to prevent pop on back

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Location
    Colorado Springs, CO
    Posts
    52
    Answers
    1

    Default Answered: Ext.NavigationView way to prevent pop on back

    Hello,

    I was wondering if there is a way to prevent pop from getting called on back. I attempted to use beforePop but that appears to be private. Basic scenario is I want to perform some validation on back and if not valid prevent pop from occurring. Thanks for the help in advance.

    MD

  2. Ok so I found a solution that works. Within controller for Ext.NavigationView you can grab a hold of the NavigationBar component and gain access to the backbutton. Then you can call setDisabled() on it.

    Code:
    var navBar = navigationView.getNavigationBar();
    var backBtn = navBar.getBackButton();
    if(backBtn) {
    backBtn.setDisabled(true);
    }
    Hope this helps someone else

    Thanks,
    MD

  3. #2
    Sencha User
    Join Date
    Jul 2009
    Location
    Colorado Springs, CO
    Posts
    52
    Answers
    1

    Default

    Ok so I found a solution that works. Within controller for Ext.NavigationView you can grab a hold of the NavigationBar component and gain access to the backbutton. Then you can call setDisabled() on it.

    Code:
    var navBar = navigationView.getNavigationBar();
    var backBtn = navBar.getBackButton();
    if(backBtn) {
    backBtn.setDisabled(true);
    }
    Hope this helps someone else

    Thanks,
    MD

Similar Threads

  1. Prevent navigationView.pop() to destroy current view instance
    By azche in forum Sencha Touch 2.x: Discussion
    Replies: 2
    Last Post: 7 Dec 2012, 7:04 AM
  2. Prevent the pop from happening in NavigationView
    By WagsMax in forum Sencha Touch 2.x: Q&A
    Replies: 8
    Last Post: 11 Jun 2012, 1:37 PM
  3. NavigationView - prevent back button
    By cyberwombat in forum Sencha Touch 2.x: Q&A
    Replies: 19
    Last Post: 28 Apr 2012, 10:32 AM
  4. [CLOSED] Bug in Ext.NavigationView when going back and forth
    By Larry Q in forum Sencha Touch 2.x: Bugs
    Replies: 5
    Last Post: 13 Apr 2012, 6:45 PM

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
  •