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
HasAttribute  
HasAttribute annotation overview
Updated Aug 19, 2010 by gal.dol...@gmail.com

Overview

Another extension of the EventBinding system is the @HasAttribute annotation.

It is only valid for DomEvents.

It filters events that have the specified attributes present.

Example:

    @ViewHandler
    @HasAttribute({"action", "index"})
    protected void contactsTable$click(@Attribute Actions action, @Attribute Integer index) {
        ContactDetails contactDetail = contactDetails.get(index);
        if (action.equals(Actions.CLICK)) {
            placeManager.go(EditContactPresenter.class, contactDetail.getId());
        } else {
            if (selectionModel.isSelected(contactDetail)) {
                selectionModel.removeSelection(contactDetail);
            } else {
                selectionModel.addSelection(contactDetail);
            }
        }
    }
Powered by Google Project Hosting