ABB Ability™ History UI SDK - Client API Reference
    Preparing search index...

    The context interface to be used in components

    interface IContextAPI {
        Builder?: TGetContextBuilder;
        ContextKey: IProperty<string>;
        Event: IEvent<IContext>;
        AddHandler(handler: TContextHandler, itemtype?: ContextItemType): void;
        Fire(cobj?: IContext): void;
        Get(): IContext;
        IsMine(cobj: IContext): boolean;
        Own(cobj: IContext): void;
        RemoveHandler(handler: TContextHandler): void;
        Set(cobj: IContext, callhandlers?: boolean): void;
    }
    Index

    Properties

    The builder for data context from the current component. Can be assigned by the owner component.

    ContextKey: IProperty<string>

    A context key added to the context produced by the current component

    The context event.

    Methods

    • Add a context handler for receiving context from other widgets.

      Parameters

      • handler: TContextHandler

        The context handler callback.

      • Optionalitemtype: ContextItemType

        Is specified adds a handler only for specific context item type.

      Returns void

    • Raises the context event. When called with null event data Context.GetBuilder is called in the owner component.

      Parameters

      • Optionalcobj: IContext

        The context object - if left undefined or null event data Context.GetBuilder is called in the owner component.

      Returns void

    • Gets the context object of the current component - NOTE: uses primarily the context builder, secondarily the currently stored context object.

      Returns IContext

    • Checks if the current component is the owner of the context object.

      Parameters

      Returns boolean

    • Makes the current component the owner of the context object.

      Parameters

      Returns void

    • Remove a context handler.

      Parameters

      Returns void

    • Sets the context object for the current component - NOTE: does not fire the Context event.

      Parameters

      • cobj: IContext

        The context object

      • Optionalcallhandlers: boolean

        Call context handlers in the owner component.

      Returns void