I use this in my template file, but only works for IE.
<body scroll="no">
<script language="JavaScript" type="text/javascript">
<!--
var logoutInProgress = false;
window.onbeforeunload = confirmPageUnload;
// -->
</script>
Alternatively, I setup of a session watchdog on the server side that keeps
track of new subscriptions, drop-offs, logout events, etc.
When the client stops polling for x seconds, I kill their session, and release
their resources.
<channel-definition id="my-polling-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint
url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling"
class="my.class.TimedAMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-millis>500</polling-interval-millis>
<piggybacking-enabled>false</piggybacking-enabled>
</properties>
</channel-definition>
public void invalidateClientSession(String uniqueClientId)
{
FlexSession flexSession = FlexContext.getFlexSession();
flexSession.removeAttribute("authUser");
flexSession.invalidate();
log.info("Session for " + uniqueClientId + " has been invalidated!");
}
-----Original Message-----
From: Marcus Fritze [mailto:[email protected]]
Sent: Monday, February 29, 2016 2:16 AM
To: [email protected]
Subject: Re: Browser close event
Hi,
you should use ExternalInterface and use a javascript event that kicks in, when
the browser will be closed
maybe window.onbeforeunload
Marcus
> Am 29.02.2016 um 04:12 schrieb Saju Thankathurai <[email protected]>:
>
> Hi,
>
> Is there a good way to handle browser close event in Flex? I need to fire a
> remote call to unlock a resource when user closes the browser.
>
> --
> Saju
**********************************************************************
E-mail sent through the Internet is not secure. Western Asset therefore
recommends that you do not send any confidential or sensitive information to us
via electronic mail, including social security numbers, account numbers, or
personal identification numbers. Delivery, and or timely delivery of Internet
mail is not guaranteed. Western Asset therefore recommends that you do not send
time sensitive or action-oriented messages to us via electronic mail.
**********************************************************************