Controls
The editor determines the most appropriate control and panel type for each parameter based on the context (parameter type, role, group type, etc.). Although an author can specify a desired control for a given parameter via its uihints, this should be used sparingly and carefully - specifying an inappropriate control for a parameter will lead to undefined behavior.
A visual documentation containing examples of the following group/panels and control types are available at https://wdp-common-canvas-dev.stage1.mybluemix.net/#/properties.
Group/panel controls
Controls are grouped and arranged on panels and sub-panels within the “group_info” section of operator uihints. Some panels appear as tab controls, others are for managing shared dataset metadata, while still others contain nested sub-panels.
controls
A general panel type containing parameter controls.tabs
A tabbed control, each tab containing sub-panels and controls.subTabs
A vertical sub-tabbed control, each tab containing sub-panels and controls.panels
A panel type that contains sub-panels.panelSelector
A panel containing sub-panels that are shown or hidden based upon a controlling radio selection.columnSelection
A panel type containing field-selection controls that share a common set of fields.customPanel
A custom panel for displaying user defined control. Found here .summaryPanel
A panel used in the flyout editor that will provide a link to open a wide flyout that can contain panels and parameter.actionPanel
A panel used for containing action controls.textPanel
A panel used to display static label and/or description.twistyPanel
A panel used to display a panel title that expands to the panel content when clicked.columnPanel
A panel used to display children side by side.
Parameter controls
The following controls are supported in the Common Properties editor. Control types are intended for use with particular parameter types:
readonly
A read only text field. Used for fields users shouldn’t edit.hidden
A control that has no UI to display.textfield
A single line editable text field.passwordfield
A masked single line text field.textarea
A multi-line text area.list
A single column table for editing a list of values.expression
An expression editing field that provides language specific syntax highlighting and text auto complete. An expression builder addon is available with the expression control. You must provide theexpressionInfo
field for thepropertiesInfo
config. Found here.code
An code editing field that provides language specific syntax highlighting and text auto complete.numberfield
A numeric text field. Number fields can also optionally display a random number generator beside the control label. See the uihints schema for details.spinner
A standard spinner control to increment/decrement the number value.checkbox
A standard checkbox control.radioset
A radio set where a parameter value is selected from a small range of options. See the Conditions wiki page for special radio button disabling options.checkboxset
A checkbox set for list type parameters with enumerated options where the count is less than 5.oneofselect
A standard dropdown list control.multiselect
A standard dropdown list control that allows for multiple selection.someofselect
A multi-selection control for enumerated list parameters where the count is greater than 4.selectcolumn
A droplist control that selects from available column names.selectcolumns
A multi-select control for column selections.toggletext
A two-state control with optional icons that can exist on its own or within table cells.structuretable
Table control for editing lists or maps of complex types that have field names in the first column.structurelisteditor
For lists or maps of complex types that are not field-oriented parameters.structureeditor
Allows one to define a structure and use it directly on a panel. Each structure member is surfaced as an individual control. Supports a layout setting that allows one to position structureeditor controls in a grid (see below).readonlyTable
A read only table. Used for tables to display fields that users shouldn’t edit.custom
A custom control for displaying a user defined control. Found here .
When a given node can accept more than a single datarecord-metadata object as input, it becomes necessary to store the schema name (a.k.a. ‘link_name’) along with each field name that is stored in parameter sets. In those cases, instead of using strings to store field names, they are represented in parameter sets as compound objects containing both ‘link_ref’ and ‘field_name’ elements:
"current_parameters": {"field": { "link_ref": "Schema-1", "field_name": "Age" },...
In order to indicate that a given node can potentially accept multiple input data links and would thus require compound field name storage, all parameter definitions within the node that contain "role": "column"
, whether located at the top level or within complex types, should declare their data types as “object” instead of “string”:
edit_style"parameters": [{"id": "fields","type": "array[object]","role": "column","required": true},...
When editing complex type values in tables one can either edit cell values inline or in a sub panel:
subpanel
A small sub-dialog is launched to edit cell values.inline
Controls appear inline within table cells for editing values.on_panel
Control appears below the table when the row is selected.
moveable_rows
boolean - A value that appears in “complex_type_definition” sections. If set totrue
allows rows in the table to be moved up and down for reordering.row_selection
enum [“single”, “multiple”] - Determines how many rows can be selected in a table at one time. Defaults to multiple.sortable
boolean - Both sortable and filterable apply to table columns. When set within the “key_definition” or the “parameters” sections of a structure definition, those columns are sortable and/or can be filtered upon.filterable
boolean (see sortable above)language
enum [“CLEM”, “text/x-hive”] - The language for the expression control syntax highlight and text auto complete feature. If not specified, the expression control does not have syntax highlighting or text auto complete.layout
A two-dimensional string array value that appears in “complex_type_definition” sections and allows one to layout structureeditor controls in a two dimensional grid.