I'm currently developing an application using Parsley 2.3.2 and Cairngorm 3 libraries. My main application view has nested viewstacks and I use Cairngorm navigation library to navigate between the views. The navigation to the nested views works fine, and deferred views are being instantiated properly. However as soon as I add the Enter/Exit handlers to my presentation models, the navigation to my nested views stops working. It always redirects me to the first child of the ViewStack containing the target view. Though the Enter/Exit handlers for my nested view are executed. After I remove Enter/Exit methods, everything works fine again.
Is it a bug or expected behaviour?
Thanks in advance.
Do you have an isolated example of this maybe based on the samples in the NavigationParsleyTest project? A Waypoint (default is SelectedChildWaypoint) will delare a default view if no view is directly navigated to inside that destination. It will ask for selectedChild and if not successfull it will default to 0. Check out the SelectedChildWaypoint implementation on getDefaultDestination.
I managed to reproduce this issue in the NavigationParsleyProject. After the NavigationParsleySample1 application is started the active view is content.dashboard.nested.child1. However if you try to navigate to content.tasks.timetracking view, it will redirect you to content.tasks.expenses view which is the first child in the content.tasks ViewStack. All Timetracking view's enter and exit handlers as well as interceptors will be executed though.
After I commented out the metadata for all event handlers and both interceptors in TimeTrackingPM class, I was successfully navigated to the content.tasks.timetracking view.
This issue occurs only once and I believe it has something to do with the deferred instantiation. I tried to debug the source of the navigation library but haven't had any success yet.