Options
All
  • Public
  • Public/Protected
  • All
Menu

Module on

JMap.Event.Query.on

Here you have all JMap NG Core query events on which you can attach a listener.

Index

Functions

beforeSubmit

  • beforeSubmit(listenerId: string, fn: function): void
  • JMap.Event.Query.on.beforeSubmit

    This event is triggered when a query is submitted, before the call to the server is made.

    example
    
    // log a message in the console once the button submit is clicked.
    JMap.Event.Query.on.beforeSubmit(
      "custom-query-before-submit",
      params => console.log("A query to the server will be done", params)
    )

    Parameters

    Returns void

error

  • error(listenerId: string, fn: function): void
  • JMap.Event.Query.on.error

    This event is triggered when a query has been processed, but an error occured.

    If the max result limit is reach, an error is thrown, and this event is triggered.

    example
    
    // log a message in the console if a query error occured
    JMap.Event.Query.on.error(
      "custom-query-error",
      params => console.log("A query to the server has failed", params)
    )

    Parameters

    Returns void

queryFormLoad

  • queryFormLoad(listenerId: string, fn: function): void
  • JMap.Event.Query.on.queryFormLoad

    This event is triggered when a query form has been loaded.

    example
    
    // log a message in the console once a query form has been fetched from server.
    JMap.Event.Query.on.queryFormLoad(
      "custom-query-form-load",
      params => console.log("A query form has been loaded from server", params.query)
    )

    Parameters

    Returns void

success

  • success(listenerId: string, fn: function): void
  • JMap.Event.Query.on.success

    This event is triggered when a query has been processed, after the call to the server has been made.

    example
    
    // log a message in the console once the server has responded
    JMap.Event.Query.on.success(
      "custom-query-success",
      params => console.log("A query to the server has been done", params)
    )

    Parameters

    Returns void