First off, thanks for putting together a great suite of controls. You've made my life as a mobile environment developer much easier! I do have a question though. I see in the release notes and in the documentation that the mobile View supports an event called "beforeShow". Is there an example somewhere that utilizes that event? I'm trying to wire up some logic around the browser's back button and I'd like to use that event to determine if the user is logged in before displaying the requested view. When I try to attach a handler to the event like so:
/* div content here */
method never fires. The showSomeView
event works as expected, but the user is able to navigate back to that view even though they are no longer logged in to the app (exactly the case I'm trying to prevent).
Here is the code for viewBeforeShow
// loggedOut is just a global variable for now
// loginView is the login mobile view
I don't know if this is the correct way to handle this scenario, but I can figure that out once I start handing the event.
I should mention I'm using the trial version 2012.2.710 (just downloaded it today). I will eventually translate this to the licensed version for my employer, but I was trying a proof of concept before I worried about that.
Is this the right way to configure the handler for this event? Any help would be greatly appreciated.
Thanks again for the great work!