Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Div
iddescription



HTML Table
id
classservoy sReturnTypes
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
JSEvent
Span
classsWordList
APPLICATION_TYPES



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
getApplicationType()
Get the application type.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getServerURL()
Gets the application server URL for mobile client to connect to.
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
isInDeveloper()
Returns true if the solution is running in the developer.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
output(msg)
Output something on the out stream.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setServerURL(applicationServerURL)
Sets the application server URL for mobile client to connect to.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setValueListItems(name, displayValues)
Fill a custom type valuelist with values from array(s) or dataset.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setValueListItems(name, displayValues, realValues)
Fill a custom type valuelist with values from array(s) or dataset.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idgetApplicationType
Table Row (tr)
idname
Table Cell (td)

getApplicationType

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getApplicationType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the application type.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number - Constant application type
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var type = application.getApplicationType();
//see application type contstant
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetServerURL
Table Row (tr)
idname
Table Cell (td)

getServerURL

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getServerURL
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the application server URL for mobile client to connect to.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - HTTP server URL
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var url = application.getServerURL();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idisInDeveloper
Table Row (tr)
idname
Table Cell (td)

isInDeveloper

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
isInDeveloper
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Returns true if the solution is running in the developer.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Boolean - Boolean (true) if the solution is running in the developer, (false) otherwise
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var flag = application.isInDeveloper();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idoutput-Object
Table Row (tr)
idname
Table Cell (td)

output

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
output
Span
(msg)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Output something on the out stream. (if running in debugger view output console tab)
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Object} msg - Object to send to output stream
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// 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 Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetServerURL-String
Table Row (tr)
idname
Table Cell (td)

setServerURL

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setServerURL
Span
(applicationServerURL)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Sets the application server URL for mobile client to connect to.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} applicationServerURL - The URL to connect.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// 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 Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetValueListItems-String_ObjectArray
Table Row (tr)
idname
Table Cell (td)

setValueListItems

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setValueListItems
Span
(name, displayValues)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} name - Name of the valuelist
{Object[]} displayValues - Display values array
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//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 Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetValueListItems-String_ObjectArray_ObjectArray
Table Row (tr)
idname
Table Cell (td)

setValueListItems

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setValueListItems
Span
(name, displayValues, realValues)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

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)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} name - Name of the valuelist
{Object[]} displayValues - Display values array
{Object[]} realValues - Real values array
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//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 Row (tr)
classlastDetailRow
Table Cell (td)