Search in sources :

Example 1 with OptionsBinder

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

the class WebOptionsGroup method setOptions.

@Override
public void setOptions(Options<I> 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::setOptionsToComponent);
        this.optionsBinding.activate();
    }
}
Also used : OptionsBinder(io.jmix.ui.component.data.options.OptionsBinder)

Example 2 with OptionsBinder

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

the class WebOptionsList method setOptions.

@Override
public void setOptions(Options<I> 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 3 with OptionsBinder

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

the class WebSearchPickerField method setOptions.

@Override
public void setOptions(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 4 with OptionsBinder

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

the class TwinColumnImpl 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 5 with OptionsBinder

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

the class AbstractSelectList method setOptions.

@Override
public void setOptions(@Nullable Options<I> 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