Member Junction
    Preparing search index...

    Callbacks a component can use.

    interface ComponentCallbacks {
        CreateSimpleNotification: (
            message: string,
            style: "none" | "success" | "error" | "warning" | "info",
            hideAfter?: number,
        ) => void;
        NotifyEvent?: (eventName: string, args: BaseEventArgs) => Promise<void>;
        OpenEntityRecord: (entityName: string, key: CompositeKey) => void;
        RegisterMethod: (methodName: string, handler: Function) => void;
    }
    Index

    Properties

    CreateSimpleNotification: (
        message: string,
        style: "none" | "success" | "error" | "warning" | "info",
        hideAfter?: number,
    ) => void

    Display a short non-blocking notification message to the user. The container will determine how best to display this message.

    Type Declaration

      • (
            message: string,
            style: "none" | "success" | "error" | "warning" | "info",
            hideAfter?: number,
        ): void
      • Parameters

        • message: string

          text to display

        • style: "none" | "success" | "error" | "warning" | "info"

          display styling

        • OptionalhideAfter: number

          option to auto hide after the specified delay in milliseconds

        Returns void

    NotifyEvent?: (eventName: string, args: BaseEventArgs) => Promise<void>

    Notify the container of a component event. For cancelable events, the container can set args.cancel = true before the await resolves.

    OpenEntityRecord: (entityName: string, key: CompositeKey) => void

    If an action occurs inside a component where it would be desirable for the containing UI to open a specific record, if supported, this event can be listened to and the container UI can then open the record.

    Type Declaration

      • (entityName: string, key: CompositeKey): void
      • Parameters

        • entityName: string

          this is the Entity NAME from the Entity metadata, not the table name or base view name. Use Entity Metadata to provide the entity name here

        • key: CompositeKey

          this is an array of key/value pairs representing the primary key. The format of a Composite Key is an array of KeyValuePair objects and KeyValuePair objects simply have FieldName and Value properties. In most cases entities have single-valued primary keys but this structure is here for complex entity types that have composite primary keys

        Returns void

    RegisterMethod: (methodName: string, handler: Function) => void

    Allows a component to register methods that can be called by the container.

    Type Declaration

      • (methodName: string, handler: Function): void
      • Parameters

        • methodName: string

          Name of the method being registered

        • handler: Function

          The method implementation

        Returns void