Class UIListCustomWidget

java.lang.Object
com.orchestranetworks.ui.form.widget.UICustomWidget
com.orchestranetworks.ui.form.widget.UIListCustomWidget
All Implemented Interfaces:
UIWidget

public abstract class UIListCustomWidget extends UICustomWidget
Base class for custom widgets handling whole list elements.

Custom widgets handling non-list elements must extend UISimpleCustomWidget.

Factories

Along with the widget itself, a factory must be provided. Such a factory must implement UIWidgetFactory. For instance, for a custom widget MyCustomWidget, it is advisable to create the associated factory MyCustomWidgetFactory.

Usage

Model driven

Like a UIBeanEditor, a custom widget can be specified as the default view of a data model element (a field or a group that is terminal or under a terminal group). In addition, thanks to the fact that a factory is now specified, it becomes possible to control whether the specified widget is relevant with regards to the data model element. If it is not the case, an error can be added to the data model compilation (see UIWidgetFactory.setup(WidgetFactorySetupContext).

In Java API

A custom widget can be specifically instantiated and embedded in custom layouts (UIForm), custom user services (UserService) and in other custom widgets.

Life cycle

  1. When a session of EBX® generates an HTTP response including a custom widget, the specified class is instantiated by its factory.
  2. When the page generated in the previous step is submitted and the server receives the corresponding HTTP request, it is the same instance that is responsible for handling the parameters of the HTTP request, supplying the data context and checking its integrity.
Since:
5.8.0
See Also:
  • Constructor Details

  • Method Details

    • write

      public abstract void write(WidgetWriterForList aWriter, WidgetDisplayContext aContext)
      This method defines how to display the widget.
    • validate

      public void validate(WidgetListValidationContext aValidationContext)
      Offers the opportunity to perform a custom validation upon user input.

      A common use case consists in retrieving the HTTP parameter values from the incoming context, checking them, then supplying the validation context with the converted values. Error messages can be provided to the validation context if needed.

      Default implementation does nothing.

      This method is not called if UICustomWidget.isEditorDisabled() returns true.

      This method is not called by the Ajax validation mechanism. See UIAtomicWidget.setAjaxPrevalidationEnabled(boolean) for more information.