Child pages
  • controller

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 sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
enabled
Gets or sets the enabled state of a form; also known as "grayed-out".



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)
String
Table Cell (td)
getDataSource()
Get the used datasource.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getName()
Get the name of this form.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
getSelectedIndex()
Gets the current record index of the current foundset.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
setSelectedIndex(index)
Sets the current record index of the current foundset.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
show()
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
showRecords(foundset)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.



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

enabled

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Gets or sets the enabled state of a form; also known as "grayed-out".

Notes:
-A disabled element(s) cannot be selected by clicking the form.
-The disabled "grayed" color is dependent on the LAF set in the Servoy Smart Client Application Preferences.

Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
//gets the enabled state of the form
var state = forms.customer.controller.enabled;
//enables the form for input
forms.customer.controller.enabled = true;
Table Row (tr)
classlastDetailRow
Table Cell (td)
 



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)
idgetDataSource
Table Row (tr)
idname
Table Cell (td)

getDataSource

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDataSource
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the used datasource.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - the datasource
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var dataSource = forms.customer.controller.getDataSource();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetName
Table Row (tr)
idname
Table Cell (td)

getName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the name of this form.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - the name
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var formName = forms.customer.controller.getName();
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetSelectedIndex
Table Row (tr)
idname
Table Cell (td)

getSelectedIndex

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getSelectedIndex
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Gets the current record index of the current foundset.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Number - the index
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsetSelectedIndex-Number
Table Row (tr)
idname
Table Cell (td)

setSelectedIndex

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
setSelectedIndex
Span
(index)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Sets the current record index of the current foundset.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{Number} index - the index to select
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idshow
Table Row (tr)
idname
Table Cell (td)

show

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
show
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
// show the form in the current window/dialog
forms.customer.controller.show();
// show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.show(w);
// show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.show(w);
// or forms.customer.controller.show("mydialog");
//show the form in the main window
//forms.customer.controller.show(null);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idshowRecords-JSFoundSet
Table Row (tr)
idname
Table Cell (td)

showRecords

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
showRecords
Span
(foundset)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{JSFoundSet} foundset - the foundset to load before showing the form.
Table Row (tr)
idret
Table Cell (td)

Returns

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

Sample

Div
classsIndent
Code Block
languagejavascript
forms.customer.controller.showRecords(foundset);
// load foundset & show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.showRecords(foundset, w);
// load foundset & show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.showRecords(foundset, w);
//forms.customer.controller.showRecords(foundset, "mydialog");
Table Row (tr)
classlastDetailRow
Table Cell (td)