2 Replies Latest reply on Oct 23, 2006 1:23 AM by GG77

    History Manager

    GG77
      Hi,

      How could I enable back and next navigation from my own button (for continers implementing IHistoryManagerClient)?
      I saw there is a loadState method that gets the state, does that meas i should manage the states?

      Thanks
        • 1. Re: History Manager
          leotemp Level 1
          If you talking strictly in your flex app then that depends on how you build your app, if you are using states then back and forward should be as easy as keeping a var that tracks the last state, the components should retain whatever state(as in there looks and data) they had since last they were used.
          • 2. Re: History Manager
            GG77 Level 1
            thanks,
            The following code do what i want, but i thought that the HistoryManager, or the container itself save the states (here i used the states stack to push and pop the selecting order):

            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" verticalGap="10">
            <mx:Accordion id="ac" width="100%" height="50%" change="ac.states.push(event.oldIndex)">
            <mx:VBox label="View 1">
            <mx:TextInput text="View 1"/>
            </mx:VBox>
            <mx:VBox label="View 2">
            <mx:TextInput text="View 2"/>
            </mx:VBox>
            <mx:VBox label="View 3">
            <mx:TextInput text="View 3"/>
            </mx:VBox>
            </mx:Accordion>

            <mx:Button id="backButton" label="Back" click="ac.selectedIndex = ac.states.pop()"/>
            </mx:Application>