Search in sources :

Example 6 with DataAwareComponentsTools

use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.

the class WebDatePicker 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.setupDateRange(this, entityValueSource);
    }
}
Also used : EntityValueSource(com.haulmont.cuba.gui.components.data.meta.EntityValueSource) DataAwareComponentsTools(com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)

Example 7 with DataAwareComponentsTools

use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.

the class WebCheckBoxGroup method valueBindingConnected.

@Override
protected void valueBindingConnected(ValueSource<Collection<V>> valueSource) {
    super.valueBindingConnected(valueSource);
    if (valueSource instanceof EntityValueSource) {
        DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
        dataAwareComponentsTools.setupOptions(this, (EntityValueSource) valueSource);
    }
}
Also used : EntityValueSource(com.haulmont.cuba.gui.components.data.meta.EntityValueSource) DataAwareComponentsTools(com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)

Example 8 with DataAwareComponentsTools

use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.

the class WebAbstractTextArea 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);
    }
}
Also used : EntityValueSource(com.haulmont.cuba.gui.components.data.meta.EntityValueSource) DataAwareComponentsTools(com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)

Example 9 with DataAwareComponentsTools

use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.

the class WebRadioButtonGroup 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);
    }
}
Also used : EntityValueSource(com.haulmont.cuba.gui.components.data.meta.EntityValueSource) DataAwareComponentsTools(com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)

Example 10 with DataAwareComponentsTools

use of com.haulmont.cuba.gui.components.data.DataAwareComponentsTools in project cuba by cuba-platform.

the class WebPasswordField method valueBindingConnected.

@Override
protected void valueBindingConnected(ValueSource<String> valueSource) {
    super.valueBindingConnected(valueSource);
    if (valueSource instanceof EntityValueSource) {
        DataAwareComponentsTools dataAwareComponentsTools = beanLocator.get(DataAwareComponentsTools.class);
        EntityValueSource entityValueSource = (EntityValueSource) valueSource;
        dataAwareComponentsTools.setupMaxLength(this, entityValueSource);
    }
}
Also used : EntityValueSource(com.haulmont.cuba.gui.components.data.meta.EntityValueSource) DataAwareComponentsTools(com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)

Aggregations

DataAwareComponentsTools (com.haulmont.cuba.gui.components.data.DataAwareComponentsTools)10 EntityValueSource (com.haulmont.cuba.gui.components.data.meta.EntityValueSource)10 Pair (com.haulmont.bali.datastruct.Pair)1 Subscription (com.haulmont.bali.events.Subscription)1 Preconditions (com.haulmont.bali.util.Preconditions)1 Preconditions.checkNotNullArgument (com.haulmont.bali.util.Preconditions.checkNotNullArgument)1 Datatype (com.haulmont.chile.core.datatypes.Datatype)1 FormatStringsRegistry (com.haulmont.chile.core.datatypes.FormatStringsRegistry)1 MetaProperty (com.haulmont.chile.core.model.MetaProperty)1 DateTimeTransformations (com.haulmont.cuba.core.global.DateTimeTransformations)1 Messages (com.haulmont.cuba.core.global.Messages)1 UserSessionSource (com.haulmont.cuba.core.global.UserSessionSource)1 ComponentsHelper (com.haulmont.cuba.gui.ComponentsHelper)1 Notifications (com.haulmont.cuba.gui.Notifications)1 com.haulmont.cuba.gui.components (com.haulmont.cuba.gui.components)1 TimeMode (com.haulmont.cuba.gui.components.TimeField.TimeMode)1 BindingState (com.haulmont.cuba.gui.components.data.BindingState)1 ConversionException (com.haulmont.cuba.gui.components.data.ConversionException)1 ValueSource (com.haulmont.cuba.gui.components.data.ValueSource)1 TestIdManager (com.haulmont.cuba.gui.sys.TestIdManager)1