Class UICustomWidget
java.lang.Object
com.orchestranetworks.ui.form.widget.UICustomWidget
- All Implemented Interfaces:
UIWidget
- Direct Known Subclasses:
UIListCustomWidget
,UISimpleCustomWidget
Base class for custom widgets. A custom widget can display an
element differently and/or modify its value.
This abstract class cannot be extended directly: a custom widget must extend
either UISimpleCustomWidget
or UIListCustomWidget
.
In addition, a factory must be provided.
- Since:
- 5.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.final boolean
final void
setEditorDisabled
(boolean disabled) Forces the widget to be in read-only mode if the specified argument istrue
.
-
Method Details
-
setEditorDisabled
public final void setEditorDisabled(boolean disabled) Description copied from interface:UIWidget
Forces the widget to be in read-only mode if the specified argument istrue
. 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
.- Specified by:
setEditorDisabled
in interfaceUIWidget
- Parameters:
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.
-
isEditorDisabled
public final boolean isEditorDisabled()- Specified by:
isEditorDisabled
in interfaceUIWidget
- Returns:
true
if the widget is forced to display its read-only version,false
otherwise.- See Also:
-
isDisplayingCustomWidgetValidationMessage
This method allows to activate or deactivate the display of validation messages that are associated with the data element bound to this custom widget. Validation messages are:- always automatically displayed for each built-in widget added to this custom widget;
-
automatically displayed at the level of the custom widget itself, only
if this method returns
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.
-