List of usage examples for com.vaadin.ui DragAndDropWrapper getId
@Override
public String getId()
From source file:org.eclipse.hawkbit.ui.management.dstable.DistributionTable.java
License:Open Source License
@Override protected boolean validateDragAndDropWrapper(final DragAndDropWrapper wrapperSource) { final String tagData = wrapperSource.getData().toString(); if (wrapperSource.getId().startsWith(SPUIDefinitions.DISTRIBUTION_TAG_ID_PREFIXS)) { return !isNoTagButton(tagData, getI18n().getMessage(UIMessageIdProvider.CAPTION_DISTRIBUTION_TAG)); } else if (wrapperSource.getId().startsWith(SPUIDefinitions.TARGET_TAG_ID_PREFIXS)) { return !isNoTagButton(tagData, getI18n().getMessage(UIMessageIdProvider.CAPTION_TARGET_TAG)); }// w w w .j a va 2 s . c o m getNotification().displayValidationError(notAllowedMsg); return false; }
From source file:org.eclipse.hawkbit.ui.management.targettable.TargetTable.java
License:Open Source License
@Override protected boolean validateDragAndDropWrapper(final DragAndDropWrapper wrapperSource) { final String tagName = HawkbitCommonUtil.removePrefix(wrapperSource.getId(), SPUIDefinitions.TARGET_TAG_ID_PREFIXS); if (wrapperSource.getId().startsWith(SPUIDefinitions.TARGET_TAG_ID_PREFIXS)) { if (getI18n().getMessage("label.no.tag").equals(tagName)) { getNotification().displayValidationError( getI18n().getMessage(UIMessageIdProvider.MESSAGE_ACTION_NOT_ALLOWED)); return false; }//from w w w . jav a2s . c o m } else { getNotification() .displayValidationError(getI18n().getMessage(UIMessageIdProvider.MESSAGE_ACTION_NOT_ALLOWED)); return false; } return true; }