syamkumar_jinka
syamkumar_jinka

Reputation: 327

ExtJS - Handling Session Management

I want to know how i can save page data.first i will tell how my application works. I have a container and i am adding panels to this dynamically. something like this --container --add panel_1 ---want to add panel_2 ? remove panel_1 and add panel_2 in that place

My problem is..Now i am planning to have a back button in panel 2..when user clicks ,will take him to panel_1 and i want to show what he entered...Please help me

have seen this (Extjs 4 Session Management)

Upvotes: 0

Views: 504

Answers (1)

Raza Ahmed
Raza Ahmed

Reputation: 2751

I use an extra class with static members for holding data in MVC arch in ExtJS. So I save objects, arrays, vars etc in it from controller and use them later in project. Perhaps this help you as well. Save panel_1 object or data and goto panel_2, or viceversa e.g.

Ext.define('MyApp.controller.Utility', {
statics : {
              panel1: false,
              panel2: false,

              myFun : function() {
                 //some code
              }
            }
          });

in any controller/view etc whenever you want to save an object or value, refer to this class but first add to require. .e.g.

var ut = MyApp.controller.Utility;
ut.panel1 = Ext.ComponentQuery.query('panel')[0];

Upvotes: 1

Related Questions