public abstract class UICustomWidget extends Object implements UIWidget
This abstract class cannot be extended directly: a custom widget must extend
either UISimpleCustomWidget
or UIListCustomWidget
.
In addition, a factory must be provided.
UIWidgetFactory
Modifier and Type | Method and Description |
---|---|
boolean |
isDisplayingCustomWidgetValidationMessage(WidgetDisplayContext widgetDisplayContext)
This method allows to activate or deactivate the display of
validation messages that are associated with the data element bound
to this custom widget.
|
boolean |
isEditorDisabled() |
void |
setEditorDisabled(boolean disabled)
Forces the widget to be in read-only mode if the specified argument is
true . |
public final void setEditorDisabled(boolean disabled)
UIWidget
true
.
If the widget is hidden due to permissions, this method has no effect.
By default, the widget will display its editable version only if the user is allowed to edit the node.
Default value is false
.
setEditorDisabled
in interface UIWidget
disabled
- true
to force the widget to display its read-only version,
false
to let the system display the editor that corresponds to the current widget.public final boolean isEditorDisabled()
isEditorDisabled
in interface UIWidget
true
if the widget is forced to display its read-only version,
false
otherwise.UIWidget.setEditorDisabled(boolean)
public boolean isDisplayingCustomWidgetValidationMessage(WidgetDisplayContext widgetDisplayContext)
true
.
This method can be overridden; the default implementation returns:
false
if the custom widget is bound to a field
(in order to avoid the message being displayed twice, in case a
built-in widget is added inside);
true
otherwise.