extjs Save component view state before removing it from parent component -


let me explain scenario. using extjs5. have got view component (let name viewone) contain 2 combo boxes, button search , action button, on click of search button grid populated. viewone in parent view component (viewparent). need load second view (viewtwo) on selecting grid row , clicking action button new view loaded (viewtwo) in parentview. when come viewtwo viewone need old values of combo boxes re perform search.

currently storing values of combo boxes in store , set when after view render , call search. have discarded card layout implementation.

i wanted know how can done via ext.state , cannot find example on same close solution problem. other way of doing ?

state seems reasonable that. first of must set stateprovider (by calling ext.state.manager.setprovider) instance of class extends ext.state.provider. state should work you. thing must remember set stateful property true , set stateid of component.

usually don't need save state yourself. built-in stateful components have defined state events. when such state event occur (eg. expand on panel) state saved automatically. can customize state events calling addstateevents in initcomponent.

to provide custom component state should override applystate , getstate methods. when combine addstateevents have need.

example: http://jsfiddle.net/48jw81da/16/


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -