Class: InstanceViewPanel

components~InstanceViewPanel(instance, booleanTranslateFunction, optionsopt)

A panel that displays a given JSON instance.

Although, strictly speaking, this component has no interactive control, it implements the module:components~InputComponent interface as it has to provide a mean to retrieve the displayed instance.

Constructor

new InstanceViewPanel(instance, booleanTranslateFunction, optionsopt)

Parameters:
Name Type Attributes Default Description
instance any

The JSON instance to be displayed.

booleanTranslateFunction function

A function that maps boolean values into strings.

options object <optional>
{}

Parameters considered to generate the component.

Properties
Name Type Attributes Description
bootstrap string <optional>

If given, it indicates the Bootstrap version which the component should be built for.

Implements:
Source:

Members

domElement :HTMLDivElement

Reference to the DOM object that contains the HTML structure of the component.

Type:
  • HTMLDivElement
Inherited From:
Implements:
Source:

instance :any

The instance to display.

Type:
  • any
Source:

Methods

disable()

Disables the component.

Inherited From:
Implements:
Source:

enable()

Enables the component.

Inherited From:
Implements:
Source:

getId() → {any}

Returns the id of the input control element.

Implements:
Source:
Returns:

The value taken by the component.

Type
any

getValue() → {any}

Returns the value assigned to the component.

Implements:
Source:
Returns:

The value taken by the component.

Type
any