Interface PickList
- All Known Implementing Classes:
ComboBoxItem
,PresetCriteriaItem
,PresetDateRangeItem
,SavedSearchItem
,SelectItem
,SelectOtherItem
SelectItem
and ComboBoxItem
classes.-
Method Summary
Modifier and TypeMethodDescriptionReturns the data to display in the pick list.If true, when the pickList is shown, it will be shown via an animated reveal effectint
If this.animatePickList is true - this specifies the duration of the animation effect applied when showing the pickListReturns the set of data to be displayed in this item's PickList.Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (optionDataSource
is unset), or bound to the same dataSource as the form as a whole, this is implemented by picking up the value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from theoptionDataSource
where thevalueField
matches this item's value, and displaying thedisplayField
value from that record.
This essentially enables the specifiedoptionDataSource
to be used as a server basedValueMap
.Returns thedisplayField
for this form item.int
Height for an empty pick list (showing the empty message), if the pick list has no records andhideEmptyPickList
isfalse
.Empty message to display in the pickList ifhideEmptyPickList
isfalse
.For a ComboBox or other pickList that accepts user-entered criteria, how many millseconds to wait after the last user keystroke before fetching data from the server.IffilterLocally
is set for this item, and this item is showing options from a dataSource, fetch the entire set of options from the server, and use these values to map the item value to the appropriate display value.If this pickList contains no options, should it be hidden? If unset, default behavior is to allow the empty pickList to show if it is databound.Base Style for pickList cells.int
Cell Height for this item's pickList.If this item has a databound pick-list (for exampleoptionDataSource
is set) this property can be used to provide static filter criteria when retrieving the data for the pickList.int
If this pick list is showing multiple fields, this property determines the height of the column headers for those fields.int
Maximum height to show the pick list before it starts to scroll.Maximum width for this item's pickList.Default width to show the pickList.If true, even non-matching options will be shown, with configurableseparatorRows
in between.If this item is part of a databound form, and has a specifiedvalueMap
by default we show the valueMap options in the pickList for the item.When applying filter criteria to pickList data, what type of matching to use.If this form item maps data values to display values by retrieving thedisplayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be thename
of this form item.Getter method to retrieve thevalueField
for this item.For Databound formItems, this property determines which columnvalueIcons
should show up in for this formItem's pickList.
If unset valueIcons show up in thedisplayField
column if specified, otherwise thevalueField
column.
In most cases only thedisplayField
orvalueField
will be visible.void
setAnimatePickList
(Boolean animatePickList) If true, when the pickList is shown, it will be shown via an animated reveal effectvoid
setAnimationTime
(int animationTime) If this.animatePickList is true - this specifies the duration of the animation effect applied when showing the pickListsetDisplayField
(String displayField) Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (optionDataSource
is unset), or bound to the same dataSource as the form as a whole, this is implemented by picking up the value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from theoptionDataSource
where thevalueField
matches this item's value, and displaying thedisplayField
value from that record.
This essentially enables the specifiedoptionDataSource
to be used as a server basedValueMap
.void
setEmptyPickListHeight
(int emptyPickListHeight) Height for an empty pick list (showing the empty message), if the pick list has no records andhideEmptyPickList
isfalse
.setEmptyPickListMessage
(String emptyPickListMessage) Empty message to display in the pickList ifhideEmptyPickList
isfalse
.void
setFetchDelay
(Integer fetchDelay) For a ComboBox or other pickList that accepts user-entered criteria, how many millseconds to wait after the last user keystroke before fetching data from the server.setFilterLocally
(Boolean filterLocally) IffilterLocally
is set for this item, and this item is showing options from a dataSource, fetch the entire set of options from the server, and use these values to map the item value to the appropriate display value.void
setHideEmptyPickList
(Boolean hideEmptyPickList) If this pickList contains no options, should it be hidden? If unset, default behavior is to allow the empty pickList to show if it is databound.setOptionDataSource
(DataSource dataSource) void
setOptionFilterContext
(DSRequest dsRequestProperties) If this item has a specifiedoptionDataSource
, and this property is
 not null, this will be passed to the datasource asRPCRequest
properties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mappingvoid
setPickListBaseStyle
(String pickListBaseStyle) Base Style for pickList cells.void
setPickListCellHeight
(int pickListCellHeight) Cell Height for this item's pickList.setPickListCriteria
(Criteria pickListCriteria) If this item has a databound pick-list (for exampleoptionDataSource
is set) this property can be used to provide static filter criteria when retrieving the data for the pickList.void
setPickListFilterCriteriaFunction
(FilterCriteriaFunction filterCriteriaFunction) Set the pick list filter criteria function / handler.void
setPickListHeaderHeight
(int pickListHeaderHeight) If this pick list is showing multiple fields, this property determines the height of the column headers for those fields.void
setPickListHeight
(int pickListHeight) Maximum height to show the pick list before it starts to scroll.void
setPickListMaxWidth
(Integer pickListMaxWidth) Maximum width for this item's pickList.void
setPickListWidth
(Integer pickListWidth) Default width to show the pickList.setSeparatorRows
(ListGridRecord[] separatorRows) Array of records to show between matching and non-matching rows in the PickList.setShowAllOptions
(Boolean showAllOptions) If true, even non-matching options will be shown, with configurableseparatorRows
in between.setShowOptionsFromDataSource
(Boolean showOptionsFromDataSource) If this item is part of a databound form, and has a specifiedvalueMap
by default we show the valueMap options in the pickList for the item.setTextMatchStyle
(TextMatchStyle textMatchStyle) When applying filter criteria to pickList data, what type of matching to use.setValueField
(String valueField) If this form item maps data values to display values by retrieving thedisplayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be thename
of this form item.void
setValueIconField
(String valueIconField) For Databound formItems, this property determines which columnvalueIcons
should show up in for this formItem's pickList.
If unset valueIcons show up in thedisplayField
column if specified, otherwise thevalueField
column.
In most cases only thedisplayField
orvalueField
will be visible.
-
Method Details
-
setPickListHeight
void setPickListHeight(int pickListHeight) Maximum height to show the pick list before it starts to scroll. Note that by default the pickList will be sized to the height required by its content so it will be taller when more rows are available as selectable options- Parameters:
pickListHeight
- pickListHeight Default value is 300
-
getPickListHeight
int getPickListHeight()Maximum height to show the pick list before it starts to scroll. Note that by default the pickList will be sized to the height required by its content so it will be taller when more rows are available as selectable options- Returns:
- int
-
setEmptyPickListHeight
void setEmptyPickListHeight(int emptyPickListHeight) Height for an empty pick list (showing the empty message), if the pick list has no records andhideEmptyPickList
isfalse
.- Parameters:
emptyPickListHeight
- emptyPickListHeight Default value is 100
-
getEmptyPickListHeight
int getEmptyPickListHeight()Height for an empty pick list (showing the empty message), if the pick list has no records andhideEmptyPickList
isfalse
.- Returns:
- int
-
setEmptyPickListMessage
Empty message to display in the pickList ifhideEmptyPickList
isfalse
.Note : This is an advanced setting
- Parameters:
emptyPickListMessage
- emptyPickListMessage Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getEmptyPickListMessage
String getEmptyPickListMessage()Empty message to display in the pickList ifhideEmptyPickList
isfalse
.- Returns:
- String
-
setHideEmptyPickList
If this pickList contains no options, should it be hidden? If unset, default behavior is to allow the empty pickList to show if it is databound.- Parameters:
hideEmptyPickList
- hideEmptyPickList Default value is null
-
getHideEmptyPickList
Boolean getHideEmptyPickList()If this pickList contains no options, should it be hidden? If unset, default behavior is to allow the empty pickList to show if it is databound.- Returns:
- Boolean
-
setPickListWidth
Default width to show the pickList. If not specified, the width of this form item's element will be used instead.- Parameters:
pickListWidth
- pickListWidth Default value is null
-
getPickListWidth
Integer getPickListWidth()Default width to show the pickList. If not specified, the width of this form item's element will be used instead.- Returns:
- Integer
-
setPickListMaxWidth
Maximum width for this item's pickList. By default if the values displayed in this pickList are wider than the specifiedsetPickListWidth
the pickList will render wide enough to accomodate them. This property allows the developer to limit how wide the pickList will render.- Parameters:
pickListMaxWidth
- pickListMaxWidth Default value is 400
-
getPickListMaxWidth
Integer getPickListMaxWidth()Maximum width for this item's pickList. By default if the values displayed in this pickList are wider than the specifiedsetPickListWidth
the pickList will render wide enough to accomodate them. This property allows the developer to limit how wide the pickList will render.- Returns:
- Integer
-
setPickListBaseStyle
Base Style for pickList cells. As with ListGrid Cells, will have 'over', 'selected' and 'disabled' appended on changes of state for the cells.- Parameters:
pickListBaseStyle
- pickListBaseStyle Default value is "pickListCell"
-
getPickListBaseStyle
String getPickListBaseStyle()Base Style for pickList cells. As with ListGrid Cells, will have 'over', 'selected' and 'disabled' appended on changes of state for the cells.- Returns:
- String
-
setAnimatePickList
If true, when the pickList is shown, it will be shown via an animated reveal effectNote : This is an advanced setting
- Parameters:
animatePickList
- animatePickList Default value is null
-
getAnimatePickList
Boolean getAnimatePickList()If true, when the pickList is shown, it will be shown via an animated reveal effect- Returns:
- Boolean
-
setAnimationTime
void setAnimationTime(int animationTime) If this.animatePickList is true - this specifies the duration of the animation effect applied when showing the pickListNote : This is an advanced setting
- Parameters:
animationTime
- animationTime Default value is 200
-
getAnimationTime
int getAnimationTime()If this.animatePickList is true - this specifies the duration of the animation effect applied when showing the pickList- Returns:
- int
-
setPickListHeaderHeight
void setPickListHeaderHeight(int pickListHeaderHeight) If this pick list is showing multiple fields, this property determines the height of the column headers for those fields. Set to zero to suppress the headers entirely.- Parameters:
pickListHeaderHeight
- pickListHeaderHeight Default value is 22
-
getPickListHeaderHeight
int getPickListHeaderHeight()If this pick list is showing multiple fields, this property determines the height of the column headers for those fields. Set to zero to suppress the headers entirely.- Returns:
- int
-
setPickListCellHeight
void setPickListCellHeight(int pickListCellHeight) Cell Height for this item's pickList.- Parameters:
pickListCellHeight
- pickListCellHeight Default value is 16
-
getPickListCellHeight
int getPickListCellHeight()Cell Height for this item's pickList.- Returns:
- int
-
setValueField
If this form item maps data values to display values by retrieving thedisplayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be thename
of this form item.Note : This is an advanced setting
- Parameters:
valueField
- valueField Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getValueField
String getValueField()If this form item maps data values to display values by retrieving thedisplayField
values from anoptionDataSource
, this property denotes the the field to use as the underlying data value in records from the optionDataSource.
If unset, assumed to be thename
of this form item.- Returns:
- String
-
setDisplayField
Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (optionDataSource
is unset), or bound to the same dataSource as the form as a whole, this is implemented by picking up the value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from theoptionDataSource
where thevalueField
matches this item's value, and displaying thedisplayField
value from that record.
This essentially enables the specifiedoptionDataSource
to be used as a server basedValueMap
.- Parameters:
displayField
- displayField Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getDisplayField
String getDisplayField()Specifies an alternative field from which display values should be retrieved for this item.
If this item is not databound (optionDataSource
is unset), or bound to the same dataSource as the form as a whole, this is implemented by picking up the value of the specified field from the Form's values object.
Otherwise this item will attempt to map its underlying value to a display value by retrieving a record from theoptionDataSource
where thevalueField
matches this item's value, and displaying thedisplayField
value from that record.
This essentially enables the specifiedoptionDataSource
to be used as a server basedValueMap
.- Returns:
- String
-
setValueIconField
For Databound formItems, this property determines which columnvalueIcons
should show up in for this formItem's pickList.
If unset valueIcons show up in thedisplayField
column if specified, otherwise thevalueField
column.
In most cases only thedisplayField
orvalueField
will be visible. This property is typically only required if custompickListFields
have been specfied for this item.Note : This is an advanced setting
- Parameters:
valueIconField
- valueIconField Default value is null
-
getValueIconField
String getValueIconField()For Databound formItems, this property determines which columnvalueIcons
should show up in for this formItem's pickList.
If unset valueIcons show up in thedisplayField
column if specified, otherwise thevalueField
column.
In most cases only thedisplayField
orvalueField
will be visible. This property is typically only required if custompickListFields
have been specfied for this item.- Returns:
- String
-
setPickListCriteria
If this item has a databound pick-list (for exampleoptionDataSource
is set) this property can be used to provide static filter criteria when retrieving the data for the pickList.Note : This is an advanced setting
- Parameters:
pickListCriteria
- pickListCriteria Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getPickListCriteria
Criteria getPickListCriteria()If this item has a databound pick-list (for exampleoptionDataSource
is set) this property can be used to provide static filter criteria when retrieving the data for the pickList.- Returns:
- Criteria
-
setShowOptionsFromDataSource
If this item is part of a databound form, and has a specifiedvalueMap
by default we show the valueMap options in the pickList for the item. Setting this property to true will ensure that the options displayed in our pickList are derived from the form'sdataSource
.Note : This is an advanced setting
- Parameters:
showOptionsFromDataSource
- showOptionsFromDataSource Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getShowOptionsFromDataSource
Boolean getShowOptionsFromDataSource()If this item is part of a databound form, and has a specifiedvalueMap
by default we show the valueMap options in the pickList for the item. Setting this property to true will ensure that the options displayed in our pickList are derived from the form'sdataSource
.- Returns:
- Boolean
-
setFilterLocally
IffilterLocally
is set for this item, and this item is showing options from a dataSource, fetch the entire set of options from the server, and use these values to map the item value to the appropriate display value. Also use"local"
type filtering on drop down list of options.
This means data will only be fetched once from the server, and then filtered on the client.Note : This is an advanced setting
- Parameters:
filterLocally
- filterLocally Default value is false- Returns:
PickList
instance, for chaining setter calls
-
getFilterLocally
Boolean getFilterLocally()IffilterLocally
is set for this item, and this item is showing options from a dataSource, fetch the entire set of options from the server, and use these values to map the item value to the appropriate display value. Also use"local"
type filtering on drop down list of options.
This means data will only be fetched once from the server, and then filtered on the client.- Returns:
- Boolean
-
setTextMatchStyle
When applying filter criteria to pickList data, what type of matching to use. Legal values are "substring" (value contains user input) or "startsWith" (value starts with user input. Both matches are case insensitive.For a databound pickList (
optionDataSource
set),textMatchStyle
is sent to the server astextMatchStyle
.For a non-databound pickList,
textMatchStyle
is applied byfilterClientPickListData()
.- Parameters:
textMatchStyle
- textMatchStyle Default value is "startsWith"- Returns:
PickList
instance, for chaining setter calls
-
getTextMatchStyle
TextMatchStyle getTextMatchStyle()When applying filter criteria to pickList data, what type of matching to use. Legal values are "substring" (value contains user input) or "startsWith" (value starts with user input. Both matches are case insensitive.For a databound pickList (
optionDataSource
set),textMatchStyle
is sent to the server astextMatchStyle
.For a non-databound pickList,
textMatchStyle
is applied byfilterClientPickListData()
.- Returns:
- Boolean
-
setShowAllOptions
If true, even non-matching options will be shown, with configurableseparatorRows
in between. Not valid foroptionDataSource
.- Parameters:
showAllOptions
- showAllOptions Default value is null- Returns:
PickList
instance, for chaining setter calls
-
getShowAllOptions
Boolean getShowAllOptions()If true, even non-matching options will be shown, with configurableseparatorRows
in between. Not valid foroptionDataSource
.- Returns:
- Boolean
-
getValueFieldName
String getValueFieldName()Getter method to retrieve thevalueField
for this item. If unset, default behavior will return thename
of this field.- Returns:
- fieldName to use a "value field" in records from this items
optionDataSource
-
getDisplayFieldName
String getDisplayFieldName()Returns thedisplayField
for this form item. If unset, andoptionDataSource
is explicitly specified, this method will return the title field for theoptionDataSource
- Returns:
- display field name, or null
-
setFetchDelay
For a ComboBox or other pickList that accepts user-entered criteria, how many millseconds to wait after the last user keystroke before fetching data from the server. The default setting will initiate a fetch if the stops typing or pauses briefly.- Parameters:
fetchDelay
- the fetch delay. defaults to 200ms
-
getFetchDelay
Integer getFetchDelay()For a ComboBox or other pickList that accepts user-entered criteria, how many millseconds to wait after the last user keystroke before fetching data from the server. The default setting will initiate a fetch if the stops typing or pauses briefly.- Returns:
- the fetch delay
-
setPickListFilterCriteriaFunction
Set the pick list filter criteria function / handler.- Parameters:
filterCriteriaFunction
- the filter criteria function
-
filterClientPickListData
ListGridRecord[] filterClientPickListData()Returns the data to display in the pick list.The default implementation applies the criteria returned by
#getPickListFilterCriteria
to the data returned bygetClientPickListData()
. A record passes the filter if it has a matching value for all fields in the criteria object. Matching is performed according totextMatchStyle
.If
showAllOptions
is set, all values are shown, with matching values shown below aseparator
.- Returns:
- array of record objects to display in the pickList
-
getClientPickListData
ListGridRecord[] getClientPickListData()Returns the set of data to be displayed in this item's PickList.This method will be called for non-databound form items implementing the PickList interface. The default implementation will derive data from the item's valueMap - can be overridden to allow a custom set of options to be displayed.
Note that for PickLists that filter data based on user input
'ComboBox')
, this method should return the data before filtering.- Returns:
- Array of record objects to be displayed in the pickList. Note that when a user picks a record from the list, the value of the field matching item.valueField will be picked. Also note that the fields to be displayed can be customized via item.pickListFields
-
setSeparatorRows
Array of records to show between matching and non-matching rows in the PickList.Not valid for
'databound pickLists'
.- Parameters:
separatorRows
- separator rows- Returns:
PickList
instance, for chaining setter calls
-
getOptionDataSource
DataSource getOptionDataSource() -
setOptionDataSource
-
setOptionFilterContext
If this item has a specifiedoptionDataSource
, and this property is
 not null, this will be passed to the datasource asRPCRequest
properties when
 performing the fetch operation on the dataSource to obtain a data-value to display-value
 mappingNote : This is an advanced setting
- Parameters:
dsRequestProperties
- optionFilterContext Default value is null
-