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 TypeMethodDescriptionbooleanisDisplayingCustomWidgetValidationMessage(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 booleanfinal voidsetEditorDisabled(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:UIWidgetForces 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:
setEditorDisabledin interfaceUIWidget- Parameters:
disabled-trueto force the widget to display its read-only version,falseto let the system display the editor that corresponds to the current widget.
-
isEditorDisabled
public final boolean isEditorDisabled()- Specified by:
isEditorDisabledin interfaceUIWidget- Returns:
trueif the widget is forced to display its read-only version,falseotherwise.- 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:
-
falseif 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); -
trueotherwise.
-