PDA

View Full Version : How to Maintain State based on logged in user in ExtJS4 ?



manikumar
28 Jun 2012, 4:40 AM
I am currently in the process of implementing state management for a webapplication that we have developed using ExtJS4.


Example:

In Ext.application , i wrote

Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
Ext.Component.prototype.stateful = false;



To which ever control I want to maintain the state, we made 'stateful' property of that control to true, in below
example made stateful propertyof combobox to true and its working fine( these states will be used for the subsequent logged in user):

xtype: 'combo'
stateful: true,
stateId: myid



Now I would like to know is there a way to maintain State on the same machine based on the user logged in ?


For example when user1 logged in and logged out the value selected in a combobox is 10,when user2 logged in and logged out the value selected in a combobox is 20

Now would like to maintain the state in such a way that when user1 is re-logged in, combo box should show 10 and for user2 , combo box should show 20 . please clarify whether is it possible to maintain state on user basis not for the whole application(machine basis) or not ?

Thanks & Regards,
Mani Kumar Y

mitchellsimoens
6 Jul 2012, 2:13 PM
There is only going to be one set of states on one user.