----- Original Message ----- 
From: "jasbir_dadyal" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Tuesday, November 04, 2008 3:41 PM
Subject: [flexcoders] Re: Getting all the fired events in flex application.


> --- In flexcoders@yahoogroups.com, "Paul Andrews" <[EMAIL PROTECTED]> wrote:
>>
>>
>> ----- Original Message ----- 
>> From: "jasbir_dadyal" <[EMAIL PROTECTED]>
>> To: <flexcoders@yahoogroups.com>
>> Sent: Tuesday, November 04, 2008 1:40 PM
>> Subject: [flexcoders] Getting all the fired events in flex
> application.
>>
>>
>> > Hi,
>> >    In my application I am working on session management.On session
>> > timeout i want to get all fired events(events that are currently
>> > running in a application) and stop them.
>> >
>> > Approach that I have implemented for session management.
>> >
>> > There is a timer on web layer which listens to every mouse click.
>> > For every mouse click anywhere in a application it checks the
>> > idleTimeout.if it exceeds the specified time it dispatches
>> > LogOutEvent which hits the service layer and invalidate the
>> > session.At the same time on web layer all the dictionaries that
> are
>> > stored in ModelLocator are set to null.
>>
>> You should have a timer set to the timeout period and leave that
> running. If
>> the user makes a mouse click, then either reset the timer, or set a
>> mouseclick flag.
>>
>> If you reset the timer on each mouseclick: if the timer ever runs
> to
>> completion issue the logogout event.
>> If you record the mouseclick by setting a flag to say the user is
> active:
>> When the timer runs out  look for a mouse click during the timeout
> period
>> (flag set). If the flag is set, clear the flag and start the timer
> again. If
>> the flag is unset, issue a timeout event.
>>
>> You may wish to reset the application state to 'LoggedOut' when the
> logout
>> event is handled to prevent further unwanted user interactions.
>>
>> Paul
>>
>> > Problem:
>> > Suppose user leaves system for a specified time and comes back and
>> > clicks on some button.By clicking on that button it fires a custom
>> > event and at the same time it checks for idleTimeOut.If it exceeds
>> > that time then it dispatches another event i.e Logout event.
>> >
>> > Now here two events are dispatched on one click of button.
>> >
>> > Logout event will invalidate session on service layer and nullify
> all
>> > the web dictionaries.At this time if another event which was
>> > dispathced with logout event is accessing some dictionary will
> throw
>> > a nullpointer exception.
>> >
>> > Question:
>> >
>> > Is there any way through which I can get all the fired events.With
>> > this on Logout event I can get all those events and Cancel them
>> > manually.
>> >
>> > OR
>> >
>> > Is there any better approach.
>> >
>> > Any thoughts on this will be very helpful for me.
>> > Thanks in advance
>> > Jasbir Singh
>> >
>> >
>> >
>> >
>> >
>> >
>> > ------------------------------------
>> >
>> > --
>> > Flexcoders Mailing List
>> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> > Alternative FAQ location:
>> > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-
> 446f-b4cf-1e62079f6847
>> > Search Archives:
>> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo!
> Groups
>> > Links
>> >
>> >
>> >
>>
>
> Hi Paul,
>
>          I am doing the same thing.

Err.. you are not!

>On every mouse click it checks
> the idleTimeout.

No. Don't do that!

>If it is under the specified time then it restarts
> the timer again.

Don't bother. Read my suggestion  again. With my suggestion there won't be 
multiple events.

Paul


>
> Problem arises when logout event is fired.Here Logout event get fired
> correctly but with logout event if there is some other event get
> fired then that other event causes a problem.
>
> What I want is when logout event get fired all other events should be
> stopped/canceled.
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups 
> Links
>
>
>

Reply via email to