Package com.orchestranetworks.userservice

# Interface UserServiceDisplayConfigurator

All Superinterfaces:
  `UIResourceLocator`, `UserServiceResourceLocator`

public interface UserServiceDisplayConfigurator extends UserServiceResourceLocator
This interface provides methods to set up a user service display.

Since:
  5.8.0
See Also:
  - `UserService.setupDisplay(UserServiceSetupDisplayContext, UserServiceDisplayConfigurator)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `UIButtonSpecNavigation`
  `newActionButton(UserMessage aLabel, UserServiceEvent aCallback)`
  Creates a specification for a localized action button.
  `UIButtonSpecNavigation`
  `newActionButton(String aLabel, UserServiceEvent aCallback)`
  Creates a specification for an action button.
  `UIButtonSpecNavigation`
  `newBackButton(UserServiceEvent aCallback)`
  Creates a specification for a back button.
  `UIButtonSpecNavigation`
  `newCancelButton()`
  Creates a specification for a cancel button.
  `UIButtonSpecNavigation`
  `newCloseButton()`
  Creates a specification for a close button.
  `UIButtonSpecSubmit`
  `newFinishButton(UserServiceEvent aCallback)`
  Creates a specification for a finish button.
  `UIButtonSpecSubmit`
  `newNextButton(UserServiceEvent aCallback)`
  Creates a specification for a next button.
  `UIButtonSpecNavigation`
  `newRevertButton()`
  Creates a specification for a revert button.
  `UIButtonSpecSubmit`
  `newSaveButton(UserServiceEvent aCallback)`
  Creates a specification for a save button.
  `UIButtonSpecSubmit`
  `newSaveCloseButton(UserServiceEvent aCallback)`
  Creates a specification for a save and close button.
  `UIButtonSpecSubmit`
  `newSubmitButton(UserMessage aLabel, UserServiceEvent aCallback)`
  Creates a localized specification for a submit button.
  `UIButtonSpecSubmit`
  `newSubmitButton(String aLabel, UserServiceEvent aCallback)`
  Creates a specification for a submit button.
  `UserServiceTabbedPane`
  `newTabbedPane()`
  Creates a tabbed pane.
  `UserServiceTabbedPane`
  `newTabbedPane(String anId)`
  Creates a tabbed pane.
  `Action`
  `newToolbarAction(UserServiceEvent aCallback)`
  Returns a toolbar action that can be used in a top toolbar.
  `void`
  `setAlwaysConfirmLeaveEnabled(boolean isEnabled)`
  Sets whether or not the user is always prompted for a confirmation when the page is abandoned before submitting the input.
  `void`
  `setBottomBarDisplayed(boolean isBottomBarDisplayed)`
  Displays or hides the user service bottom bar.
  `void`
  `setBreadcrumbs(UIFormLabelSpec... labels)`
  Sets the localized header's breadcrumbs.
  `void`
  `setBreadcrumbs(String... labels)`
  Sets the header's breadcrumbs.
  `void`
  `setCenterButtons(UIButtonSpec... buttons)`
  Sets the bottom bar center buttons.
  `void`
  `setCloseCallback(UserServiceEvent aCallback)`
  Sets the close and cancel buttons callback.
  `void`
  `setContent(UserServicePane aCallback)`
  Sets a callback used for rendering a pane.
  `void`
  `setContent(UserServiceRawPane aCallback)`
  Sets a callback used for rendering a view pane.
  `void`
  `setDefaultButtons(UserServiceEvent aSaveCallback)`
  Sets the default bottom bar.
  `void`
  `setDetectionOfLostModificationDisabled(boolean isDisabled)`
  Sets whether or not the user is prompted for a confirmation when information have been entered in the form, but the page is abandoned before submitting the input.
  `void`
  `setFileUploadEnabled(boolean isEnabled)`
  Sets whether or not the EBX® form can upload files, that is if the form encryption type is in "multipart/form-data".
  `void`
  `setHeaderDisplayed(boolean isHeaderDisplayed)`
  Displays or hides the user service header.
  `void`
  `setLeftButtons(UIButtonSpec... buttons)`
  Sets the bottom bar left buttons.
  `void`
  `setRightButtons(UIButtonSpec... buttons)`
  Sets the bottom bar right buttons.
  `void`
  `setTitle(UserMessage aTitle)`
  Sets the localized title of the service.
  `void`
  `setTitle(UIFormLabelSpec aTitle)`
  Sets the localized title of the service.
  `void`
  `setTitle(String aTitle)`
  Sets the title of the service.
  `void`
  `setToolbar(Toolbar aToolbar)`
  Sets the toolbar to one defined programmatically.
  `void`
  `setToolbar(Toolbar aToolbar, Adaptation aRecord)`
  Sets the toolbar to one defined programmatically for a record.
  `void`
  `setToolbar(Toolbar aToolbar, AdaptationTable aTable)`
  Sets the toolbar to one defined programmatically for a table.
  `void`
  `setToolbar(Toolbar aToolbar, ObjectKey anObjectKey, boolean isForTable)`
  Sets the toolbar to one defined programmatically for a record or a table.
  `void`
  `setToolbar(String aToolbarName, Adaptation aRecord)`
  Sets the toolbar to one defined in a schema for a record.
  `void`
  `setToolbar(String aToolbarName, AdaptationTable aTable)`
  Sets the toolbar to one defined in a schema for a table.
  `void`
  `setToolbar(String aToolbarName, ObjectKey anObjectKey, boolean isForTable)`
  Sets the toolbar to one defined in a schema for a record or a table.
  `void`
  `setToolbarFirstCallback(UserServiceEvent aCallback)`
  Sets the toolbar "first" button callback.
  `void`
  `setToolbarLastCallback(UserServiceEvent aCallback)`
  Sets the toolbar "last" button callback.
  `void`
  `setToolbarNavigationAlwaysDisplayed(boolean isAlwaysDisplayed)`
  Sets the toolbar navigation display mode.
  `void`
  `setToolbarNextCallback(UserServiceEvent aCallback)`
  Sets the toolbar "next" button callback.
  `void`
  `setToolbarPreviousCallback(UserServiceEvent aCallback)`
  Sets the toolbar "previous" button callback.
  `void`
  `setURLForContextualHelp(String aURL)`
  Sets the URL for the help page and displays a help button.

  ### Methods inherited from interface com.orchestranetworks.ui.UIResourceLocator

  `createWebComponentForRootSession, createWebComponentForSubSession, getURLForAjaxComponent, getURLForAjaxComponent, getURLForPerspectiveSelection, getURLForPerspectiveSelection, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForRest, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForViewSelection`

  ### Methods inherited from interface com.orchestranetworks.userservice.UserServiceResourceLocator

  `getURLForAction, getURLForAction, getURLForAjaxRequest, getURLForAjaxRequest, getURLForEndingService, getURLForGetRequest, getURLForGetRequest, getURLForResource, getURLForResource, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection, getURLForServiceSelection`

- ## Method Details

  - ### setHeaderDisplayed

    void setHeaderDisplayed(boolean isHeaderDisplayed)
    Displays or hides the user service header. By default the header is displayed.
    Parameters:
      `isHeaderDisplayed` - if `true` the header is displayed, if `false` the header is hidden,

  - ### setTitle

    void setTitle(String aTitle)
    Sets the title of the service. By default the label specified in the service declaration is displayed.
    Parameters:
      `aTitle` - The title of the service.

  - ### setTitle

    void setTitle(UserMessage aTitle)
    Sets the localized title of the service. By default the label specified in the service declaration is displayed.
    Parameters:
      `aTitle` - The title of the service.

  - ### setTitle

    void setTitle(UIFormLabelSpec aTitle)
    Sets the localized title of the service. By default the label specified in the service declaration is displayed.
    Parameters:
      `aTitle` - The title of the service.

  - ### setURLForContextualHelp

    void setURLForContextualHelp(String aURL)
    Sets the URL for the help page and displays a help button. By default there is no help URL and the help button is not displayed.
    Parameters:
      `aURL` - the url for the help page.
    See Also:
      - `UserServiceResourceLocator`

  - ### setCloseCallback

    void setCloseCallback(UserServiceEvent aCallback)
    Sets the close and cancel buttons callback. This callback is also called when the user clicks on the top right close button of a user service displayed in a pop-up window.

    Default callback simply closes the current service.

    Parameters:
      `aCallback` - the callback.
    See Also:
      - `newCloseButton()`
      - `newCancelButton()`

  - ### setToolbar

    void setToolbar(String aToolbarName, ObjectKey anObjectKey, boolean isForTable)
    Sets the toolbar to one defined in a schema for a record or a table.
    Parameters:
      `aToolbarName` - A toolbar name defined in the schema.
      `anObjectKey` - An object key of a record. The schema of this record must define a toolbar with a name equal to `aToolbarName` for location "table on top" if `isForTable` is `true` or "record form on top" if `isForTable` is `false`.
      `isForTable` - if `true`, the toolbar is for the table of the record, if `false`, the toolbar is for the record itself. In this latter case, the record cannot be a new one not yet persisted.

  - ### setToolbar

    void setToolbar(Toolbar aToolbar, ObjectKey anObjectKey, boolean isForTable)
    Sets the toolbar to one defined programmatically for a record or a table.
    Parameters:
      `aToolbar` - The toolbar.
      `anObjectKey` - An object key of a record.
      `isForTable` - if `true`, the toolbar is for the table of the record, if `false`, the toolbar is for the record itself. In this latter case, the record cannot be a new one not yet persisted.

  - ### setToolbar

    void setToolbar(String aToolbarName, Adaptation aRecord)
    Sets the toolbar to one defined in a schema for a record.
    Parameters:
      `aToolbarName` - A toolbar name defined in the schema.
      `aRecord` - The record. The schema of this record must define a toolbar with a name equal to `aToolbarName` for location "record form on top".

  - ### setToolbar

    void setToolbar(Toolbar aToolbar, Adaptation aRecord)
    Sets the toolbar to one defined programmatically for a record.
    Parameters:
      `aToolbar` - The toolbar.
      `aRecord` - the record.

  - ### setToolbar

    void setToolbar(String aToolbarName, AdaptationTable aTable)
    Sets the toolbar to one defined in a schema for a table.
    Parameters:
      `aToolbarName` - A toolbar name defined in the schema.
      `aTable` - A table. The schema of this record must define a toolbar with a name equal to `aToolbarName` for location "table on top".

  - ### setToolbar

    void setToolbar(Toolbar aToolbar, AdaptationTable aTable)
    Sets the toolbar to one defined programmatically for a table.
    Parameters:
      `aToolbar` - The toolbar.
      `aTable` - A table.

  - ### setToolbar

    void setToolbar(Toolbar aToolbar)
    Sets the toolbar to one defined programmatically. Toolbar items that require a record or table will not be displayed.
    Parameters:
      `aToolbar` - The toolbar.

  - ### setToolbarNavigationAlwaysDisplayed

    void setToolbarNavigationAlwaysDisplayed(boolean isAlwaysDisplayed)
    Sets the toolbar navigation display mode.
    Parameters:
      `isAlwaysDisplayed` - If `true`, the navigation buttons will always be displayed. If `false`, navigation buttons will be displayed only if at least one of the callbacks for the first, previous, next or last buttons is set.

  - ### setToolbarFirstCallback

    void setToolbarFirstCallback(UserServiceEvent aCallback)
    Sets the toolbar "first" button callback. This callback is ignored by toolbars defined for a record.
    Parameters:
      `aCallback` - the action callback that will be called when the user clicks on "first" button.

  - ### setToolbarLastCallback

    void setToolbarLastCallback(UserServiceEvent aCallback)
    Sets the toolbar "last" button callback. This callback is ignored by toolbars defined for a record.
    Parameters:
      `aCallback` - the action callback that will be called when the user clicks on "last" button.

  - ### setToolbarPreviousCallback

    void setToolbarPreviousCallback(UserServiceEvent aCallback)
    Sets the toolbar "previous" button callback.
    Parameters:
      `aCallback` - the action callback that will be called when the user clicks on "previous" button.

  - ### setToolbarNextCallback

    void setToolbarNextCallback(UserServiceEvent aCallback)
    Sets the toolbar "next" button callback.
    Parameters:
      `aCallback` - the action callback that will be called when the user clicks on the "next" button.

  - ### newToolbarAction

    Action newToolbarAction(UserServiceEvent aCallback)
    Returns a toolbar action that can be used in a top toolbar. This action does not submit the current EBX® form.
    Parameters:
      `aCallback` - the callback that is called when the action is triggered by the user.
    Returns:
      the toolbar action.

  - ### setBreadcrumbs

    void setBreadcrumbs(String... labels)
    Sets the header's breadcrumbs.
    Parameters:
      `labels` - the label of each breadcrumb, from left (first label) to right (last label).

  - ### setBreadcrumbs

    void setBreadcrumbs(UIFormLabelSpec... labels)
    Sets the localized header's breadcrumbs.
    Parameters:
      `labels` - the label of each breadcrumb, from left (first label) to right (last label).

  - ### setDetectionOfLostModificationDisabled

    void setDetectionOfLostModificationDisabled(boolean isDisabled)
    Sets whether or not the user is prompted for a confirmation when information have been entered in the form, but the page is abandoned before submitting the input.

    Default value is `false`.

    This value is ignored if the content is not in a pane.

    Parameters:
      `isDisabled` - `true` to disable form detection upon leaving the page, `false` to enable it.
    See Also:
      - `UIButtonSpecNavigation.setAskBeforeLeavingModifiedForm(boolean)`

  - ### setAlwaysConfirmLeaveEnabled

    void setAlwaysConfirmLeaveEnabled(boolean isEnabled)
    Sets whether or not the user is always prompted for a confirmation when the page is abandoned before submitting the input.

    Default value is `false`.

    This value is ignored if the content is not an EBX® form or if `setDetectionOfLostModificationDisabled(boolean)` was called with value `true`.

    Parameters:
      `isEnabled` - `true` to always prompt for a confirmation when the page is abandoned before submitting the input, `false` to prompt for a confirmation only if input was modified and the page is abandoned before submitting.
    See Also:
      - `UIButtonSpecNavigation.setAskBeforeLeavingModifiedForm(boolean)`

  - ### setFileUploadEnabled

    void setFileUploadEnabled(boolean isEnabled)
    Sets whether or not the EBX® form can upload files, that is if the form encryption type is in "multipart/form-data".

    Default value is `false`.

    This value is ignored if the content is not an EBX® form.

    Parameters:
      `isEnabled` - `true` to enable file upload, `false` to disable it.

  - ### setContent

    void setContent(UserServicePane aCallback)
    Sets a callback used for rendering a pane.
    Parameters:
      `aCallback` - the pane callback.

  - ### setContent

    void setContent(UserServiceRawPane aCallback)
    Sets a callback used for rendering a view pane.
    Parameters:
      `aCallback` - the view callback.

  - ### setBottomBarDisplayed

    void setBottomBarDisplayed(boolean isBottomBarDisplayed)
    Displays or hides the user service bottom bar. By default it is displayed.

    Note: the bottom bar is always hidden if no button can be displayed.

    Parameters:
      `isBottomBarDisplayed` - if `true` the bottom bar is displayed, if `false` the bottom bar is hidden,

  - ### setDefaultButtons

    void setDefaultButtons(UserServiceEvent aSaveCallback)
    Sets the default bottom bar. It displays the standard save, save and close, revert and close buttons.

  - ### setLeftButtons

    void setLeftButtons(UIButtonSpec... buttons)
    Sets the bottom bar left buttons.
    Parameters:
      `buttons` - an array of buttons to display.

  - ### setCenterButtons

    void setCenterButtons(UIButtonSpec... buttons)
    Sets the bottom bar center buttons.
    Parameters:
      `buttons` - an array of buttons to display.

  - ### setRightButtons

    void setRightButtons(UIButtonSpec... buttons)
    Sets the bottom bar right buttons.
    Parameters:
      `buttons` - an array of buttons to display.

  - ### newCloseButton

    UIButtonSpecNavigation newCloseButton()
    Creates a specification for a close button. The label is based on the current EBX® configuration.
    Returns:
      the button specification.
    See Also:
      - `setCloseCallback(UserServiceEvent)`

  - ### newCancelButton

    UIButtonSpecNavigation newCancelButton()
    Creates a specification for a cancel button. The same callback as the close button is called.
    Returns:
      the button specification.
    See Also:
      - `setCloseCallback(UserServiceEvent)`

  - ### newSaveButton

    UIButtonSpecSubmit newSaveButton(UserServiceEvent aCallback)
    Creates a specification for a save button. The label is based on the current EBX® configuration.
    Parameters:
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.
    See Also:
      - `UIButtonSpec.setDefaultButton(boolean)`

  - ### newSaveCloseButton

    UIButtonSpecSubmit newSaveCloseButton(UserServiceEvent aCallback)
    Creates a specification for a save and close button. The label is based on the current EBX® configuration.
    Parameters:
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newRevertButton

    UIButtonSpecNavigation newRevertButton()
    Creates a specification for a revert button. The label is based on the current EBX® configuration.
    Returns:
      the button specification.

  - ### newBackButton

    UIButtonSpecNavigation newBackButton(UserServiceEvent aCallback)
    Creates a specification for a back button.

    By default, the back button does not ask for a confirmation if the current input was modified.

    Returns:
      the button specification.

  - ### newNextButton

    UIButtonSpecSubmit newNextButton(UserServiceEvent aCallback)
    Creates a specification for a next button.
    Parameters:
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newFinishButton

    UIButtonSpecSubmit newFinishButton(UserServiceEvent aCallback)
    Creates a specification for a finish button.
    Parameters:
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newActionButton

    UIButtonSpecNavigation newActionButton(String aLabel, UserServiceEvent aCallback)
    Creates a specification for an action button.

    An action button does not update the fields value on the server side, it simply executes some callback. As a consequence, the callback cannot retrieve the new field values entered by the user if they have not yet been updated by Ajax.

    Furthermore, if the returned `UserServiceEventOutcome` by the callback closes the service or navigates elsewhere in the application, user-entered data will be lost.

    To be sure to get the new values when executing the callback, use the `newSubmitButton(String, UserServiceEvent)` method instead.

    Parameters:
      `aLabel` - the button's label.
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newActionButton

    UIButtonSpecNavigation newActionButton(UserMessage aLabel, UserServiceEvent aCallback)
    Creates a specification for a localized action button.

    An action button does not update the fields value on the server side, it simply executes some callback. As a consequence, the callback cannot retrieve the new field values entered by the user if they have not yet been updated by Ajax.

    Furthermore, if the returned `UserServiceEventOutcome` by the callback closes the service or navigates elsewhere in the application, user-entered data will be lost.

    To be sure to get the new values when executing the callback, use the `newSubmitButton(UserMessage, UserServiceEvent)` method instead.

    Parameters:
      `aLabel` - the button's label.
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newSubmitButton

    UIButtonSpecSubmit newSubmitButton(String aLabel, UserServiceEvent aCallback)
    Creates a specification for a submit button.
    Parameters:
      `aLabel` - the button's label.
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newSubmitButton

    UIButtonSpecSubmit newSubmitButton(UserMessage aLabel, UserServiceEvent aCallback)
    Creates a localized specification for a submit button.
    Parameters:
      `aLabel` - the button's label.
      `aCallback` - the callback that is called when a button is clicked by the user.
    Returns:
      the button specification.

  - ### newTabbedPane

    UserServiceTabbedPane newTabbedPane()
    Creates a tabbed pane.

    If this pane is added to a page whose structure may vary at each display, one should consider using instead the method {`newTabbedPane(String)`.

    Returns:
      the new tabbed pane.
    Since:
      6.0.0

  - ### newTabbedPane

    UserServiceTabbedPane newTabbedPane(String anId)
    Creates a tabbed pane.
    Parameters:
      `anId` - The id for the pane. If this pane is added to a page whose structure may vary at each display, id should be a fixed non `null` value. Not doing so prevents EBX® from reselecting previously selected tabs after a redisplay.
    Returns:
      the new tabbed pane.
    Since:
      6.0.0