PDA

View Full Version : The stateEvents/saveState/restoreState scheme should be in Observable!


Animal
02-22-2008, 12:46 PM
Why limit this very useful way of hooking up state saving to UI Components?

The methods which implement this should be part of Observable.

That way we can save Model state as well as View state directly without having to use the View as a vehicle for accessing Model state.

For instance a Store is Observable, you should be able to set some stateEvents on it and have it save its state.

Animal
07-17-2008, 04:33 AM
Any reason why the state saving configurations and methods cannot be moved up the inheritance hierarchy into Observable? After all, state saving is based on stateEvents

All Components would still have the state handling, because they all extend Observable, so would continue to work.

But other Observables would be able to save state. Like Stores and ColumnModels. Someone just asked how to save column widths. The easiest way would be to add stateEvents and a getState to the ColumnModel, but that doesn't have state handling.

watrboy00
07-17-2008, 08:23 PM
+1

mystix
07-17-2008, 08:38 PM
+1

jerrybrown5
07-18-2008, 01:29 AM
+1

ray007
07-21-2008, 05:09 PM
+1

hendricd
07-21-2008, 08:32 PM
+1