use of com.vaadin.client.ui.VButton in project cuba by cuba-platform.
the class CubaCopyButtonExtensionConnector method extend.
@Override
protected void extend(ServerConnector target) {
VButton button = (VButton) ((ComponentConnector) target).getWidget();
button.addClickHandler(event -> {
if (getState().copyTargetSelector != null) {
boolean success = copyToClipboard(getState().copyTargetSelector.startsWith(".") ? getState().copyTargetSelector : "." + getState().copyTargetSelector);
getRpcProxy(CubaCopyButtonExtensionServerRpc.class).copied(success);
}
});
}
Aggregations