Reputation: 363
In my flex application, I'm using an event listener for session out in idle state. It's not working for me.
Here is my code:
I have placed below code in a method
this.systemManager.addEventListener(FlexEvent.IDLE,onUserIDLE);
and the calling function onUserIDLE
private function onUserIDLE(e:FlexEvent):void
{
if(e.currentTarget.mx_internal::idleCounter == 60000)
{
this.systemManager.removeEventListener(FlexEvent.IDLE,onUserIDLE);
Alert.show("Session time Out");
menuRO.logoutUser();
signOutBtn_clickHandler();
}
}
The above code doesn't work for my application, it's not entering the if(e.currentTarget.mx_internal::idleCounter == 60000)
statement.
Kindly give me suggestions.
Thanks in advance!
Upvotes: 0
Views: 2560
Reputation: 96
Since Flex SDK is open source you can always dive into SystemManager (as well as WindowedSystemManager) class sources to see that idle logic is still there (I checked SDK v.4.6.0) and it works fine. According to your conditional statement were you really waiting for 100 minutes to see if it goes inside IF-block? Anyway you can always use trace to track idleCounter value. But if you sure in your code then it'll be helpful to know which version of flex SDK and which version of FlashPlayer you're using.
Upvotes: 0