Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getApplicationType |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the application type. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| Number - Constant application type |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var type = application.getApplicationType();
//see application type contstant |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getServerURL |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Gets the application server URL for mobile client to connect to. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var url = application.getServerURL(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
isInDeveloper |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns true if the solution is running in the developer. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| Boolean - Boolean (true) if the solution is running in the developer, (false) otherwise |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var flag = application.isInDeveloper(); |
|
|
|
|
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=output-Object|class=node}{tr:id=name}{td}h6.output{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}output{span}{span:id=iets|style=float: left;}\(msg){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:output-Object_des|trigger=button|text=}{sub-section}{sub-section:output-Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:output-Object_snc|trigger=button|text=}{sub-section}{sub-section:output-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:output-Object_prs|trigger=button|text=}{sub-section}{sub-section:output-Object_prs|trigger=none|class=sIndent}\{[Object]} msg -- Object to send to output stream
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:output-Object_ret|trigger=button|text=}{sub-section}{sub-section:output-Object_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:output-Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:output-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:output-Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:output-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:output-Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:output-Object_sam|trigger=none}{code:language=javascript}
// log level is used to determine how/if to log in servoy_log.txt; for smart client java out and err streams are used
application.output('my very important trace msg');// default log level: info
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setValueListItems-String_ObjectArray|class=node}{tr:id=name}{td}h6.setValueListItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setValueListItems{span}{span:id=iets|style=float: left;}\(name, displayValues){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setValueListItems-String_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setValueListItems-String_ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setValueListItems-String_ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_prs|trigger=none|class=sIndent}\{[String]} name -- Name of the valuelist
\{[Object]\[]} displayValues -- Display values array
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setValueListItems-String_ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setValueListItems-String_ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setValueListItems-String_ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setValueListItems-String_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_sam|trigger=none}{code:language=javascript}
//set display values (return values will be same as display values)
application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'));
//set display values and return values (which are stored in dataprovider)
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array(10000,10010,10456));
//set display values and return values converted to numbers
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array('10000','10010', '10456'), true);
//do query and fill valuelist (see databaseManager for full details of queries/dataset)
//var query = 'select display_value,optional_real_value from test_table';
//var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 25);
//application.setValueListItems('my_en_types',dataset);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setValueListItems-String_ObjectArray_ObjectArray|class=node}{tr:id=name}{td}h6.setValueListItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setValueListItems{span}{span:id=iets|style=float: left;}\(name, displayValues, realValues){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_prs|trigger=none|class=sIndent}\{[String]} name -- Name of the valuelist
\{[Object]\[]} displayValues -- Display values array
\{[Object]\[]} realValues -- Real values array
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setValueListItems-String_ObjectArray_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setValueListItems-String_ObjectArray_ObjectArray_sam|trigger=none}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Output something on the out stream. (if running in debugger view output console tab) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} msg - Object to send to output stream |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // log level is used to determine how/if to log in servoy_log.txt; for smart client java out and err streams are used
application.output('my very important trace msg');// default log level: info |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setServerURL |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(applicationServerURL) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sets the application server URL for mobile client to connect to. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} applicationServerURL - The URL to connect. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // if server URL is not set at mobile solution export, setServerURL should be called from custom login form, before authentication is done
application.setServerURL('http://localhost:8080'); |
|
|
|
|
Table Body (tbody) |
---|
id | setValueListItems-String_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setValueListItems |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(name, displayValues) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Fill a custom type valuelist with values from array(s) or dataset. NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values after form is created may have side effects |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - Name of the valuelist {Object[]} displayValues - Display values array |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //set display values (return values will be same as display values)
application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'));
//set display values and return values (which are stored in dataprovider)
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array(10000,10010,10456));
//set display values and return values converted to numbers
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array('10000','10010', '10456'), true);
//do query and fill valuelist (see databaseManager for full details of queries/dataset)
//var query = 'select display_value,optional_real_value from test_table';
//var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 25);
//application.setValueListItems('my_en_types',dataset); |
|
|
|
|
Table Body (tbody) |
---|
id | setValueListItems-String_ObjectArray_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setValueListItems |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(name, displayValues, realValues) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Fill a custom type valuelist with values from array(s) or dataset. NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values after form is created may have side effects |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - Name of the valuelist {Object[]} displayValues - Display values array {Object[]} realValues - Real values array |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //set display values (return values will be same as display values)
application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'));
//set display values and return values (which are stored in dataprovider)
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array(10000,10010,10456));
//set display values and return values converted to numbers
//application.setValueListItems('my_en_types',new Array('Item 1', 'Item 2', 'Item 3'),new Array('10000','10010', '10456'), true);
//do query and fill valuelist (see databaseManager for full details of queries/dataset)
//var query = 'select display_value,optional_real_value from test_table';
//var dataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()), query, null, 25);
//application.setValueListItems('my_en_types',dataset); |
|
|
|
|
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |