1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    64
    Vote Rating
    0
    Answers
    2
    punith.mailme is on a distinguished road

      0  

    Exclamation Unanswered: Extjs4 MVC. Retain Prevoius View with all the Form Data on Back Button.

    Unanswered: Extjs4 MVC. Retain Prevoius View with all the Form Data on Back Button.


    Hi,

    I have a 1 app with 8 veiws, 8 controllers for each view with multiple stores and models.

    scenario : Navigate from first view to second view. on the second view i will provide a back button which should navigate to previous screen(first view) with all form data retained.

    issue here is, on click of back button i am calling the controller 1 to bring the view 1 to front and all data which was selected has got lost.

    is there any way i can retain those data on the view1.?????????

    i donot wat to use a single controller to handle all 8 views as this would be a burden on a single controller file.

    kindly help us out here

    Thanks,
    Punith

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,652
    Vote Rating
    901
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    How are you bringing view 1 to the front? There is nothing MVC or Ext JS does to remove your data unless you removed it or are creating a new instance.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    64
    Vote Rating
    0
    Answers
    2
    punith.mailme is on a distinguished road

      0  

    Wink Figured it out.. not sure if this is correct

    Figured it out.. not sure if this is correct


    Simons,

    Just did a small workaround for this.
    when i go from view 1 to view 2. view 1 instance is not destroyed and is still valid.
    so wen i click back in view2 i did to hide the view2 component and show view1 component.. this did serve my purpose but i have 8 views to be manipulated in this way and all 8 views have a back button.

    let me know if this is a wrong approach and if there is a better freway to do it.


    Thanks Simons for all your replies. Helps me a lot

    Thanks
    Punith

Thread Participants: 1

Tags for this Thread