java.lang.Object
io.github.mmm.ui.api.binding.data.UiDataBinding
Binding that allows to bind a
property or an entire bean to the UI. It
can create entire dialogs forms for beans dynamically.-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor.UiDataBinding(PropertyProvider defaultPropertyFilter) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidbindBean(io.github.mmm.bean.ReadableBean bean, UiBindingReceiver receiver, boolean createGroup) voidbindBean(io.github.mmm.bean.ReadableBean bean, UiBindingReceiver receiver, boolean createGroup, PropertyProvider propertyProvider) <V> voidbindProperty(io.github.mmm.property.ReadableProperty<V> property, io.github.mmm.ui.api.widget.input.UiInput<V> input, Object source, boolean bindValue) <B extends io.github.mmm.bean.ReadableBean>
io.github.mmm.ui.api.widget.value.UiValidatableWidget<B> createEditor(B bean) <B extends io.github.mmm.bean.ReadableBean>
io.github.mmm.ui.api.widget.value.UiValidatableWidget<B> createEditor(B bean, int columns) <B extends io.github.mmm.bean.WritableBean>
UiFormGroup<B> createFormGroup(B bean, io.github.mmm.bean.property.ReadableBeanProperty<B> beanProperty, io.github.mmm.bean.ReadableBean parentBean, PropertyProvider propertyFilter) <B extends io.github.mmm.bean.WritableBean>
UiFormPanel<B> createFormPanel(B bean) <B extends io.github.mmm.bean.WritableBean>
UiFormPanel<B> createFormPanel(B bean, PropertyProvider propertyFilter) protected String<V> io.github.mmm.ui.api.widget.input.UiInput<V> createInput(io.github.mmm.property.ReadableProperty<V> property, Object source, UiBindingReceiver receiver, boolean bindValue) protected booleanisBindableProperty(io.github.mmm.property.ReadableProperty<?> property) protected StringlocalizeLabel(io.github.mmm.property.ReadableProperty<?> property, Object source)
-
Constructor Details
-
UiDataBinding
public UiDataBinding()The constructor. -
UiDataBinding
The constructor.- Parameters:
defaultPropertyFilter- thePropertyProviderto use as default.
-
-
Method Details
-
createEditor
public <B extends io.github.mmm.bean.ReadableBean> io.github.mmm.ui.api.widget.value.UiValidatableWidget<B> createEditor(B bean) -
createEditor
public <B extends io.github.mmm.bean.ReadableBean> io.github.mmm.ui.api.widget.value.UiValidatableWidget<B> createEditor(B bean, int columns) -
bindBean
public void bindBean(io.github.mmm.bean.ReadableBean bean, UiBindingReceiver receiver, boolean createGroup) - Parameters:
bean- theReadableBeanto bind.receiver- theUiBindingReceiver.createGroup- -trueto createUiFormGroups for nested beans,falseotherwise.
-
bindBean
public void bindBean(io.github.mmm.bean.ReadableBean bean, UiBindingReceiver receiver, boolean createGroup, PropertyProvider propertyProvider) - Parameters:
bean- theReadableBeanto bind.receiver- theUiBindingReceiver.createGroup- -trueto createUiFormGroups for nested beans,falseotherwise.propertyProvider- thePropertyProvider.
-
createFormPanel
- Type Parameters:
B- type ofWritableBean.- Parameters:
bean- theWritableBean.- Returns:
- the
UiFormGroup.
-
createFormPanel
public <B extends io.github.mmm.bean.WritableBean> UiFormPanel<B> createFormPanel(B bean, PropertyProvider propertyFilter) - Type Parameters:
B- type ofWritableBean.- Parameters:
bean- theWritableBean.propertyFilter- thePropertyProvider.- Returns:
- the
UiFormGroup.
-
createFormGroup
public <B extends io.github.mmm.bean.WritableBean> UiFormGroup<B> createFormGroup(B bean, io.github.mmm.bean.property.ReadableBeanProperty<B> beanProperty, io.github.mmm.bean.ReadableBean parentBean, PropertyProvider propertyFilter) - Type Parameters:
B- type ofWritableBean.- Parameters:
bean- theWritableBean.beanProperty- theReadableBeanProperty.parentBean- the parentbean.propertyFilter- thePropertyProvider.- Returns:
- the
UiFormGroup.
-
isBindableProperty
protected boolean isBindableProperty(io.github.mmm.property.ReadableProperty<?> property) - Parameters:
property- theReadablePropertyto test.- Returns:
trueif the givenpropertyshould be bound to the UI,falseotherwise.
-
createInput
public <V> io.github.mmm.ui.api.widget.input.UiInput<V> createInput(io.github.mmm.property.ReadableProperty<V> property, Object source, UiBindingReceiver receiver, boolean bindValue) - Type Parameters:
V- type of theproperty value.- Parameters:
property- theReadableProperty.source- the optionalObject(e.g.Bean) owning the property. May benullbut is required for advanced localization (if you want more specific labels in case theproperty nameis not specific enough).receiver- theUiBindingReceiver. May benull.bindValue-trueto bind the value of theReadablePropertybidirectional with theUiInput.- Returns:
- the
UiInputwidget for the givenproperty.
-
bindProperty
public <V> void bindProperty(io.github.mmm.property.ReadableProperty<V> property, io.github.mmm.ui.api.widget.input.UiInput<V> input, Object source, boolean bindValue) - Type Parameters:
V- type of the value.- Parameters:
property- theReadablePropertyto bind.input- theUiInputto bind.source- the optionalObject(e.g.Bean) owning the property. May benullbut is required for advanced localization (if you want more specific labels in case theproperty nameis not specific enough).bindValue-trueto bind the value of theReadablePropertybidirectional with theUiInput.
-
createId
- Parameters:
property- theReadableProperty.source- the optionalObject(e.g.Bean) owning the property. May benull.- Returns:
- the widget ID.
-
localizeLabel
-