use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.
the class WebOptionsGroup method valueBindingConnected.
@SuppressWarnings("unchecked")
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.
the class WebTextField method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
EntityValueSource entityValueSource = (EntityValueSource) valueSource;
dataAwareComponentsTools.setupCaseConversion(this, entityValueSource);
dataAwareComponentsTools.setupMaxLength(this, entityValueSource);
}
}
use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.
the class WebLookupField method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.
the class WebOptionsList method valueBindingConnected.
@SuppressWarnings("unchecked")
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.
the class WebDateField method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
EntityValueSource entityValueSource = (EntityValueSource) valueSource;
DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupDateFormat(this, entityValueSource);
dataAwareComponentsTools.setupZoneId(this, entityValueSource);
if (valueSourceStateChangeSubscription != null) {
valueSourceStateChangeSubscription.remove();
}
// setup dateRange after valueSource is activated and value is set because
// Vaadin dateField rejects value if it is not in range
valueSourceStateChangeSubscription = valueSource.addStateChangeListener(event -> {
if (event.getState() == BindingState.ACTIVE) {
dataAwareComponentsTools.setupDateRange(this, entityValueSource);
}
});
}
}
Aggregations