use of com.haulmont.cuba.web.toolkit.ui.client.tableshared.TableCellClickListener in project cuba by cuba-platform.
the class CubaScrollTableConnector method init.
@Override
protected void init() {
super.init();
getWidget()._delegate.cellClickListener = new TableCellClickListener() {
@Override
public void onClick(String columnKey, int rowKey) {
getRpcProxy(CubaTableServerRpc.class).onClick(columnKey, String.valueOf(rowKey));
}
};
tooltipHandlerRegistration = Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
if (event.getTypeInt() != Event.ONMOUSEMOVE || !Element.is(event.getNativeEvent().getEventTarget())) {
return;
}
Element element = Element.as(event.getNativeEvent().getEventTarget());
if ("div".equalsIgnoreCase(element.getTagName())) {
String className = element.getClassName();
if (className != null && (className.contains("v-table-caption-container") || className.contains("v-table-footer-container"))) {
DomEvent.fireNativeEvent(event.getNativeEvent(), getWidget());
}
}
}
});
}
use of com.haulmont.cuba.web.toolkit.ui.client.tableshared.TableCellClickListener in project cuba by cuba-platform.
the class CubaTreeTableConnector method init.
@Override
protected void init() {
super.init();
getWidget()._delegate.cellClickListener = new TableCellClickListener() {
@Override
public void onClick(String columnKey, int rowKey) {
getRpcProxy(CubaTableServerRpc.class).onClick(columnKey, String.valueOf(rowKey));
}
};
tooltipHandlerRegistration = Event.addNativePreviewHandler(new Event.NativePreviewHandler() {
@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
if (event.getTypeInt() != Event.ONMOUSEMOVE || !Element.is(event.getNativeEvent().getEventTarget())) {
return;
}
Element element = Element.as(event.getNativeEvent().getEventTarget());
if ("div".equalsIgnoreCase(element.getTagName())) {
String className = element.getClassName();
if (className != null && (className.contains("v-table-caption-container") || className.contains("v-table-footer-container"))) {
DomEvent.fireNativeEvent(event.getNativeEvent(), getWidget());
}
}
}
});
}
Aggregations