Search in sources :

Example 6 with OptionsBinder

use of io.jmix.ui.component.data.options.OptionsBinder in project jmix by jmix-framework.

the class EntityComboBoxImpl method setOptions.

@Override
public void setOptions(@Nullable Options<V> options) {
    if (this.optionsBinding != null) {
        this.optionsBinding.unbind();
        this.optionsBinding = null;
    }
    if (options != null) {
        OptionsBinder optionsBinder = applicationContext.getBean(OptionsBinder.class);
        this.optionsBinding = optionsBinder.bind(options, this, this::setItemsToPresentation);
        this.optionsBinding.activate();
        if (getMetaClass() == null && options instanceof EntityOptions) {
            setMetaClass(((EntityOptions<V>) options).getEntityMetaClass());
        }
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder) EntityOptions(io.jmix.ui.component.data.meta.EntityOptions)

Example 7 with OptionsBinder

use of io.jmix.ui.component.data.options.OptionsBinder in project jmix by jmix-framework.

the class CheckBoxGroupImpl method setOptions.

@Override
public void setOptions(@Nullable Options<V> options) {
    if (this.optionsBinding != null) {
        this.optionsBinding.unbind();
        this.optionsBinding = null;
    }
    if (options != null) {
        OptionsBinder optionsBinder = applicationContext.getBean(OptionsBinder.class);
        this.optionsBinding = optionsBinder.bind(options, this, this::setItemsToPresentation);
        this.optionsBinding.activate();
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder)

Example 8 with OptionsBinder

use of io.jmix.ui.component.data.options.OptionsBinder in project jmix by jmix-framework.

the class ComboBoxImpl method setOptions.

@Override
public void setOptions(@Nullable Options<V> options) {
    if (this.optionsBinding != null) {
        this.optionsBinding.unbind();
        this.optionsBinding = null;
    }
    if (options != null) {
        OptionsBinder optionsBinder = applicationContext.getBean(OptionsBinder.class);
        this.optionsBinding = optionsBinder.bind(options, this, this::setItemsToPresentation);
        this.optionsBinding.activate();
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder)

Example 9 with OptionsBinder

use of io.jmix.ui.component.data.options.OptionsBinder in project jmix by jmix-framework.

the class TagPickerImpl method setOptions.

@Override
public void setOptions(@Nullable Options<V> options) {
    if (this.optionsBinding != null) {
        this.optionsBinding.unbind();
        this.optionsBinding = null;
    }
    if (options != null) {
        OptionsBinder optionsBinder = applicationContext.getBean(OptionsBinder.class);
        this.optionsBinding = optionsBinder.bind(options, this, this::setItemsToPresentation);
        this.optionsBinding.activate();
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder)

Example 10 with OptionsBinder

use of io.jmix.ui.component.data.options.OptionsBinder in project jmix by jmix-framework.

the class RadioButtonGroupImpl method setOptions.

@Override
public void setOptions(@Nullable Options<V> options) {
    if (this.optionsBinding != null) {
        this.optionsBinding.unbind();
        this.optionsBinding = null;
    }
    if (options != null) {
        OptionsBinder optionsBinder = applicationContext.getBean(OptionsBinder.class);
        this.optionsBinding = optionsBinder.bind(options, this, this::setItemsToPresentation);
        this.optionsBinding.activate();
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder)

Aggregations

OptionsBinder (io.jmix.ui.component.data.options.OptionsBinder)10 EntityOptions (io.jmix.ui.component.data.meta.EntityOptions)2