Child pages
  • JSValueList

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Constants SummaryConstant to set the valueListType of a JSValueList.Constant to set the valueListType of a JSValueList.Constant to set/get the addEmptyValue property of a JSValueList.Constant to set/get the addEmptyValue property of a JSValueList.

servoy sSummary12%30%58%height: 30px;3Property SummaryProperty that tells if an empty value must be shown next to the items in the value list.A string with the elements in the valuelist.Compact representation of the names of the server and table that are used for loading the data from the database.Gets or sets the fallback valuelist.A The global method that provides the data for the valuelistof the valuelist is called to fill in or adjust the values of the valuelist.A property special for NGClient and GlobalValuelist to only query the global valuelist when it is needed.The name of the value list.The name of the relation that is used for loading data from the database.A String representing the separator that should be used when multiple display dataproviders are set, when the value list has the type set to database values.The name of the database server that is used for loading the values when the value list has the type set to database/table values.voidSort options that are applied when the valuelist loads its data from the database.The name of the database table that is used for loading the values when the value list has the type set to database/table values.Flag that tells if the name of the valuelist should be applied as a filter on the 'valuelist_name' column when retrieving the data from the database.The type of the valuelist.

servoy sSummary12%30%58%height: 30px;3Methods SummaryReturns an array of the dataproviders that will be used to display the valuelist value.Returns an array of the dataproviders that will be used to define the valuelist value that is saved.Returns the UUID of the value listvoidSet the display dataproviders.voidSet the display dataproviders.voidSet the display dataproviders.voidSet the display dataproviders.voidSet the return dataproviders.voidSet the return dataproviders.voidSet the return dataproviders.voidSet the return dataproviders.

constantservoy sDetail2100%height:30px2Constants DetailsEMPTYCUSTOM_VALUE_ALWAYSVALUESname

EMPTY

CUSTOM_

VALUE_ALWAYS

VALUES

dessIndent
Constant to set
/get
 the 
addEmptyValue property
valueListType of a JSValueList.
ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowEMPTY_VALUE_NEVERname

EMPTY_VALUE_NEVER

dessIndentConstant to set/get the addEmptyValue property of a JSValueList.

Sets the value list to use a custom list of values.
Also used in solutionModel.newValueList(...) to create new valuelists
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow

propertyservoy sDetail2100%height:30px2Property DetailsaddEmptyValuenameaddEmptyValueDATABASE_VALUESname

DATABASE_VALUES

dessIndent
Property
Constant to 
that
set 
tells
the 
if
valueListType 
an
of 
empty
a 
value
JSValueList.
must
Sets 
be
the 
shown
value 
next
list to 
the
use 
items
values 
in
loaded 
the
from 
value
a 
list.
database.
Also used in solutionModel.newValueList(...) to create new valuelists
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
customValuesEMPTY_VALUE_ALWAYSname

customValues

EMPTY_VALUE_ALWAYS

dessIndent
A
Constant 
string
to 
with
set/get the addEmptyValue 
elements
property 
in
of 
the
a 
valuelist. The elements can be separated by linefeeds (custom1 custom2), optional with realvalues ((custom1|1 custom2|2)).ret
JSValueList.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
dataSourceEMPTY_VALUE_NEVERname

dataSource

EMPTY_VALUE_NEVER

dessIndent
Compact
Constant 
representation
to 
of
set/get the addEmptyValue 
names
property of 
the server and table that are used for loading the data from the database
a JSValueList.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
fallbackValueList

propertyservoy sDetail2100%height:30px2Property DetailsaddEmptyValuename

fallbackValueList

addEmptyValue

dessIndent
Gets
Property 
or
that 
sets the fallback valuelist
tells if an empty value must be shown next to the items in the value list.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
globalMethodcustomValuesname

globalMethod

customValues

dessIndent
A 
global method that provides
string with the 
data
elements 
for
in the valuelist. The 
global
elements
method
can 
must
be 
provided
separated 
the
by 
data as a JSDataSet. It is called when the valuelist needs data, it has 3 modes. real and display params both null: return the whole list only display is specified, called by a typeahead, return a filtered list only real value is specified, called when the list doesnt contain the real value for the give record value, this will insert this value into the existing list. In find mode the record with be the FindRecord which is just like a normal JSRecord (DataRecord) it has the same properties (column/dataproviders) but doesnt have its methods (like isEditing()) The last argument is rawDisplayValue which contains the same text as displayValue but without converting it to lowercase
linefeeds (custom1
custom2), optional with realvalues ((custom1|1
custom2|2)).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
dataSourcename

dataSource

dessIndent
Compact representation of the names of the server and table that
are used for loading the data from the database.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
displayValueTypename

displayValueType

dessIndentret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
fallbackValueListname

fallbackValueList

dessIndent
Gets or sets the fallback valuelist.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
globalMethodname

globalMethod

dessIndent
The global method of the valuelist is called to fill in or adjust the values of the valuelist.
The method returns a dataset with one or two columns, first column is the display value, second column is real value(if present).
The valuelist will be filled in with the dataset data. If second column is not present real value and display value will be the same.
The method has to handle three different scenarios:
 1. 'displayValue' parameter is not null, this parameter should be used to filter the list of values(in a typeahead fashion)
 2. 'realValue' parameter is specified, that means value was not found in current list, so must be specified manually.
 In this case method should return only one row in the dataset, with the missing value, that will be added to the valuelist
 3. 'realValue' and 'displayValue' are both null , in this case the complete list of values should be returned.

Scenario 1 and 3 will completely replace any older results in the valuelist while scenario 2 will append results.

In find mode the record will be the FindRecord which is just like a normal JSRecord (DataRecord) it has the same properties (column/dataproviders) but doesnt have its methods (like isEditing())

The last argument is rawDisplayValue which contains the same text as displayValue but without converting it to lowercase.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
lazyLoadingname

lazyLoading

dessIndent
A property special for NGClient and GlobalValuelist to only query the global valuelist when it is needed.
This flag has to be set both on valuelist and in component spec, on the valuelist property.

IMPORTANT: Usage of real & display values is not fully supported with lazy loading. Don't set lazy load if your method returns both real and display values
This is because very likely we do need directly the display value for the given real to dispaly its value..
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
namename

name

dessIndent
The name of the value list.

It is relevant 
when the "useTableFilter" property is set.
when the "useTableFilter" property is set.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
realValueTypename

realValueType

dessIndentret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
relationNamename

relationName

dessIndent
The name of the relation that is used for loading data from the database.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
separatorname

separator

dessIndent
A String representing the separator that should be used when multiple
display dataproviders are set, when the value list has the type set to
database values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
serverNamename

serverName

dessIndent
The name of the database server that is used for loading the values when
the value list has the type set to database/table values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setFallbackValueListname

setFallbackValueList

dessIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortOptionsname

sortOptions

dessIndent
Sort options that are applied when the valuelist loads its data
from the database.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
tableNamename

tableName

dessIndent
The name of the database table that is used for loading the values when
the value list has the type set to database/table values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
useTableFiltername

useTableFilter

dessIndent
Flag that tells if the name of the valuelist should be applied as a filter on the
'valuelist_name' column when retrieving the data from the database.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
valueListTypename

valueListType

dessIndent
The type of the valuelist. Can be either custom values or database values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetDisplayDataProviderIdsname

getDisplayDataProviderIds()

dessIndent
Returns an array of the dataproviders that will be used to display the valuelist value.
ret

Returns

sIndent An array of Strings representing the names of the display dataproviders.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getReturnDataProviderIdsname

getReturnDataProviderIds()

dessIndent
Returns an array of the dataproviders that will be used to define the valuelist value that is saved.
ret

Returns

sIndent An array of Strings representing the names of the return dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUUIDname

getUUID()

dessIndent
Returns the UUID of the value list
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDisplayDataProviderIdsname

setDisplayDataProviderIds()

dessIndent
Set the display dataproviders. There can be at most 3 of them, combined with the return dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be displayed
by the valuelist.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDisplayDataProviderIdsname

setDisplayDataProviderIds(dataprovider1)

dessIndent
Set the display dataproviders. There can be at most 3 of them, combined with the return dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be displayed
by the valuelist.
prs

Parameters

sIndentdataprovider1The first display dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDisplayDataProviderIdsname

setDisplayDataProviderIds(dataprovider1, dataprovider2)

dessIndent
Set the display dataproviders. There can be at most 3 of them, combined with the return dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be displayed
by the valuelist.
prs

Parameters

sIndentdataprovider1The first display dataprovider.dataprovider2The second display dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setDisplayDataProviderIdsname

setDisplayDataProviderIds(dataprovider1, dataprovider2, dataprovider3)

dessIndent
Set the display dataproviders. There can be at most 3 of them, combined with the return dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be displayed
by the valuelist.
prs

Parameters

sIndentdataprovider1The first display dataprovider.dataprovider2The second display dataprovider.dataprovider3The third display dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setReturnDataProviderIdsname

setReturnDataProviderIds()

dessIndent
Set the return dataproviders. There can be at most 3 of them, combined with the display dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be returned
by the valuelist.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setReturnDataProviderIdsname

setReturnDataProviderIds(dataprovider1)

dessIndent
Set the return dataproviders. There can be at most 3 of them, combined with the display dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be returned
by the valuelist.
prs

Parameters

sIndentdataprovider1The first return dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setReturnDataProviderIdsname

setReturnDataProviderIds(dataprovider1, dataprovider2)

dessIndent
Set the return dataproviders. There can be at most 3 of them, combined with the display dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be returned
by the valuelist.
prs

Parameters

sIndentdataprovider1The first return dataprovider.dataprovider2The second return dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setReturnDataProviderIdsname

setReturnDataProviderIds(dataprovider1, dataprovider2, dataprovider3)

dessIndent
Set the return dataproviders. There can be at most 3 of them, combined with the display dataproviders.
The values taken from these dataproviders, in order, separated by the separator, will be returned
by the valuelist.
prs

Parameters

sIndentdataprovider1The first return dataprovider.dataprovider2The second return dataprovider.dataprovider3The third return dataprovider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow