Ripla

Rich Platform project for Java web applications.

This project is maintained by aktion-hip

Toolbar Events

The method IToolbarItem.registerToolbarActionListener(IToolbarActionListener) registers an action listener instance to the toolbar item:

public interface IToolbarActionListener {
    void processAction(IToolbarAction inAction);
}

This listener instance can be used to send an action for example if the user triggers an action on the toolbar item. The action to be processed has to implement the following interface:

public interface IToolbarAction {
    void run();
}

An example for a toolbar action is a Logout button. In this example, the VaadinSession and the IRiplaEventDispatcher are used to run the action:

public void run() {
    VaadinSession.getCurrent()
            .getAttribute(IRiplaEventDispatcher.class)
            .dispatch(IRiplaEventDispatcher.Event.LOGOUT,
                    new HashMap<String, Object>());
}