Connector for Px5 Add-ins

Author

Proffix Software AG

Version

1.0.0

Hierarchy

  • Px5AddInConnector

Constructors

  • Creates a Px5 connector instance

    Example

    const px5 = new Px5AddInConnector("My Add-in", "1.0", "My Company", message => {
    switch(message.method) {
    case "GetInfoFromPx5":
    console.log("Info from Px5 received", message);
    break;
    default:
    console.log("Something else received", message);
    }
    });

    Parameters

    • addinname: string

      Name of the add-in

    • addinversion: string

      Version of the add-in

    • developer: string

      Person or company who develop the add-in

    • onMessageHandler: ((message: MessageFromPx5) => void) = ...

      Handler for message events from Px5

    Returns Px5AddInConnector

Properties

#insideOfWebView: boolean = true
version: string = "1.0.0"

Methods

  • Sends a message to Px5

    Parameters

    Returns void

  • Change the value of an input control in Px5

    Parameters

    • controlname: string

      Name of the input control in Px5

    • value: Px5InputDataType

      Value

      sends message "ChangeInputValueInPx5" to Px5

      Notice: Hidden pxHelpFields will not be validated

    Returns void

  • Returns the definition of the current add-in

    Returns

    AddInDefinition

    Returns AddInDefinition

  • Gets all controls with values from Px5

    triggers event "GetControlsFromPx5"

    Returns void

  • Request infos from Px5

    triggers event "GetInfoFromPx5"

    Returns void

  • Returns true if the current add-in is loaded in a Px5 WebView

    Returns

    boolean

    Returns boolean

  • Triggers an action in Px5

    Parameters

    • action: Px5Action

      Action to trigger

    • controlname: string

      Name of the control

      sends message "TriggerActionInPx5" to Px5

    Returns void