View Full Version : How to get the states of all fields

16 May 2012, 7:40 AM
I have a card layout with 5 panels. When a panel is activated (the first time) I load the fields dynamically (getting the configuration of the fields via AJAX). On the last panel I want to submit all field values. This is easy. Btw, I am saving the state (just the value) of each field on change using a CookieProvider.

Now, when the users hits F5 when he's on panel 3, the page will reload. Using a history token, panel 3 will be activated and the field configuration for panel 3 is fetched using ajax and added tot panel 3. The state will be applied to each field and the values of those fields are back. The user may proceed to panel 4 and 5.

Now the problem starts, because the fields for panel 1 and 2 haven't been loaded after the F5. If the user submits, he'll be submitting only the field values form panel 3-5. So I thought that I should be able to get the states of all fields and submit that.

But how can I get the states of all fields? I could read the entire cookie, but I hoped for an Ext JS method to make that a little bit easier.

21 May 2012, 12:10 AM
Ok, I found it. It's an undocumented but obvious property of the CookieProvider called state. I can use it to get all stateful values.


24 May 2012, 10:34 AM
Good information, thanks!