use of io.jmix.ui.component.data.DataAwareComponentsTools in project jmix by jmix-framework.
the class DateFieldImpl method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
EntityValueSource entityValueSource = (EntityValueSource) valueSource;
DataAwareComponentsTools dataAwareComponentsTools = applicationContext.getBean(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);
}
});
}
}
use of io.jmix.ui.component.data.DataAwareComponentsTools in project jmix by jmix-framework.
the class CheckBoxGroupImpl method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<Collection<V>> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = applicationContext.getBean(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of io.jmix.ui.component.data.DataAwareComponentsTools in project jmix by jmix-framework.
the class ComboBoxImpl method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = applicationContext.getBean(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of io.jmix.ui.component.data.DataAwareComponentsTools in project jmix by jmix-framework.
the class AbstractSelectList method valueBindingConnected.
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = applicationContext.getBean(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
use of io.jmix.ui.component.data.DataAwareComponentsTools in project jmix by jmix-framework.
the class WebOptionsGroup method valueBindingConnected.
@SuppressWarnings("unchecked")
@Override
protected void valueBindingConnected(ValueSource<V> valueSource) {
super.valueBindingConnected(valueSource);
if (valueSource instanceof EntityValueSource) {
DataAwareComponentsTools dataAwareComponentsTools = applicationContext.getBean(DataAwareComponentsTools.class);
dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
}
}
Aggregations