14 Feb 2012 11:16 PM #1
Unanswered: Extjs4 MVC. Retain Prevoius View with all the Form Data on Back Button.
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
15 Feb 2012 5:50 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
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 @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
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.
16 Feb 2012 12:43 AM #3
Figured it out.. not sure if this is correct
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