Package com.orchestranetworks.ui

# Interface UIContext

All Known Subinterfaces:
  `UIRequestContext`, `UIResponseContext`

@Deprecated public interface UIContext
Deprecated.
, @see `UICustomWidget`
Common abstract class for `UIBeanEditor` contexts.

A `UIBeanEditor` request context and a response context are both associated with a specific data model node and to a validation context.

See Also:
  - `UIBeanEditor`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `displayOccurrence(Object aValue, boolean useLabels)`
  Deprecated.
  Replaced by `WidgetDisplayContext.displayOccurrence(Object, boolean)`.
  `com.orchestranetworks.hierarchy.Member`
  `getHierarchyMember()`
  Deprecated.
  Replaced by `WidgetDisplayContext.getHierarchyMember()`.
  `HierarchyNode`
  `getHierarchyNode()`
  Deprecated.
  Replaced by `getHierarchyMember()`.
  `Locale`
  `getLocale()`
  Deprecated.
  Replaced by `UISessionContext.getLocale()`
  `SchemaNode`
  `getNode()`
  Deprecated.
  Replaced by `WidgetDisplayContext.getNode()`.
  `SchemaNode`
  `getNode(Path aPath)`
  Deprecated.
  Replaced by `SchemaNode.getNode(Path)` from `WidgetDisplayContext.getNode()`.
  `Path`
  `getPathForListOccurrence(int index)`
  Deprecated.
  Replaced by `WidgetWriterForList.getPathForListOccurrence(int)` Replaced by `WidgetListValidationContext.getPathForListOccurrence(int)`
  `Path`
  `getPathForListOccurrence(int index, boolean isRelative)`
  Deprecated.
  Replaced by `WidgetWriterForList.getPathForListOccurrence(int, boolean)` Replaced by `WidgetListValidationContext.getPathForListOccurrence(int, boolean)`
  `Path`
  `getPathInAdaptation()`
  Deprecated.
  Replaced by `SchemaNode.getPathInAdaptation()` from `WidgetDisplayContext.getNode()`.
  `Session`
  `getSession()`
  Deprecated.
  Replaced by `UISessionContext.getSession()`
  `Object`
  `getValue()`
  Deprecated.
  Replaced by `ValueContext.getValue()` from `WidgetDisplayContext.getValueContext()`.
  `Object`
  `getValue(Path aPath)`
  Deprecated.
  Replaced by `ValueContext.getValue(Path)` from `WidgetDisplayContext.getValueContext()`.
  `String`
  `getWebName()`
  Deprecated.
  Replaced by `WidgetWriter.getWidgetName()` Replaced by `WidgetValidationContext.getWidgetName()`
  `String`
  `getWebNameFor(String aLocalId)`
  Deprecated.
  Replaced by `WidgetWriter.getWidgetName(String)` Replaced by `WidgetValidationContext.getWidgetName(String)`
  `String`
  `getWebNameForPath(Path aPath)`
  Deprecated.
  Replaced by `WidgetWriter.getWidgetName(Path)` Replaced by `WidgetValidationContext.getWidgetName(Path)`
  `String`
  `getWebNameOfParent()`
  Deprecated.
  Replaced by `WidgetWriter.getWidgetNameOfParent()` Replaced by `WidgetValidationContext.getWidgetNameOfParent()`
  `boolean`
  `isCreatingRecord()`
  Deprecated.
  Replaced by `WidgetDisplayContext.isCreatingRecord()`
  `boolean`
  `isDuplicatingRecord()`
  Deprecated.
  Replaced by `WidgetDisplayContext.isDuplicatingRecord()`

- ## Method Details

  - ### getLocale

    @Deprecated Locale getLocale()
    Deprecated.
    Replaced by `UISessionContext.getLocale()`
    Returns the current locale of the user session.

  - ### isCreatingRecord

    @Deprecated boolean isCreatingRecord()
    Deprecated.
    Replaced by `WidgetDisplayContext.isCreatingRecord()`
    Returns `true` if this component is displayed in the context of a new record creation. In this case, the persistent record does not yet exist.
    Since:
      5.5.0

  - ### isDuplicatingRecord

    @Deprecated boolean isDuplicatingRecord()
    Deprecated.
    Replaced by `WidgetDisplayContext.isDuplicatingRecord()`
    Returns `true` if this component is displayed in the context of the duplication of an existing record. In this case, the target persistent record does not yet exist.
    Since:
      5.5.0

  - ### getSession

    @Deprecated Session getSession()
    Deprecated.
    Replaced by `UISessionContext.getSession()`
    Returns the current session.

  - ### getHierarchyMember

    @Deprecated com.orchestranetworks.hierarchy.Member getHierarchyMember()
    Deprecated.
    Replaced by `WidgetDisplayContext.getHierarchyMember()`.
    Returns current hierarchy node if the current `UIBeanEditor` is instantiated in the context of a hierarchy. Returns `null` otherwise.

    This method allows specializing the look and feel of user interface for hierarchy contexts.

  - ### getHierarchyNode

    @Deprecated HierarchyNode getHierarchyNode()
    Deprecated.
    Replaced by `getHierarchyMember()`.

  - ### getValue

    @Deprecated Object getValue()
    Deprecated.
    Replaced by `ValueContext.getValue()` from `WidgetDisplayContext.getValueContext()`.
    Returns the current value of the current node.

  - ### getValue

    @Deprecated Object getValue(Path aPath)
    Deprecated.
    Replaced by `ValueContext.getValue(Path)` from `WidgetDisplayContext.getValueContext()`.
    Returns the value at the specified path.
    Parameters:
      `aPath` - the location of the target relative to the current node (to maximize reusability, it is advised to use a relative path)

  - ### displayOccurrence

    @Deprecated String displayOccurrence(Object aValue, boolean useLabels)
    Deprecated.
    Replaced by `WidgetDisplayContext.displayOccurrence(Object, boolean)`.
    Returns a string to display the specified value according to the current locale of this context.

    The specified value must be related to the current node.

    See Also:
      - `SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)`

  - ### getNode

    @Deprecated SchemaNode getNode()
    Deprecated.
    Replaced by `WidgetDisplayContext.getNode()`.
    Returns the node to which the component is attached, as specified in the data model.
    See Also:
      - `ValueContext.getNode()`

  - ### getPathInAdaptation

    @Deprecated Path getPathInAdaptation()
    Deprecated.
    Replaced by `SchemaNode.getPathInAdaptation()` from `WidgetDisplayContext.getNode()`.
    Returns the path of the current node to which the component is attached.

    The result of this method is more precise than `getNode().getPathInAdaptation()` because it is able to specify indexes (position predicates in XPath).

    See Also:
      - `Step.isIndexed()`
      - `getNode()`

  - ### getPathForListOccurrence

    @Deprecated Path getPathForListOccurrence(int index)
    Deprecated.
    Replaced by `WidgetWriterForList.getPathForListOccurrence(int)` Replaced by `WidgetListValidationContext.getPathForListOccurrence(int)`

    Returns the absolute path of an occurrence at the specified index under the current aggregated list field (`maxOccurs > 1`).

    This method can be useful for UI beans that implement `UIBeanEditor.addList(UIResponseContext)` to call the best matching widget for each occurrence.

    Parameters:
      `index` - The index of an occurrence in the current aggregated list field.
    Returns:
      The path of an occurrence at the specified index.
    Since:
      5.2.0
    See Also:
      - `Step.isIndexed()`
      - `UIBeanEditor.addList(UIResponseContext)`
      - `getPathForListOccurrence(int, boolean)`

  - ### getPathForListOccurrence

    @Deprecated Path getPathForListOccurrence(int index, boolean isRelative)
    Deprecated.
    Replaced by `WidgetWriterForList.getPathForListOccurrence(int, boolean)` Replaced by `WidgetListValidationContext.getPathForListOccurrence(int, boolean)`

    Returns the path of an occurrence at the specified index under the current aggregated list field (`maxOccurs > 1`).

    This method can be useful for UI beans that implement `UIBeanEditor.addList(UIResponseContext)` to call the best matching widget for each occurrence.

    Parameters:
      `index` - The index of an occurrence in the current aggregated list field.
      `isRelative` - If true, the returned path will be relative. If false, it will be absolute.
    Returns:
      The path of an occurrence at the specified index.
    Since:
      5.5.0
    See Also:
      - `Step.isIndexed()`
      - `UIBeanEditor.addList(UIResponseContext)`

  - ### getNode

    @Deprecated SchemaNode getNode(Path aPath)
    Deprecated.
    Replaced by `SchemaNode.getNode(Path)` from `WidgetDisplayContext.getNode()`.
    Returns the node located at the specified path.

    This method is equivalent to : UIContext.getNode().getNode(aPath)

    See Also:
      - `SchemaNode.getNode(Path)`

  - ### getWebNameFor

    @Deprecated String getWebNameFor(String aLocalId)
    Deprecated.
    Replaced by `WidgetWriter.getWidgetName(String)` Replaced by `WidgetValidationContext.getWidgetName(String)`
    Returns a string that uniquely identifies the entity specified in the context of the current component in the current page.

    The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.

    Parameters:
      `aLocalId` - must respect the pattern `[a-zA-Z0-9_.-]+`

  - ### getWebNameForPath

    @Deprecated String getWebNameForPath(Path aPath)
    Deprecated.
    Replaced by `WidgetWriter.getWidgetName(Path)` Replaced by `WidgetValidationContext.getWidgetName(Path)`
    Returns a string that uniquely identifies the entity specified in the context of the current component in the current page.

    The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.

    Parameters:
      `aPath` - location of the target relative to the current node. An absolute path may be used only for instance nodes.

  - ### getWebNameOfParent

    @Deprecated String getWebNameOfParent()
    Deprecated.
    Replaced by `WidgetWriter.getWidgetNameOfParent()` Replaced by `WidgetValidationContext.getWidgetNameOfParent()`
    Returns a string that uniquely identifies the entity specified in the context of the current component in the current page.

    The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.

  - ### getWebName

    @Deprecated String getWebName()
    Deprecated.
    Replaced by `WidgetWriter.getWidgetName()` Replaced by `WidgetValidationContext.getWidgetName()`
    Returns a string that uniquely identifies the current component in the current page.

    The web name is only to be used on custom external components (with the HTML attribute name or id for example). It must not be used to manipulate native components or widgets. Native components are internal and the web name policy can be modified at any time.