Problem with the navigation library with states in modules
Hello,
The application I'm working on is based on a shell which contain a "contentNavigator" where several states are defined :
<code>
...
<fx:Declarations>
<parsley:Configure />
</fx:Declarations>
<fx:Metadata>
[Waypoint(mode="states",name="shell")]
</fx:Metadata>
<s:states>
<s:State name="dashboardModule" />
<s:State name="registrationModule" />
<s:State name="marketingModule" />
...
</s:states>
<components:ModulePad id="dashboard" includeIn="dashboardModule" url="../../dashboard/bin-debug/dashboardModule.swf" />
<components:ModulePad id="registration" includeIn="registrationModule" url="../../registration/bin-debug/registrationModule.swf" />
...
</code>
Each ModulePad is a custom component that manage the loading/unloading of a spark module. The navigation in each spark module is based on the same principle, for example in the registrationModule :
<code>
...
<fx:Declarations>
<parsley:ContextBuilder config="RegistrationContext" />
<parsley:Configure />
</fx:Declarations>
<fx:Metadata>
[Waypoint(mode="states",name="shell.registrationModule")]
</fx:Metadata>
<s:states>
<s:State name="registration" />
<s:State name="tracking" />
</s:states>
<presentation:Registration includeIn="registration" width="1000" top="130" left="40" bottom="30"/>
<presentation:RegistrationTracking includeIn="tracking" width="1000" top="130" left="40" bottom="30"/>
...
</code>
At the beginning the navigation is working properly : when a NavigationEvent ("shell.registrationModule.tracking") is dispatched the registrationModule is loaded and when the loading is done the state is set to "tracking".
Then if a NavigationEvent ("shell.dashboardModule.dashboard") is dispatched the registrationModule is automatically unloaded and the dashboardModule is loaded. But then if a NavigationEvent ("shell.registrationModule.tracking") is dispatched again, the state is set to "registration" (the default one) instead of "tracking" like the first time.
The event log show that a (com.adobe.cairngorm.navigation.core.NavigationDispatcher shell.registrationModule.tracking:exit) is triggered just after the load of the registrationModule.
Is this a bug or am i making a mistake in the implementation of the navigation ?
Thanks for you help.
