Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Property Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
addEmptyValue |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Property that tells if an empty value must be shown next to the items in the value list. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist. |
|
|
|
| valueListTypeJSValueList.DATABASE_VALUES; // Change the type to database values."one\ntwo\nthree\nfour";
vlist. |
|
|
|
| serverName'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parentJSValueList.EMPTY_VALUE_NEVER;
var cmb = form.newComboBox('my_table_text' |
|
|
|
| );
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id'vlistseparator' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EE4E7273-1E13-4BB4-9784-EFE149862FB4}{tr:id=name}{td}h6.EMPTY_VALUE_ALWAYS{td}{tr}{tr:id=des}{td}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_des|text=|trigger=button}{sub-section}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_des|trigger=none|class=sIndent}Constant to set/get the addEmptyValue property of a JSValueList.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_ret|text=|trigger=button}{sub-section}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_see|text=|trigger=button}{sub-section}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_see|text=|trigger=button}{sub-section}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_sam|text=|trigger=button}{sub-section}{sub-section:EE4E7273-1E13-4BB4-9784-EFE149862FB4_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
customValues |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| A string with the elements in the valuelist. The elements can be separated by linefeeds (custom1 custom2), optional with realvalues ((custom1|1 custom2|2)). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vl1 = solutionModel.newValueList("customtext",JSValueList.CUSTOM_VALUES);
vl1.customValues = "customvalue1\ncustomvalue2";
var vl2 = solutionModel.newValueList("customid",JSValueList.CUSTOM_VALUES);
vl2.customValues = "customvalue1|1\ncustomvalue2|2";
var form = solutionModel.newForm("customvaluelistform",controller.getDataSource(),null,true,300,300);
var combo1 = form.newComboBox("scopes.globals.text",10,10,120,20);
combo1.valuelist = vl1;
var combo2 = form.newComboBox("scopes.globals.id",10,60,120,20);
combo2.valuelist = vl2; |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
dataSource |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Compact representation of the names of the server and table that are used for loading the data from the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList. |
|
|
|
| CUSTOMcustomValues"one\ntwo\nthree\nfour"'db:/example_data/parent_table';
vlist. |
|
|
|
| addEmptyValue = JSValueList.EMPTY_VALUE_ALWAYS;
var cmb = form.newComboBox('mysetDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text' |
|
|
|
| , 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B608CFCE-4B3A-4C1C-BA02-C0536D209ECC}{tr:id=name}{td}h6.EMPTY_VALUE_NEVER{td}{tr}{tr:id=des}{td}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_des|text=|trigger=button}{sub-section}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_des|trigger=none|class=sIndent}Constant to set/get the addEmptyValue property of a JSValueList.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_ret|text=|trigger=button}{sub-section}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_see|text=|trigger=button}{sub-section}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_see|text=|trigger=button}{sub-section}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_sam|text=|trigger=button}{sub-section}{sub-section:B608CFCE-4B3A-4C1C-BA02-C0536D209ECC_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
vlist.addEmptyValue = JSValueList.EMPTY_VALUE_NEVER;
var cmb = form.newComboBox('my_table_text', 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=270E5669-07BF-4437-BB4E-5C4BB3E6E88C}{tr:id=name}{td}h6.addEmptyValue{td}{tr}{tr:id=des}{td}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_des|text=|trigger=button}{sub-section}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_des|trigger=none|class=sIndent}Property that tells if an empty value must be shown next to the items in the value list.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_ret|text=|trigger=button}{sub-section}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_see|text=|trigger=button}{sub-section}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_see|text=|trigger=button}{sub-section}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_sam|text=|trigger=button}{sub-section}{sub-section:270E5669-07BF-4437-BB4E-5C4BB3E6E88C_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
vlist.addEmptyValue = JSValueList.EMPTY_VALUE_NEVER;
var cmb = form.newComboBox('my_table_text', 10, 10, 100, 20);
cmb.valuelist = vlist;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B365FF4D-8F35-46EA-8935-1DBEED92A80F}{tr:id=name}{td}h6.customValues{td}{tr}{tr:id=des}{td}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_des|text=|trigger=button}{sub-section}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_des|trigger=none|class=sIndent}A string with the elements in the valuelist. The elements
can be separated by linefeeds (custom1
custom2), optional with realvalues ((custom1|1
custom2|2)).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_ret|text=|trigger=button}{sub-section}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_see|text=|trigger=button}{sub-section}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_see|text=|trigger=button}{sub-section}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_sam|text=|trigger=button}{sub-section}{sub-section:B365FF4D-8F35-46EA-8935-1DBEED92A80F_sam|class=sIndent|trigger=none}{code:language=javascript}
var vl1 = solutionModel.newValueList("customtext",JSValueList.CUSTOM_VALUES);
vl1.customValues = "customvalue1\ncustomvalue2";
var vl2 = solutionModel.newValueList("customid",JSValueList.CUSTOM_VALUES);
vl2.customValues = "customvalue1|1\ncustomvalue2|2";
var form = solutionModel.newForm("customvaluelistform",controller.getDataSource(),null,true,300,300);
var combo1 = form.newComboBox("globals.text",10,10,120,20);
combo1.valuelist = vl1;
var combo2 = form.newComboBox("globals.id",10,60,120,20);
combo2.valuelist = vl2;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F405581D-C7AB-47CD-8C8E-618C01FC7BAF}{tr:id=name}{td}h6.dataSource{td}{tr}{tr:id=des}{td}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_des|text=|trigger=button}{sub-section}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_des|trigger=none|class=sIndent}Compact representation of the names of the server and table that
are used for loading the data from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_ret|text=|trigger=button}{sub-section}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_see|text=|trigger=button}{sub-section}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_see|text=|trigger=button}{sub-section}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_sam|text=|trigger=button}{sub-section}{sub-section:F405581D-C7AB-47CD-8C8E-618C01FC7BAF_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=349AFE25-0FAC-48BC-9B19-032C610A4EB4}{tr:id=name}{td}h6.globalMethod{td}{tr}{tr:id=des}{td}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_des|text=|trigger=button}{sub-section}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_des|trigger=none|class=sIndent}A global method that provides the data for the valuelist. The global method must provided the data
as a JSDataSet.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_ret|text=|trigger=button}{sub-section}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_ret|trigger=none|class=sIndent}[JSMethod]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_see|text=|trigger=button}{sub-section}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_see|text=|trigger=button}{sub-section}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_sam|text=|trigger=button}{sub-section}{sub-section:349AFE25-0FAC-48BC-9B19-032C610A4EB4_sam|class=sIndent|trigger=none}{code:language=javascript}
var listProvider = solutionModel.newGlobalMethod('function myValueListProvider(displayValue, realValue, record, valueListName) {' +
' var result = databaseManager.createEmptyDataSet(0, 1);' +
' result.addRow(["one"]);' +
' result.addRow(["three"]);' +
' result.addRow(["five"]);' +
' return result;' +
'}');
var vlist = solutionModel.newValueList('vlist', JSValueList.CUSTOM_VALUES);
vlist.globalMethod = listProvider;
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=8AC4BEC9-493B-4C85-AE54-DD2EA01F3884}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_des|text=|trigger=button}{sub-section}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_des|trigger=none|class=sIndent}The name of the value list.
It is relevant when the "useTableFilter" property is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_ret|text=|trigger=button}{sub-section}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_see|text=|trigger=button}{sub-section}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_see|text=|trigger=button}{sub-section}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_sam|text=|trigger=button}{sub-section}{sub-section:8AC4BEC9-493B-4C85-AE54-DD2EA01F3884_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.serverName = 'example_data';
vlist.tableName = 'valuelists';
vlist.setDisplayDataProviderIds('valuelist_data');
vlist.setReturnDataProviderIds('valuelist_data');
vlist.useTableFilter = true;
vlist.name = 'two';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=FA235868-6BE3-4B3A-B3C2-115A89F42C23}{tr:id=name}{td}h6.relationName{td}{tr}{tr:id=des}{td}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_des|text=|trigger=button}{sub-section}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_des|trigger=none|class=sIndent}The name of the relation that is used for loading data from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_ret|text=|trigger=button}{sub-section}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_see|text=|trigger=button}{sub-section}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_see|text=|trigger=button}{sub-section}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_sam|text=|trigger=button}{sub-section}{sub-section:FA235868-6BE3-4B3A-B3C2-115A89F42C23_sam|class=sIndent|trigger=none}{code:language=javascript}
var rel = solutionModel.newRelation('parent_to_child', 'example_data', 'parent_table', 'example_data', 'child_table', JSRelation.INNER_JOIN);
rel.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.relationName = 'parent_to_child';
vlist.setDisplayDataProviderIds('child_table_text');
vlist.setReturnDataProviderIds('child_table_text');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=095B21F0-681D-436C-9136-95B11AFDAFC8}{tr:id=name}{td}h6.separator{td}{tr}{tr:id=des}{td}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_des|text=|trigger=button}{sub-section}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_ret|text=|trigger=button}{sub-section}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_see|text=|trigger=button}{sub-section}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_see|text=|trigger=button}{sub-section}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_sam|text=|trigger=button}{sub-section}{sub-section:095B21F0-681D-436C-9136-95B11AFDAFC8_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=40D96BE4-AA38-49F5-AE00-3129891FE3A6}{tr:id=name}{td}h6.serverName{td}{tr}{tr:id=des}{td}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_des|text=|trigger=button}{sub-section}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_des|trigger=none|class=sIndent}The name of the database server that is used for loading the values when
the value list has the type set to database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_ret|text=|trigger=button}{sub-section}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_see|text=|trigger=button}{sub-section}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_see|text=|trigger=button}{sub-section}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_sam|text=|trigger=button}{sub-section}{sub-section:40D96BE4-AA38-49F5-AE00-3129891FE3A6_sam|class=sIndent|trigger=none}{code:language=javascript}
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = 'example_data';
vlist.tableName = 'parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7}{tr:id=name}{td}h6.sortOptions{td}{tr}{tr:id=des}{td}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_des|text=|trigger=button}{sub-section}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_des|trigger=none|class=sIndent}Sort options that are applied when the valuelist loads its data
from the database.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_ret|text=|trigger=button}{sub-section}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_see|text=|trigger=button}{sub-section}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_see|text=|trigger=button}{sub-section}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_sam|text=|trigger=button}{sub-section}{sub-section:5B3F9F76-4E29-4A4C-BDF4-DFB1D55C51B7_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
fallbackValueList |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets or sets the fallback valuelist. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var myValueList = solutionModel.getValueList('myValueListHere')
//get fallback value list
var fallbackValueList = myValueList.fallbackValueList |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
globalMethod |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| A global method that provides the data for the valuelist. The global method must provided the 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()) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var listProvider = solutionModel.newGlobalMethod('globals', 'function getDataSetForValueList(displayValue, realValue, record, valueListName, findMode) {' +
' ' +
'var args = null;' +
'/** @type QBSelect<db:/example_data/employees> */' +
'var query = databaseManager.createSelect('db:/example_data/employees');' +
'/** @type {JSDataSet} */' +
'var result = null;' +
'if (displayValue == null && realValue == null) {' +
' // TODO think about caching this result. can be called often!' +
' // return the complete list' +
' query.result.add(query.columns.firstname.concat(' ').concat(query.columns.lastname)).add(query.columns.employeeid);' +
' result = databaseManager.getDataSetByQuery(query,100);' +
'} else if (displayValue != null) {' +
' // TYPE_AHEAD filter call, return a filtered list' +
' args = [displayValue + "%", displayValue + "%"]' +
' query.result.add(query.columns.firstname.concat(' ').concat(query.columns.lastname)).add(query.columns.employeeid).' +
' root.where.add(query.or.add(query.columns.firstname.lower.like(args[0] + '%')).add(query.columns.lastname.lower.like(args[1] + '%')));' +
' result = databaseManager.getDataSetByQuery(query,100);' +
'} else if (realValue != null) {' +
' // TODO think about caching this result. can be called often!' +
' // real object not found in the current list, return 1 row with display,realvalue that will be added to the current list' +
' // dont return a complete list in this mode because that will be added to the list that is already there' +
' args = [realValue];' +
' query.result.add(query.columns.firstname.concat(' ').concat(query.columns.lastname)).add(query.columns.employeeid).' +
' root.where.add(query.columns.employeeid.eq(args[0]));' +
' result = databaseManager.getDataSetByQuery(query,1);' +
'}' +
'return result;' +
'}');
var vlist = solutionModel.newValueList('vlist', JSValueList.CUSTOM_VALUES);
vlist.globalMethod = listProvider; |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The name of the value list. It is relevant when the "useTableFilter" property is set. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList. |
|
|
|
| CUSTOMvalueListTypeJSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.serverName = ''db:/example_data/valuelists';
vlist. |
|
|
|
| tableName = 'parent_table';
vlist.setDisplayDataProviderIds(' |
|
|
|
| parenttable_textdata');
vlist.setReturnDataProviderIds(' |
|
|
|
| parent_table_text', 'parent_table_idseparator = ' ## 'useTableFilter = true;
vlist. |
|
|
|
| sortOptionsparent_table_text desc';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E}{tr:id=name}{td}h6.tableName{td}{tr}{tr:id=des}{td}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_des|text=|trigger=button}{sub-section}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_des|trigger=none|class=sIndent}The name of the database table that is used for loading the values when
the value list has the type set to database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_ret|text=|trigger=button}{sub-section}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_see|text=|trigger=button}{sub-section}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_see|text=|trigger=button}{sub-section}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_sam|text=|trigger=button}{sub-section}{sub-section:22B42EA6-0E5C-4D3F-8AB3-B8B554C0C31E_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
relationName |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The name of the relation that is used for loading data from the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var rel = solutionModel.newRelation('parent_to_child', 'db:/example_data/parent_table', 'db:/example_data/child_table', JSRelation.INNER_JOIN);
rel.newRelationItem('parent_table_id', '=', 'child_table_parent_id');
var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/parent_table';
vlist.relationName = 'parent_to_child';
vlist.setDisplayDataProviderIds('child_table_text');
vlist.setReturnDataProviderIds('child_table_text'); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist. |
|
|
|
| serverNamedataSource = 'db:/example_data |
|
|
|
| ';
vlist.tableName = '/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc'; |
|
|
|
|
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F1AAAB81-CE17-4BA1-A1DA-18012A0C7370}{tr:id=name}{td}h6.useTableFilter{td}{tr}{tr:id=des}{td}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_des|text=|trigger=button}{sub-section}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_des|trigger=none|class=sIndent}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.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_ret|text=|trigger=button}{sub-section}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_see|text=|trigger=button}{sub-section}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_see|text=|trigger=button}{sub-section}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_sam|text=|trigger=button}{sub-section}{sub-section:F1AAAB81-CE17-4BA1-A1DA-18012A0C7370_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
serverName |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The name of the database server that is used for loading the values when the value list has the type set to database values. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc'; |
|
|
|
|
Table Body (tbody) |
---|
id | setFallbackValueList-JSValueList |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setFallbackValueList |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
sortOptions |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sort options that are applied when the valuelist loads its data from the database. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc'; |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The name of the database table that is used for loading the values when the value list has the type set to database values. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList. |
|
|
|
| DATABASEserverName'example_data';
vlist.tableNameJSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.dataSource = ' |
|
|
|
| valuelistsdb:/example_data/parent_table';
vlist.setDisplayDataProviderIds(' |
|
|
|
| valuelistdatatext');
vlist.setReturnDataProviderIds(' |
|
|
|
| valuelist_dataparent_table_text', 'parent_table_id');
vlist. |
|
|
|
| useTableFiltertruenametwo';
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EA64FAC3-237B-49AB-B16A-5882BC42388B}{tr:id=name}{td}h6.valueListType{td}{tr}{tr:id=des}{td}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_des|text=|trigger=button}{sub-section}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_des|trigger=none|class=sIndent}The type of the valuelist. Can be either custom values or database values.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_ret|text=|trigger=button}{sub-section}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_see|text=|trigger=button}{sub-section}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_see|text=|trigger=button}{sub-section}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_sam|text=|trigger=button}{sub-section}{sub-section:EA64FAC3-237B-49AB-B16A-5882BC42388B_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
useTableFilter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.DATABASE_VALUES);
vlist.dataSource = 'db:/example_data/valuelists';
vlist.setDisplayDataProviderIds('valuelist_data');
vlist.setReturnDataProviderIds('valuelist_data');
vlist.useTableFilter = true;
vlist.name = 'two'; |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
valueListType |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The type of the valuelist. Can be either custom values or database values. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.valueListType = JSValueList.DATABASE_VALUES; // Change the type to database values.
vlist.dataSource = 'db:/example_data/parent_table';
vlist.setDisplayDataProviderIds('parent_table_text');
vlist.setReturnDataProviderIds('parent_table_text', 'parent_table_id');
vlist.separator = ' ## ';
vlist.sortOptions = 'parent_table_text desc'; |
|
|
|
|
|