Classes that implement bind commands through AJAX. The class handles data communication with the server and executes binding commands in the AJAX manner.

Hierarchy (view full)

Constructors

Properties

_guid: string

Unique identifier of the object (GUID). Uniquely identifies the object.

_type: Function

The generator function of the object. The function used when the object was created.

config: object

This is the setting for the AJAX request. Same format as 'config' in axios.

url: string

Sets the URL for the AJAX request.

_NS: string

Indicates the namespace.

'Meta'
_PARAM: []

List of parameters used for the constructor.

_UNION: []

List of implemented interfaces.

[IObject, IMarshal]

Methods

  • Implement the AJAX adapter pattern. Used in web and Node.js environments.

    Parameters

    • setup: object

      'axios' setting object.

    Returns Promise<void>

    'Promise' object representing the result of the call.

  • Called if the AJAX request is successfully completed.

    Parameters

    • result: object

      result data received from the server.

    • status: object

      Request status.

    • xhr: object

      'XMLHttpRequest' object.

    Returns void

  • Implement AJAX bindings. Establish data communication with the server and process requests.

    Returns Promise<void>

    Object 'Promise' indicating completion of asynchronous operation.

  • Called if the AJAX request fails.

    Parameters

    • xhr: object

      'XMLHttpRequest' object.

    • status: object

      Request status.

    • error: object

      Error information.

    Returns void

  • Perform a validation. The column to be examined is set through the 'valid.column' property.

    Returns boolean

  • Compare the current object with the specified object.

    Parameters

    • target: object

      the object to be compared to.

    Returns boolean

    Returns whether the two objects are the same.

  • Run the bind command. Performs the entire execution process, including validation, binding, result processing, success, and error callback.

    Returns Promise<void>

    Object 'Promise' representing the execution result.

  • Obtain the current object as a guide type object. (Circular references are replaced by $ref values.)

    Parameters

    • OptionalvOpt: number

      is the import option. Default is 0.

      • opt=0: Reference structure (_guid: Yes, $ref: Yes)
      • opt=1: Redundant structure (_guid: Yes, $ref: Yes)
      • opt=2: Non-tidal structure (_guid: No, $ref: No)
    • Optionalowned: object | object[]

    Returns object

    Returns serialized objects.

    a.getObject(2) == b.getObject(2)
    
  • Returns the creators of the current object and all the creators of the prototype chain to the array.

    Returns Function[]

    Returns the array of generator functions.

    const types = obj.getTypes();
    console.log(types); // [Function: MetaObject]
  • Verify that the current object is an instance of the specified type (including _UNION)

    Parameters

    • target: string | object

      The type of object to be checked (object or string).

    Returns boolean

    Returns whether it is an instance of the specified type.

  • Sets the Guid type object to the current object. (The object will be reset.)

    Parameters

    • oGuid: object

      Object of the guid type to serialize.

    • Optionalorigin: object

      The source object setting the current object. (Optional)

    Returns void