use of org.ovirt.engine.ui.webadmin.widget.bookmark.BookmarkListGroupItem in project ovirt-engine by oVirt.
the class BookmarkView method addBookmark.
@Override
public HandlerRegistration addBookmark(Bookmark bookmark, BookmarkListModel model, ClickHandler handler) {
emptyBookmarksColumn.setVisible(false);
BookmarkListGroupItem item = new BookmarkListGroupItem(bookmark, bookmarkListGroup.getWidgetCount());
item.addEditClickHandler(event -> {
model.setSelectedItem(bookmark);
model.executeCommand(model.getEditCommand());
});
item.addRemoveClickHandler(event -> {
model.setSelectedItem(bookmark);
model.executeCommand(model.getRemoveCommand());
});
bookmarkListGroup.add(item);
HandlerRegistration handlerRegistration = null;
if (handler != null) {
handlerRegistration = item.addAnchorClickHandler(handler);
}
return handlerRegistration;
}
Aggregations