Skip to content

Extension

ExtensionFormCell control is used to render an entire custom cell inside a FormCell Container. It gives the application designer the ability to customize the look-and-feel and behavior of the client via their own extensions.


When assigning a rule to a property of Extension, the rule will be passed an instance of the following proxy class as an argument:


Extension Properties

Property Type Required Default
Class string Yes
Control string No
ExtensionProperties object No
Height integer No
IsVisible boolean No true
Module string No
OnPress ActionOrRule No
OnValueChange ActionOrRule No
Separator boolean No true
Target LinkQueryTarget No
_Name string Yes
_Type const Yes

Class

The name of the exported class in the module control that is to be used for the extension. On iOS, if no TS module is implemented, the native extension class targeted by this property must be declared as public to ensure proper lifecycle management.

  • type: string

Control

The name of the file under the controls folder in your module. e.g. MyExtension, if your file name is /extensions/<Module>/controls/MyExtension.ts. If not specified, module name would be used as the value for this property.

  • type: string

ExtensionProperties

Additional properties to be passed to the Extension

  • type: object

Height

The height of the extension in Device Independent Pixel. The DIP value will be converted to pixels of the platform (based on scale and on density for iOS and Android respectively).

  • type: integer

IsVisible

Sets the visibility of the control.

  • type: boolean
  • default: true

Module

The module's folder name under /extensions/ e.g. MyExtModule. On iOS, this property is optional, as the platform supports omitting TS code under /extensions/<Module>/controls.

  • type: string

OnPress

Action/Rule to be triggered when the extension is pressed


OnValueChange

Action/Rule to perform after value changed. See extension implementation for details.


Separator

Sets the visibility of the separator line below the control. This property will take precedence over ControlSeparator in section and is only supported for Form Cell control in Sectioned Table and not supported in Form Cell Container.

  • type: boolean
  • default: true

Target

Binding target for this extension


_Name

UID to reference this control

  • type: string

_Type

  • type: const

The value of this property must be:

"Control.Type.FormCell.Extension"

Examples

{
  "_Type": "Page",
  "_Name": "FormCellsPage",
  "Caption": "Extension FormCell Page",
  "Controls": [{
    "_Name": "FormCellContainer",
    "_Type": "Control.Type.FormCellContainer",
    "Sections": [{
      "Caption": "Extension FormCell Section",
      "Controls": [{
        "_Type": "Control.Type.FormCell.Extension",
        "_Name": "ExtensionFormCell",
        "Module": "DevAppExtension",
        "Control": "MyFormCellExtension",
        "Class": "MyFormCellExtension",
        "Height": 300,
        "ExtensionProperties": {
          "MyProp1": {
            "Caption": "Test"
          },
          "MyProp2": "/MDKApp/Globals/Test.global",
          "MyEvent1": "/MDKApp/Actions/Messages/Message2.action"
        },
        "Target": {
          "EntitySet": "MyWorkOrderHeaders",
          "Service": "/MDKApp/Services/Amw.service",
          "QueryOptions": "$expand=Operations&$orderby=OrderId&$top=3"
        },
        "OnPress": "/MDKApp/Actions/Messages/Message.action"
      }]
    }]
  }]
}