Home Reference Source
import FieldSelector from './gui/data-items/FieldSelector.jsx'
public class | source

FieldSelector

Extends:

gui/data-items/FieldSelectorBase.js~FieldSelectorBase → FieldSelector

The purpose of FieldSelector is to provide a list of possible fields from upstream connected tools, as well as store one of them as a choice in your tool's XML configuration. It will write to your tool's XML configuration the text of the name of the chosen field. It will also allow you to add choices as fields which will show up on all "FieldSelectors" which are looking at the same upstream connection. It does have facilities for choosing connection by anchor index, and connection index. The default value is "undefined".

Static Member Summary

Static Public Members
public static

doesFieldExist(fieldName: string): boolean: *

Function that returns true if the option exists in the option list.

public static

Function that adds a field into a the forced field list for the data item.

public static

getFieldStatus(fi: Field): string: *

Function that returns the field status for the specified field.

public static

getFields: array: *

Function that returns the current filtered fields for the data item.

public static

Function that returns the value of the includeNoneOption flag.

public static

getOptionList: array: *

Function that returns the current option list for the data item.

public static

isForcedField(fieldName: string): boolean: *

Function that returns true if the specified field is a forced field.

public static

Function that clears the forced field list for the data item.

public static

setCustomFieldFilter(newFieldFilter: function): *

Function that changes the filter type to a custom function for the data item.

public static

setFieldFilter(filterName: string): *

Function that changes the allowed field types for the data item by specifying a filter.

public static

setOptionList(optionList: array): *

Function that changes the option list for the data item.

Constructor Summary

Public Constructor
public

constructor(dataName: string, dataItemProps: object)

Constructor

Member Summary

Public Members
public

setIncludeNoneOption(includeNoneOptionVal: boolean): *

Function that changes the value of the includeNoneOption flag.

Static Public Members

public static doesFieldExist(fieldName: string): boolean: * source

Function that returns true if the option exists in the option list.

Return:

boolean

If the option exists in the option list.

public static forceFieldInFieldList(field: object): * source

Function that adds a field into a the forced field list for the data item.

public static getFieldStatus(fi: Field): string: * source

Function that returns the field status for the specified field.

Return:

string

The field status: " (Missing)", " (BadType)" or empty string.

public static getFields: array: * source

Function that returns the current filtered fields for the data item.

Return:

array

The current filtered fields.

public static getIncludeNoneOption: boolean: * source

Function that returns the value of the includeNoneOption flag.

Return:

boolean

The includeNoneOption flag.

public static getOptionList: array: * source

Function that returns the current option list for the data item.

Return:

array

The current option list.

public static isForcedField(fieldName: string): boolean: * source

Function that returns true if the specified field is a forced field.

Return:

boolean

If the field is a forced field.

public static removeForcedFields: * source

Function that clears the forced field list for the data item.

public static setCustomFieldFilter(newFieldFilter: function): * source

Function that changes the filter type to a custom function for the data item.

public static setFieldFilter(filterName: string): * source

Function that changes the allowed field types for the data item by specifying a filter. Possible Filters: All, NoBinary, NoBlob, NoSpatial, String, Date, DateOrTime, StringOrDate, NumericOrString, Numeric, SpatialObj, Bool, Time, and Blob

public static setOptionList(optionList: array): * source

Function that changes the option list for the data item.

Public Constructors

public constructor(dataName: string, dataItemProps: object) source

Constructor

Params:

NameTypeAttributeDescription
dataName string

The name of the data item.

dataItemProps object

An object of properties such as hidden, disabled, suppressed etc.

dataItemProps.manager Manager

The data manager.

dataItemProps.anchorIndex number
  • optional
  • default: 0

The index of the anchor from which to choose the upsteam connection.

dataItemProps.connectionIndex number
  • optional
  • default: 0

The index of the connection from which to choose fields.

dataItemProps.fieldType string
  • optional
  • default: 'All'

Allows only this type of field.

dataItemProps.includeNoneOption boolean
  • optional
  • default: false

Adds an option to select no fields.

Public Members

public setIncludeNoneOption(includeNoneOptionVal: boolean): * source

Function that changes the value of the includeNoneOption flag.