Annotation Type Bind
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) @LinkkiBoundProperty(BindAnnotationBoundPropertyCreator.class) @LinkkiAspect(BindAnnotationAspectDefinitionCreator.class) public @interface Bind
This annotation is used to bind manually created components with a PMO and optionally a model object. It is used to manually create UI layouts where linkki @UI... annotations do not give the necessary flexibility. To still keep the linkki binding it is possible to annotate the created field components using this annotation. Afterwards just callBinder.setupBindings(org.linkki.core.binding.BindingContext)to bring the UI and the model together.- See Also:
Binder
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description AvailableValuesTypeavailableValuesIf and how the available values are bound to the PMO.EnabledTypeenabledIf and how the enabled state of the UI element is bound to the PMO.StringmodelAttributeName of the model object's attribute that is bound to this component.StringmodelObjectThe name of theModelObjectthis component is bound to, by defaultModelObject.DEFAULT_NAME.StringpmoPropertyThe name of the PMO's property to which the UI element is bound.RequiredTyperequiredIf and how the required state of the UI element is bound to the PMO.VisibleTypevisibleIf and how the visible state of the UI element is bound to the PMO.
-
-
-
Element Detail
-
pmoProperty
String pmoProperty
The name of the PMO's property to which the UI element is bound. If it is empty (default) the property name is derived from the annotated element, that means:- in case of a field it is the field name
- it case of a getter method it is the method name without is/get
- otherwise it is the full name of the annotated method
Note that for each aspect, the
pmoProperty()is evaluated beforemodelAttribute(). That means if an aspect method can be found with the definedpmoProperty()in the PMO, that method is used. If no method can be found in the PMO, themodelAttribute()is then used to find the method in themodelObject(). If nomodelAttribute()is defined,pmoProperty()is used to find the method in themodelObject().- Default:
- ""
-
-
-
modelObject
String modelObject
The name of theModelObjectthis component is bound to, by defaultModelObject.DEFAULT_NAME.- Default:
- "modelObject"
-
-
-
modelAttribute
String modelAttribute
Name of the model object's attribute that is bound to this component. If none is specified,pmoProperty()is used.- Default:
- ""
-
-
-
enabled
EnabledType enabled
If and how the enabled state of the UI element is bound to the PMO.- Default:
- org.linkki.core.defaults.ui.aspects.types.EnabledType.ENABLED
-
-
-
visible
VisibleType visible
If and how the visible state of the UI element is bound to the PMO.- Default:
- org.linkki.core.defaults.ui.aspects.types.VisibleType.VISIBLE
-
-
-
required
RequiredType required
If and how the required state of the UI element is bound to the PMO. Ignored for UI elements that cannot be required, e.g. buttons.- Default:
- org.linkki.core.defaults.ui.aspects.types.RequiredType.NOT_REQUIRED
-
-
-
availableValues
AvailableValuesType availableValues
If and how the available values are bound to the PMO. Relevant only for UI elements that have available values (e.g. combo boxes), ignored for all other elements.- Default:
- org.linkki.core.defaults.ui.aspects.types.AvailableValuesType.NO_VALUES
-
-