use of org.ovirt.engine.ui.common.uicommon.model.SearchableTableModelProvider in project ovirt-engine by oVirt.
the class AbstractActionStackPanelItem method addDoubleClickHandler.
void addDoubleClickHandler(final W widget, final M modelProvider) {
if (modelProvider instanceof SearchableTableModelProvider<?, ?>) {
widget.addDomHandler(event -> {
SearchableListModel model = ((SearchableTableModelProvider<?, ?>) modelProvider).getModel();
UICommand command = model.getDoubleClickCommand();
if (command != null && command.getIsExecutionAllowed()) {
DeferredModelCommandInvoker invoker = new DeferredModelCommandInvoker(model);
invoker.invokeCommand(command);
}
}, DoubleClickEvent.getType());
}
}
Aggregations