Results 1 to 3 of 3

Thread: How to lad view/Container from top, on Backbutton click?

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1
    Vote Rating
    1
      0  

    Default Answered: How to lad view/Container from top, on Backbutton click?

    I have a view with form elements lengthier then the window, after scroll down pressing next button.... it's redirecting to 2nd view. Inside the 2nd view if i click on back button, the 1st view showing from the place of button only.

    I need it should load/show from top. please suggest e how i can do it.

    Note: For navigation i have separate navigation view.

    Advanced Thanks!!

  2. i found the sollutio.
    it's not for browser back button.... it's for app back button.
    based on view container id setted the position.

    Code:
    		var currentViewft = this.getFundsTransferNavView().getActiveItem().xtype;	
    		//anil added for title change on back
    		//alert(currentViewft);
    	
    		// fundtransfer
    		if(currentViewft == 'fund-transfer-interbank-form')  
    		{
    			// anil added for scroll fix deffect25
    			Ext.getCmp('fundtransferinterbankform').getScrollable().getScroller().scrollTo('top', 0);
    		}

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506
    Vote Rating
    296
      0  

    Default

    Are you talking about the brower's back button? I believe Ext.util.History will let you listen to the back button.
    http://docs.sencha.com/extjs/4.2.1/#...t.util.History

    Perhaps you can use scroll to get back to the top:
    http://docs.sencha.com/extjs/4.2.1/#...-method-scroll

  4. #3
    Sencha User
    Join Date
    Nov 2013
    Posts
    49
    Answers
    1
    Vote Rating
    1
      1  

    Default thanks gary

    i found the sollutio.
    it's not for browser back button.... it's for app back button.
    based on view container id setted the position.

    Code:
    		var currentViewft = this.getFundsTransferNavView().getActiveItem().xtype;	
    		//anil added for title change on back
    		//alert(currentViewft);
    	
    		// fundtransfer
    		if(currentViewft == 'fund-transfer-interbank-form')  
    		{
    			// anil added for scroll fix deffect25
    			Ext.getCmp('fundtransferinterbankform').getScrollable().getScroller().scrollTo('top', 0);
    		}

Posting Permissions

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