Search code examples
javaeventsevent-handlingdom-eventszk

Get all the events occurred till now in an Application


I need to know the events occurred in my web app, from the time it was loaded. Is there any way to get the events, The reason is I need to store those events is when ever user wants to go directly to result which he got after performing few actions, I can do PostEvent on series of events to reach that particular result, or is there any other way to do the same with out storing events?

Example:

User clicks on button1 -button1 is disabled,
User Click on button2 - button2 is disabled,
User clicks on button3 -button3 is disabled,
User Click on button4 - button4 is disabled,

Now user has performed 4 actions to get all the four button disable. If user wants to reach the state when 1st 3 buttons I will do PostEvent of clicking 3 buttons for him.

Note Example is not exactly what I need. It's just for explanation purpose.


Solution

  • There's no support for this in GWT, you have to do it yourself. Record every action/event you're interested in, possibly using the command pattern, and log all of them for later replay.