My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
UserActions  
User actions overview
Updated Aug 19, 2010 by gal.dol...@gmail.com

Introduction

As you already know if you have seen the Google IO session, the idea behind user actions is to track what users are doing in your application.

As easy as adding an annotation

In Guit you can track UserActions adding the @UserAction("Some text") annotation to any MethodHandler (see HandlersParametersBinding).

Example (from contacts demo)

    @ViewHandler
    protected void addButton$click() {
        placeManager.go(EditContactPresenter.class);
    }

To track a user action on that method:

    @ViewHandler
    @UserAction("Add contact")
    protected void addButton$click() {
        placeManager.go(EditContactPresenter.class);
    }

That's it!

Tacking the UserActions

Guit do not provide any UserAction tracker, that's up to you. Every user action fires an UserActionEvent to the EventBus. So you can subscribe to it at any place in your application. The event has the annotation String and the Component class (the class that owns the method that caused the user action).

public class UserActionEvent extends GwtEvent<UserActionHandler> {

    private final String userAction;
    private final Class<?> component;
    ...
Powered by Google Project Hosting