Class: Panel

Panel


new Panel()

JavaScript class to represent the adaptive forms Panel Component. Instantiation of the class is not permitted and doing so will throw a runtime exception

Since:
  • 6.0

Extends

Members


<readonly> minOccur :Number

Specifies the minimum number of times the Panel will be repeated.

This property can be set through the Panel Dialog. If the value is set greater than 1, the panel will be repeated at least that many times.

Negative values are ignored

Type:
  • Number
Since:
  • 6.0

<readonly> maxOccur :Number

Specifies the maximum number of times the Panel can be repeated.

The property can be set through the Panel Dialog. If the value is set greater than 1, the panel can be repeated at most that many times.

Type:
  • Number
Since:
  • 6.0

<readonly> repeatable :Boolean

Specifies if the panel is repeatable or not

* A Panel is considered repeatable if the value of minOccur property is strictly less than maxOccur

Type:
  • Boolean
Since:
  • 6.0

<readonly> panel :Panel

returns itself

Type:
Since:
  • 6.0
Overrides:

<readonly> instanceManager :InstanceManager

returns the InstanceManager object managing this Panel object.

Each Panel object is managed by an InstanceManager which provides API, to retrieve the instances of the Panel, create and remove instances

Type:
Since:
  • 6.0

<readonly> instanceIndex

returns the index of the repeatable instances of this panel before it.

Each repeatable panel object has a property instanceIndex which indicates the number of repeatable instances before it. The first instance has instanceIndex 0 as there are no instances before it.

Since:
  • 6.0

<readonly> title :string

returns the title associated with the panel

Type:
  • string
Since:
  • 6.0
Overrides:

summary :string

returns the summary of the Panel.

In accordion layouts, one can show the summary of the Panel. The property is controlled by the value of the summary expression

Type:
  • string
Since:
  • 6.0

<readonly, non-null> index :number

Index of the Node among its siblings having the same name as itself

Every node in the Adaptive Form field has an index depending on the number of same named siblings that the node has before it. If the element has no same named sibling its index will always be 0.

Type:
  • number
Since:
  • 6.0
Inherited From:

<readonly, nullable> nonLocalizedTitle :string

Non Localized Title of the element.

Type:
  • string
Since:
  • 6.0
Inherited From:

<readonly, non-null> somExpression :string

SOM Expression of the Node.

In Adaptive Forms SOM is a model to access fields and Panels. The SOM Expression provides easy access to the Fields and Objects through a straightforward syntax

Type:
  • string
Since:
  • 6.0
Inherited From:
Example
Considering the heirarchy,
-- guide
  -- panel1
  ---- field2
  ---- panel2
  ------ field3
the som Expression of field3 will be guide[0].panel1[0].panel2[0].field3[0]. The 0 here represents
the same name sibling index of that particular item in its parent. If panel2 has an additional child field3 as
  ---- panel2
  ------- field3
  ------- field3
The second field3 would have the somExpression guide[0].panel1[0].panel2[0].field3[1]

<readonly, non-null> name :string

Name of the node

Type:
  • string
Since:
  • 6.0
Inherited From:

visible :boolean

Visiblity of the Node. True if it's visible otherwise false.

Type:
  • boolean
Since:
  • 6.0
Inherited From:
See:

<readonly, nullable> longDescription :String

Specifies the long description present in the Scriptable object

In AF, one can define long Description for the Objects. This API returns the long Description set on the Objects.

Type:
  • String
Since:
  • 6.0
Inherited From:

<readonly, nullable> shortDescription :String

The short description defined in the Scriptable object.

In AF, one can define short Description for the Fields. This API returns the short Description set on the Field. It is non null only for Field objects

Type:
  • String
Since:
  • 6.0
Inherited From:

<readonly> items :Array.<GuideNode>

returns a list of children inside the component.

Each item in the array can either be a Field or a Panel

Type:
Since:
  • 6.0
Inherited From:

dorExclusion :boolean

Whether the object is excluded from DOR or not

The property specifies the exclusion of the field from document of record. If the value is true, then the field is excluded otherwise included in DoR. If excludeFromDoRIfHidden property is set at guide container, the value of dorExclusion is derived from visibility of field dynamically.

Type:
  • boolean
Since:
  • 6.1-FP1
Inherited From:

Type:
Since:
  • 6.2

enabled :boolean

Specifies whether the component is enabled or read-only.

If the value of the property is true, the component is enabled otherwise disabled (read-only).

If a Panel is set to be disabled, then all of its descendants become disabled. But if a Panel is set to be enabled than all its descendant that are not disabled (i.e. their enabled property is not explicitly set to false) become enabled.

Type:
  • boolean
Since:
  • 6.2
Overrides:

<readonly> isXsd :boolean

Whether the element is bound to XSD element or not

In AF, components can be bound to Schema(XML/JSON) or XFA elements. This API returns true if the component is bound to XML Schema false otherwise

Type:
  • boolean
Since:
  • 6.2
Inherited From:

<readonly> bindRef :String

Binding specified for the object

In AF, components can be bound to XML Schema or XFA elements. This API returns that binding. In case of XFA elements, it returns the SOM Expression of that element otherwise the XPATH of the element.

Type:
  • String
Since:
  • 6.2
Inherited From:

isNavigable :boolean

Specifies whether the layout configured for the panel is navigable or not

This property check for the "non navigable" property of the layout associated with the panel component.

Type:
  • boolean
Since:
  • 6.3

stateOverrides :map

overridden state of object

The property specifies overridden state in field

Type:
  • map
Since:
  • 6.5
Inherited From:

Methods


validate(errorList)

Runs the validations of all its descendants and return its results.

The API iterates over all the children of Panel and calls their validate API. If a child is marked as lazy loaded Panel, then that child is loaded and its validations are run as well.

Parameters:
Name Type Description
errorList Array.<Field~ValidationError>

The array will be filled with the ValidationError object if the validations on the field fail.

Since:
  • 6.0
Overrides:
See:
Returns:

true if all the validations of all its descendant passes, false otherwise

Type
boolean

visit(callback, context)

Executes a callback on the element and its children.

The callback is called for the element and all its children.

Parameters:
Name Type Description
callback GuideNode~VisitorCallback
context Object

this parameter to be used

Since:
  • 6.0
Inherited From:

resetData()

reset the data of all the Fields present inside this container

Since:
  • 6.0
Inherited From: