Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sReturnTypes
Table Row (tr)
styleheight: 30px;
Table Head (th)
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
ALIGNMENT
Span
classsWordList
ANCHOR
Span
classsWordList
BEVELTYPE
Span
classsWordList
CURSOR
Span
classsWordList
DEFAULTS
Span
classsWordList
FONTSTYLE
Span
classsWordList
JSBean
Span
classsWordList
JSButton
Span
classsWordList
JSCalculation
Span
classsWordList
JSComponent
Span
classsWordList
JSField
Span
classsWordList
JSForm
Span
classsWordList
JSLabel
Span
classsWordList
JSMedia
Span
classsWordList
JSMethod
Span
classsWordList
JSPart
Span
classsWordList
JSPortal
Span
classsWordList
JSRelation
Span
classsWordList
JSRelationItem
Span
classsWordList
JSStyle
Span
classsWordList
JSTab
Span
classsWordList
JSTabPanel
Span
classsWordList
JSValueList
Span
classsWordList
JSVariable
Span
classsWordList
MEDIAOPTION
Span
classsWordList
PAGEORIENTATION
Span
classsWordList
PRINTSLIDING
Span
classsWordList
SCROLLBAR
Span
classsWordList
TITLEJUSTIFICATION
Span
classsWordList
TITLEPOSITION
Span
classsWordList
UNITS

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSComponent
Table Cell (td)
#cloneComponent(newName, component)
Makes an exact copy of the given component (JSComponent/JSField/JSLabel) and gives it a new name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSComponent
Table Cell (td)
#cloneComponent(newName, component, newParentForm)
Makes an exact copy of the given component (JSComponent/JSField/JSLabel), gives it a new name and moves it to a new parent form, specified as a parameter.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#cloneForm(newName, jsForm)
Makes an exact copy of the given form and gives it the new name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createBevelBorder(bevel_type, highlight_outer_color, highlight_inner_color, shadow_outer_color, shadow_inner_color)
Create a bevel border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createEmptyBorder(top_width, right_width, bottom_width, left_width)
Create an empty border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createEtchedBorder(bevel_type, highlight_color, shadow_color)
Create an etched border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createFont(name, style, size)
Create a font string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createLineBorder(thick, color)
Create a line border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createMatteBorder(top_width, right_width, bottom_width, left_width, color)
Create a matte border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createPageFormat(width, height, leftmargin, rightmargin, topmargin, bottommargin, [orientation], [units])
Create a page format string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createSpecialMatteBorder(top_width, right_width, bottom_width, left_width, top_color, right_color, bottom_color, left_color, rounding_radius, dash_pattern)
Create a special matte border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#createTitledBorder(title_text, font, color, title_justification, title_position)
Create a titled border string.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSCalculation
Table Cell (td)
#getCalculation(name, datasource)
Get an existing calculation for the given name and datasource.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSCalculation[]
Table Cell (td)
#getCalculations(datasource)
Gets all the calculations for the given datasource.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#getForm(name)
Gets the specified form object and returns information about the form (see JSForm node).
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms()
Get an array of all forms.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms(datasource)
Get an array of forms, that are all based on datasource/servername.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm[]
Table Cell (td)
#getForms(server, tablename)
Get an array of forms, that are all based on datasource/servername and tablename.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#getGlobalMethod(name)
Gets an existing global method by the specified name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod[]
Table Cell (td)
#getGlobalMethods()
The list of all global methods.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable
Table Cell (td)
#getGlobalVariable(name)
Gets an existing global variable by the specified name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable[]
Table Cell (td)
#getGlobalVariables()
Gets an array of all global variables.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMedia
Table Cell (td)
#getMedia(name)
Gets the specified media object; can be assigned to a button/label.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMedia[]
Table Cell (td)
#getMediaList()
Gets the list of all media objects.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSRelation
Table Cell (td)
#getRelation(name)
Gets an existing relation by the specified name and returns a JSRelation Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSRelation[]
Table Cell (td)
#getRelations([primary_server_name/primary_data_source], [primary_table_name])
Gets an array of all relations; or an array of all global relations if the specified table is NULL.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSStyle
Table Cell (td)
#getStyle(name)
Gets the style specified by the given name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSValueList
Table Cell (td)
#getValueList(name)
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSValueList[]
Table Cell (td)
#getValueLists()
Gets an array of all valuelists for the currently active solution.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSCalculation
Table Cell (td)
#newCalculation(code, type, datasource)
Creates a new calculation for the given code and the type, if it builds on a column (name is a column name) then type will be ignored.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSCalculation
Table Cell (td)
#newCalculation(code, datasource)
Creates a new calculation for the given code, the type will be the column where it could be build on (if name is a column name),
else it will default to JSVariable.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, superForm)
Creates a new form with the given JSForm as its super form.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, dataSource, styleName, show_in_menu, width, height)
Creates a new JSForm Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#newForm(name, serverName, tableName, styleName, show_in_menu, width, height)
Creates a new JSForm Object.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#newGlobalMethod(code)
Creates a new global method with the specified code.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSVariable
Table Cell (td)
#newGlobalVariable(name, type)
Creates a new global variable with the specified name and number type.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMedia
Table Cell (td)
#newMedia(name, bytes)
Creates a new media object that can be assigned to a label or a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSRelation
Table Cell (td)
#newRelation(name, primaryDataSource, foreignDataSource, joinType)
Creates a new JSRelation Object with a specified name; includes the primary datasource, foreign datasource and the type of join for the new relation.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSRelation
Table Cell (td)
#newRelation(name, primaryServerName, primaryTableName, foreignServerName, foreignTableName, joinType)
Creates a new JSRelation Object with a specified name; includes the primary server and table name, foreign server and table name, and the type of join for the new relation.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSStyle
Table Cell (td)
#newStyle(name, content)
Creates a new style with the given css content string under the given name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSValueList
Table Cell (td)
#newValueList(name, type)
Creates a new valuelist with the specified name and number type.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeCalculation(name, datasource)
Removes the calculation specified by name and datasource.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeForm(name)
Removes the specified form during the persistent connected client session.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeGlobalMethod(name)
Removes the specified global method.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeGlobalVariable(name)
Removes the specified global variable.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeMedia(name)
Removes the media item specified by name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeRelation(name)
Removes the relation specified by name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeStyle(name)
Removes the specified style.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeValueList(name)
Removes the specified valuelist.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSForm
Table Cell (td)
#revertForm(name)
Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#wrapMethodWithArguments(method, args)
Get a JSMethod instance with arguments to be assigned to an event.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idcloneComponent-String_JSComponent
classnode
Table Row (tr)
idname
Table Cell (td)
cloneComponent
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSComponent
Span
stylefloat: left; font-weight: bold;
idiets
cloneComponent
Span
stylefloat: left;
idiets
(newName, component)
Table Row (tr)
iddes
Table Cell (td)
Makes an exact copy of the given component (JSComponent/JSField/JSLabel) and gives it a new name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} newName – the new name of the cloned component
{JSComponent} component – the component to clone
Table Row (tr)
idret
Table Cell (td)
Returns
JSComponent – the exact copy of the given component
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// get an existing field to clone.
var field = solutionModel.getForm("formWithField").getField("fieldName");
// make a clone/copy of the field
var clone = solutionModel.cloneComponent("clonedField",field);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcloneComponent-String_JSComponent_JSForm
classnode
Table Row (tr)
idname
Table Cell (td)
cloneComponent
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSComponent
Span
stylefloat: left; font-weight: bold;
idiets
cloneComponent
Span
stylefloat: left;
idiets
(newName, component, newParentForm)
Table Row (tr)
iddes
Table Cell (td)
Makes an exact copy of the given component (JSComponent/JSField/JSLabel), gives it a new name and moves it to a new parent form, specified as a parameter.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} newName – the new name of the cloned component
{JSComponent} component – the component to clone
{JSForm} newParentForm – the new parent form
Table Row (tr)
idret
Table Cell (td)
Returns
JSComponent – the exact copy of the given component
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// get an existing field to clone.
var field = solutionModel.getForm("formWithField").getField("fieldName");
// get the target form for the copied/cloned field
var form = solutionModel.getForm("targetForm");
// make a clone/copy of the field and re parent it to the target form.
var clone = solutionModel.cloneComponent("clonedField",field,form);
// show it
forms["targetForm"].controller.show();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcloneForm
classnode
Table Row (tr)
idname
Table Cell (td)
cloneForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
cloneForm
Span
stylefloat: left;
idiets
(newName, jsForm)
Table Row (tr)
iddes
Table Cell (td)
Makes an exact copy of the given form and gives it the new name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} newName – the new name for the form clone
{JSForm} jsForm – the form to be cloned
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a JSForm
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// get an existing form
var form = solutionModel.getForm("existingForm")
// make a clone/copy from it
var clone = solutionModel.cloneForm("clonedForm", form)
// add a new label to the clone
clone.newLabel("added label",50,50,80,20);
// show it
forms["clonedForm"].controller.show();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateBevelBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createBevelBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createBevelBorder
Span
stylefloat: left;
idiets
(bevel_type, highlight_outer_color, highlight_inner_color, shadow_outer_color, shadow_inner_color)
Table Row (tr)
iddes
Table Cell (td)
Create a bevel border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} bevel_type – bevel border type (SM_BEVELTYPE.RAISED or SM_BEVELTYPE.LOWERED)
{String} highlight_outer_color – bevel border highlight outer color
{String} highlight_inner_color – bevel border highlight inner color
{String} shadow_outer_color – bevel border shadow outer color
{String} shadow_inner_color – bevel border shadow outer color
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createBevelBorder(SM_BEVELTYPE.RAISED,'#ff0000','#00ff00','#ff0000','#00ff00');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateEmptyBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createEmptyBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createEmptyBorder
Span
stylefloat: left;
idiets
(top_width, right_width, bottom_width, left_width)
Table Row (tr)
iddes
Table Cell (td)
Create an empty border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} top_width – top width of empty border in pixels
{Number} right_width – right width of empty border in pixels
{Number} bottom_width – bottom width of empty border in pixels
{Number} left_width – left width of empty border in pixels
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createEmptyBorder(1,1,1,1);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateEtchedBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createEtchedBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createEtchedBorder
Span
stylefloat: left;
idiets
(bevel_type, highlight_color, shadow_color)
Table Row (tr)
iddes
Table Cell (td)
Create an etched border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} bevel_type – bevel border type
{String} highlight_color – bevel border highlight color
{String} shadow_color – bevel border shadow color
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createEtchedBorder(SM_BEVELTYPE.RAISED,'#ff0000','#00ff00');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateFont
classnode
Table Row (tr)
idname
Table Cell (td)
createFont
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createFont
Span
stylefloat: left;
idiets
(name, style, size)
Table Row (tr)
iddes
Table Cell (td)
Create a font string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the font
{Number} style – the style of the font (PLAIN, BOLD, ITALIC or BOLD+ITALIC)
{Number} size – the font size
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
var component = form.getComponent("someComponent")
component.fontType = solutionModel.createFont('Arial',SM_FONTSTYLE.BOLD,14);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateLineBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createLineBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createLineBorder
Span
stylefloat: left;
idiets
(thick, color)
Table Row (tr)
iddes
Table Cell (td)
Create a line border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} thick – border thickness in pixels
{String} color – color of the line border
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createLineBorder(1,'#ff0000');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateMatteBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createMatteBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createMatteBorder
Span
stylefloat: left;
idiets
(top_width, right_width, bottom_width, left_width, color)
Table Row (tr)
iddes
Table Cell (td)
Create a matte border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} top_width – top width of matte border in pixels
{Number} right_width – right width of matte border in pixels
{Number} bottom_width – bottom width of matte border in pixels
{Number} left_width – left width of matte border in pixels
{String} color – border color
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createMatteBorder(1,1,1,1,"#00ff00");
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreatePageFormat
classnode
Table Row (tr)
idname
Table Cell (td)
createPageFormat
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createPageFormat
Span
stylefloat: left;
idiets
(width, height, leftmargin, rightmargin, topmargin, bottommargin, [orientation], [units])
Table Row (tr)
iddes
Table Cell (td)

Create a page format string.

Note: The unit specified for width, height and all margins MUST be the same.

Table Row (tr)
idprs
Table Cell (td)
Parameters
width – the specified width of the page to be printed.
height – the specified height of the page to be printed.
leftmargin – the specified left margin of the page to be printed.
rightmargin – the specified right margin of the page to be printed.
topmargin – the specified top margin of the page to be printed.
bottommargin – the specified bottom margin of the page to be printed.
[orientation] – the specified orientation of the page to be printed; the default is Portrait mode
[units] – the specified units for the width and height of the page to be printed; the default is pixels
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.defaultPageFormat = solutionModel.createPageFormat(612,792,72,72,72,72,SM_ORIENTATION.PORTRAIT,SM_UNITS.PIXELS);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateSpecialMatteBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createSpecialMatteBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createSpecialMatteBorder
Span
stylefloat: left;
idiets
(top_width, right_width, bottom_width, left_width, top_color, right_color, bottom_color, left_color, rounding_radius, dash_pattern)
Table Row (tr)
iddes
Table Cell (td)
Create a special matte border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} top_width – top width of matte border in pixels
{Number} right_width – right width of matte border in pixels
{Number} bottom_width – bottom width of matte border in pixels
{Number} left_width – left width of matte border in pixels
{String} top_color – top border color
{String} right_color – right border color
{String} bottom_color – bottom border color
{String} left_color – left border color
{Number} rounding_radius – width of the arc to round the corners
{Number[]} dash_pattern – the dash pattern of border stroke
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
// create a rectangle border (no rounded corners) and continous line
form.borderType = solutionModel.createSpecialMatteBorder(1,1,1,1,"#00ff00","#00ff00","#00ff00","#00ff00",0,null);
// create a border with rounded corners and dashed line (25 pixels drawn, then 25 pixels skipped)
// form.borderType = solutionModel.createSpecialMatteBorder(1,1,1,1,"#00ff00","#00ff00","#00ff00","#00ff00",10,new Array(25,25));
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateTitledBorder
classnode
Table Row (tr)
idname
Table Cell (td)
createTitledBorder
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
createTitledBorder
Span
stylefloat: left;
idiets
(title_text, font, color, title_justification, title_position)
Table Row (tr)
iddes
Table Cell (td)
Create a titled border string.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} title_text – the text from border
{String} font – title text font string
{String} color – border color
{Number} title_justification – title text justification
{Number} title_position – bevel title text position
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.getForm("someForm");
form.borderType = solutionModel.createTitledBorder('Test',solutionModel.createFont('Arial',SM_FONTSTYLE.PLAIN,10),'#ff0000',SM_TITLEJUSTIFICATION.CENTER,SM_TITLEPOSITION.TOP);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetCalculation
classnode
Table Row (tr)
idname
Table Cell (td)
getCalculation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSCalculation
Span
stylefloat: left; font-weight: bold;
idiets
getCalculation
Span
stylefloat: left;
idiets
(name, datasource)
Table Row (tr)
iddes
Table Cell (td)
Get an existing calculation for the given name and datasource.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – The name of the calculation
{String} datasource – The datasource the calculation belongs to.
Table Row (tr)
idret
Table Cell (td)
Returns
JSCalculation
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers");
var calc2 = solutionModel.newCalculation("function myCalculation2() { return '20'; }", "db:/example_data/customers");
var calc3 = solutionModel.newCalculation("function myCalculation3() { return 'Hello World!'; }",	JSVariable.TEXT, "db:/example_data/employees");

var c = solutionModel.getCalculation("myCalculation","db:/example_data/customers");
application.output("Name: " + c.getName() + ", Stored: " + c.isStored());

var allCalcs = solutionModel.getCalculations("db:/example_data/customers");
for (var i = 0; i < allCalcs.length; i++) {
	application.output(allCalcs[i]);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetCalculations
classnode
Table Row (tr)
idname
Table Cell (td)
getCalculations
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSCalculation[]
Span
stylefloat: left; font-weight: bold;
idiets
getCalculations
Span
stylefloat: left;
idiets
(datasource)
Table Row (tr)
iddes
Table Cell (td)
Gets all the calculations for the given datasource.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} datasource – The datasource the calculations belong to.
Table Row (tr)
idret
Table Cell (td)
Returns
JSCalculation[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers");
var calc2 = solutionModel.newCalculation("function myCalculation2() { return '20'; }", "db:/example_data/customers");
var calc3 = solutionModel.newCalculation("function myCalculation3() { return 'Hello World!'; }",	JSVariable.TEXT, "db:/example_data/employees");

var c = solutionModel.getCalculation("myCalculation","db:/example_data/customers");
application.output("Name: " + c.getName() + ", Stored: " + c.isStored());

var allCalcs = solutionModel.getCalculations("db:/example_data/customers");
for (var i = 0; i < allCalcs.length; i++) {
	application.output(allCalcs[i]);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForm
classnode
Table Row (tr)
idname
Table Cell (td)
getForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
getForm
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets the specified form object and returns information about the form (see JSForm node).
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the form
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a JSForm
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myForm = solutionModel.getForm('existingFormName');
//get the style of the form (for all other properties see JSForm node)
var styleName = myForm.styleName;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms
classnode
Table Row (tr)
idname
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm[]
Span
stylefloat: left; font-weight: bold;
idiets
getForms
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get an array of all forms.
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var forms = solutionModel.getForms()
for (var i in forms)
		application.output(forms[i].name)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms-String
classnode
Table Row (tr)
idname
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm[]
Span
stylefloat: left; font-weight: bold;
idiets
getForms
Span
stylefloat: left;
idiets
(datasource)
Table Row (tr)
iddes
Table Cell (td)
Get an array of forms, that are all based on datasource/servername.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} datasource – the datasource or servername
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var forms = solutionModel.getForms(datasource)
for (var i in forms)
		application.output(forms[i].name)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForms-String_String
classnode
Table Row (tr)
idname
Table Cell (td)
getForms
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm[]
Span
stylefloat: left; font-weight: bold;
idiets
getForms
Span
stylefloat: left;
idiets
(server, tablename)
Table Row (tr)
iddes
Table Cell (td)
Get an array of forms, that are all based on datasource/servername and tablename.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} server – the datasource or servername
{String} tablename – the tablename
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm[] – an array of JSForm type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var forms = solutionModel.getForms(datasource,tablename)
for (var i in forms)
		application.output(forms[i].name)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalMethod
classnode
Table Row (tr)
idname
Table Cell (td)
getGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMethod
Span
stylefloat: left; font-weight: bold;
idiets
getGlobalMethod
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets an existing global method by the specified name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the specified global method
Table Row (tr)
idret
Table Cell (td)
Returns
JSMethod – a JSMethod
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var method = solutionModel.getGlobalMethod("nameOfGlobalMethod"); 
	if (method != null) application.output(method.code);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalMethods
classnode
Table Row (tr)
idname
Table Cell (td)
getGlobalMethods
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMethod[]
Span
stylefloat: left; font-weight: bold;
idiets
getGlobalMethods
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
The list of all global methods.
Table Row (tr)
idret
Table Cell (td)
Returns
JSMethod[] – an array of JSMethod type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var methods = solutionModel.getGlobalMethods(); 
	if (methods != null)
		for (var x in methods) 
			application.output(methods[x].getName());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalVariable
classnode
Table Row (tr)
idname
Table Cell (td)
getGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSVariable
Span
stylefloat: left; font-weight: bold;
idiets
getGlobalVariable
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets an existing global variable by the specified name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the global variable
Table Row (tr)
idret
Table Cell (td)
Returns
JSVariable – a JSVariable
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var globalVariable = solutionModel.getGlobalVariable('globalVariableName');
	application.output(globalVariable.name + " has the default value of " + globalVariable.defaultValue);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetGlobalVariables
classnode
Table Row (tr)
idname
Table Cell (td)
getGlobalVariables
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSVariable[]
Span
stylefloat: left; font-weight: bold;
idiets
getGlobalVariables
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Gets an array of all global variables.
Table Row (tr)
idret
Table Cell (td)
Returns
JSVariable[] – an array of JSVariable type elements
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var globalVariables = solutionModel.getGlobalVariables();
	for (var i in globalVariables)
		application.output(globalVariables[i].name + " has the default value of " + globalVariables[i].defaultValue);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMedia
classnode
Table Row (tr)
idname
Table Cell (td)
getMedia
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMedia
Span
stylefloat: left; font-weight: bold;
idiets
getMedia
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets the specified media object; can be assigned to a button/label.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the media object
Table Row (tr)
idret
Table Cell (td)
Returns
JSMedia – a JSMedia element
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myMedia = solutionModel.getMedia('button01.gif')
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMediaList
classnode
Table Row (tr)
idname
Table Cell (td)
getMediaList
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMedia[]
Span
stylefloat: left; font-weight: bold;
idiets
getMediaList
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Gets the list of all media objects.
Table Row (tr)
idret
Table Cell (td)
Returns
JSMedia[] – a list with all the media objects.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var mediaList = solutionModel.getMediaList();
	if (mediaList.length != 0 && mediaList != null) {
		for (var x in mediaList) {
			application.output(mediaList[x]);
		}
	}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRelation
classnode
Table Row (tr)
idname
Table Cell (td)
getRelation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSRelation
Span
stylefloat: left; font-weight: bold;
idiets
getRelation
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets an existing relation by the specified name and returns a JSRelation Object.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the relation
Table Row (tr)
idret
Table Cell (td)
Returns
JSRelation – a JSRelation
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var relation = solutionModel.getRelation('name');
	application.output("The primary server name is " + relation.primaryServerName);
	application.output("The primary table name is " + relation.primaryTableName); 
	application.output("The foreign table name is " + relation.foreignTableName); 
	application.output("The relation items are " + relation.getRelationItems());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetRelations
classnode
Table Row (tr)
idname
Table Cell (td)
getRelations
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSRelation[]
Span
stylefloat: left; font-weight: bold;
idiets
getRelations
Span
stylefloat: left;
idiets
([primary_server_name/primary_data_source], [primary_table_name])
Table Row (tr)
iddes
Table Cell (td)
Gets an array of all relations; or an array of all global relations if the specified table is NULL.
Table Row (tr)
idprs
Table Cell (td)
Parameters
[primary_server_name/primary_data_source] – the specified name of the server or datasource for the specified table
[primary_table_name] – the specified name of the table
Table Row (tr)
idret
Table Cell (td)
Returns
JSRelation[] – an array of all relations (all elements in the array are of type JSRelation)
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var relations = solutionModel.getRelations('server_name','table_name');
	if (relations.length != 0)
		for (var i in relations)
			application.output(relations[i].name);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetStyle
classnode
Table Row (tr)
idname
Table Cell (td)
getStyle
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSStyle
Span
stylefloat: left; font-weight: bold;
idiets
getStyle
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets the style specified by the given name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the style
Table Row (tr)
idret
Table Cell (td)
Returns
JSStyle – a JSStyle
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var style = solutionModel.getStyle('my_existing_style')
	style.content = 'combobox { color: #0000ff;font: italic 10pt "Verdana";}'
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetValueList
classnode
Table Row (tr)
idname
Table Cell (td)
getValueList
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSValueList
Span
stylefloat: left; font-weight: bold;
idiets
getValueList
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the valuelist
Table Row (tr)
idret
Table Cell (td)
Returns
JSValueList – a JSValueList object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myValueList = solutionModel.getValueList('myValueListHere')
//now set the valueList property of your field
//myField.valuelist = myValueList
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetValueLists
classnode
Table Row (tr)
idname
Table Cell (td)
getValueLists
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSValueList[]
Span
stylefloat: left; font-weight: bold;
idiets
getValueLists
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Gets an array of all valuelists for the currently active solution.
Table Row (tr)
idret
Table Cell (td)
Returns
JSValueList[] – an array of JSValueList objects
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var valueLists = solutionModel.getValueLists();
	if (valueLists != null && valueLists.length != 0)
		for (var i in valueLists)
			application.output(valueLists[i].name);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewCalculation-String_Number_String
classnode
Table Row (tr)
idname
Table Cell (td)
newCalculation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSCalculation
Span
stylefloat: left; font-weight: bold;
idiets
newCalculation
Span
stylefloat: left;
idiets
(code, type, datasource)
Table Row (tr)
iddes
Table Cell (td)
Creates a new calculation for the given code and the type, if it builds on a column (name is a column name) then type will be ignored.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} code – The code of the calculation, this must be a full function declaration.
{Number} type – The type of the calculation, one of the JSVariable types.
{String} datasource – The datasource this calculation belongs to.
Table Row (tr)
idret
Table Cell (td)
Returns
JSCalculation
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers");
var calc2 = solutionModel.newCalculation("function myCalculation2() { return '20'; }", "db:/example_data/customers");
var calc3 = solutionModel.newCalculation("function myCalculation3() { return 'Hello World!'; }",	JSVariable.TEXT, "db:/example_data/employees");

var c = solutionModel.getCalculation("myCalculation","db:/example_data/customers");
application.output("Name: " + c.getName() + ", Stored: " + c.isStored());

var allCalcs = solutionModel.getCalculations("db:/example_data/customers");
for (var i = 0; i < allCalcs.length; i++) {
	application.output(allCalcs[i]);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewCalculation-String_String
classnode
Table Row (tr)
idname
Table Cell (td)
newCalculation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSCalculation
Span
stylefloat: left; font-weight: bold;
idiets
newCalculation
Span
stylefloat: left;
idiets
(code, datasource)
Table Row (tr)
iddes
Table Cell (td)
Creates a new calculation for the given code, the type will be the column where it could be build on (if name is a column name),
else it will default to JSVariable.TEXT;
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} code – The code of the calculation, this must be a full function declaration.
{String} datasource – The datasource this calculation belongs to.
Table Row (tr)
idret
Table Cell (td)
Returns
JSCalculation
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var calc = solutionModel.newCalculation("function myCalculation() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers");
var calc2 = solutionModel.newCalculation("function myCalculation2() { return '20'; }", "db:/example_data/customers");
var calc3 = solutionModel.newCalculation("function myCalculation3() { return 'Hello World!'; }",	JSVariable.TEXT, "db:/example_data/employees");

var c = solutionModel.getCalculation("myCalculation","db:/example_data/customers");
application.output("Name: " + c.getName() + ", Stored: " + c.isStored());

var allCalcs = solutionModel.getCalculations("db:/example_data/customers");
for (var i = 0; i < allCalcs.length; i++) {
	application.output(allCalcs[i]);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_JSForm
classnode
Table Row (tr)
idname
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
newForm
Span
stylefloat: left;
idiets
(name, superForm)
Table Row (tr)
iddes
Table Cell (td)
Creates a new form with the given JSForm as its super form.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – The name of the new form
{JSForm} superForm – the super form that will extended from, see JSform.setExtendsForm();
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//creates 2 forms with elements on them; shows the parent form, waits 2 seconds and shows the child form
var mySuperForm = solutionModel.newForm('mySuperForm', 'myServerName', 'myTableName', null, false, 800, 600);
var label1 = mySuperForm.newLabel('LabelName', 20, 20, 120, 30);
label1.text = 'DataProvider';
label1.background = 'red';
mySuperForm.newTextField('myDataProvider', 140, 20, 140,20);
forms['mySuperForm'].controller.show();
application.sleep(2000);
var mySubForm = solutionModel.newForm('mySubForm', mySuperForm);
var label2 = mySuperForm.newLabel('SubForm Label', 20, 120, 120, 30);
label2.background = 'green';
forms['mySuperForm'].controller.recreateUI();
forms['mySubForm'].controller.show();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_String_String_Boolean_Number_Number
classnode
Table Row (tr)
idname
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
newForm
Span
stylefloat: left;
idiets
(name, dataSource, styleName, show_in_menu, width, height)
Table Row (tr)
iddes
Table Cell (td)

Creates a new JSForm Object.

NOTE: See the JSForm node for more information about form objects that can be added to the new form.

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the form
{String} dataSource – the specified name of the datasource for the specified table
{String} styleName – the specified style
{Boolean} show_in_menu – if true show the name of the new form in the menu; or false for not showing
{Number} width – the width of the form in pixels
{Number} height – the height of the form in pixels
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myForm = solutionModel.newForm('newForm', 'myServer', 'myTable', 'myStyleName', false, 800, 600)
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 20, 20, 120, 30)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 140, 20, 140,20)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewForm-String_String_String_String_Boolean_Number_Number
classnode
Table Row (tr)
idname
Table Cell (td)
newForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
newForm
Span
stylefloat: left;
idiets
(name, serverName, tableName, styleName, show_in_menu, width, height)
Table Row (tr)
iddes
Table Cell (td)

Creates a new JSForm Object.

NOTE: See the JSForm node for more information about form objects that can be added to the new form.

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the form
{String} serverName – the specified name of the server for the specified table
{String} tableName – the specified name of the table
{String} styleName – the specified style
{Boolean} show_in_menu – if true show the name of the new form in the menu; or false for not showing
{Number} width – the width of the form in pixels
{Number} height – the height of the form in pixels
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a new JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myForm = solutionModel.newForm('newForm', 'myServer', 'myTable', 'myStyleName', false, 800, 600)
//With only a datasource:
//var myForm = solutionModel.newForm('newForm', datasource, 'myStyleName', false, 800, 600)
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 20, 20, 120, 30)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 140, 20, 140,20)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewGlobalMethod
classnode
Table Row (tr)
idname
Table Cell (td)
newGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMethod
Span
stylefloat: left; font-weight: bold;
idiets
newGlobalMethod
Span
stylefloat: left;
idiets
(code)
Table Row (tr)
iddes
Table Cell (td)
Creates a new global method with the specified code.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} code – the specified code for the global method
Table Row (tr)
idret
Table Cell (td)
Returns
JSMethod – a JSMethod object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var method = solutionModel.newGlobalMethod('function myglobalmethod(){currentcontroller.newRecord()}')
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewGlobalVariable
classnode
Table Row (tr)
idname
Table Cell (td)
newGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSVariable
Span
stylefloat: left; font-weight: bold;
idiets
newGlobalVariable
Span
stylefloat: left;
idiets
(name, type)
Table Row (tr)
iddes
Table Cell (td)

Creates a new global variable with the specified name and number type.

NOTE: The global variable number type is based on the value assigned from the SolutionModel-JSVariable node; for example: JSVariable.INTEGER.

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name for the global variable
{Number} type – the specified number type for the global variable
Table Row (tr)
idret
Table Cell (td)
Returns
JSVariable – a JSVariable object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myGlobalVariable = solutionModel.newGlobalVariable('newGlobalVariable',JSVariable.INTEGER); 
	myGlobalVariable.defaultValue = 12;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewMedia
classnode
Table Row (tr)
idname
Table Cell (td)
newMedia
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMedia
Span
stylefloat: left; font-weight: bold;
idiets
newMedia
Span
stylefloat: left;
idiets
(name, bytes)
Table Row (tr)
iddes
Table Cell (td)
Creates a new media object that can be assigned to a label or a button.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – The name of the new media
{byte[]} bytes – The content
Table Row (tr)
idret
Table Cell (td)
Returns
JSMedia – a JSMedia object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var myMedia = solutionModel.newMedia('button01.gif',bytes)
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewRelation-String_String_String_Number
classnode
Table Row (tr)
idname
Table Cell (td)
newRelation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSRelation
Span
stylefloat: left; font-weight: bold;
idiets
newRelation
Span
stylefloat: left;
idiets
(name, primaryDataSource, foreignDataSource, joinType)
Table Row (tr)
iddes
Table Cell (td)
Creates a new JSRelation Object with a specified name; includes the primary datasource, foreign datasource and the type of join for the new relation.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the new relation
{String} primaryDataSource – the specified name of the primary datasource
{String} foreignDataSource – the specified name of the foreign datasource
{Number} joinType – the type of join for the new relation; JSRelation.INNER_JOIN, JSRelation.LEFT_OUTER_JOIN
Table Row (tr)
idret
Table Cell (td)
Returns
JSRelation – a JSRelation object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var rel = solutionModel.newRelation('myRelation','myPrimaryDataSource','myForeignDataSource',JSRelation.INNER_JOIN);
application.output(rel.getRelationItems());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewRelation-String_String_String_String_String_Number
classnode
Table Row (tr)
idname
Table Cell (td)
newRelation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSRelation
Span
stylefloat: left; font-weight: bold;
idiets
newRelation
Span
stylefloat: left;
idiets
(name, primaryServerName, primaryTableName, foreignServerName, foreignTableName, joinType)
Table Row (tr)
iddes
Table Cell (td)
Creates a new JSRelation Object with a specified name; includes the primary server and table name, foreign server and table name, and the type of join for the new relation.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the new relation
{String} primaryServerName – the specified name of the primary server
{String} primaryTableName – the specified name of the primary table
{String} foreignServerName – the specified name of the foreign server
{String} foreignTableName – the specified name of the foreign table
{Number} joinType – the type of join for the new relation; JSRelation.INNER_JOIN, JSRelation.LEFT_OUTER_JOIN
Table Row (tr)
idret
Table Cell (td)
Returns
JSRelation – a JSRelation object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var rel = solutionModel.newRelation('myRelation','myPrimaryServerName','myPrimaryTableName','myForeignServerName','myForeignTableName',JSRelation.INNER_JOIN);
application.output(rel.getRelationItems());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewStyle
classnode
Table Row (tr)
idname
Table Cell (td)
newStyle
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSStyle
Span
stylefloat: left; font-weight: bold;
idiets
newStyle
Span
stylefloat: left;
idiets
(name, content)
Table Row (tr)
iddes
Table Cell (td)

Creates a new style with the given css content string under the given name.

NOTE: Will throw an exception if a style with that name already exists.

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the new style
{String} content – the css content of the new style
Table Row (tr)
idret
Table Cell (td)
Returns
JSStyle – a JSStyle object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var form = solutionModel.newForm('myForm','myServer','myTable',null,true,1000,800);
	if (form.transparent == false)
	{
		var style = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
		style.text = style.text + 'field { background-color: blue; }';
		form.styleName = 'myStyle';
	}
	var field = form.newField('columnTextDataProvider',JSField.TEXT_FIELD,100,100,100,50);
	forms['myForm'].controller.show();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idnewValueList
classnode
Table Row (tr)
idname
Table Cell (td)
newValueList
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSValueList
Span
stylefloat: left; font-weight: bold;
idiets
newValueList
Span
stylefloat: left;
idiets
(name, type)
Table Row (tr)
iddes
Table Cell (td)
Creates a new valuelist with the specified name and number type.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name for the valuelist
{Number} type – the specified number type for the valuelist; may be JSValueList.CUSTOM_VALUES, JSValueList.DATABASE_VALUES, JSValueList.EMPTY_VALUE_ALWAYS, JSValueList.EMPTY_VALUE_NEVER
Table Row (tr)
idret
Table Cell (td)
Returns
JSValueList – a JSValueList object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
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;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveCalculation
classnode
Table Row (tr)
idname
Table Cell (td)
removeCalculation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeCalculation
Span
stylefloat: left;
idiets
(name, datasource)
Table Row (tr)
iddes
Table Cell (td)
Removes the calculation specified by name and datasource.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the calculation to be removed
{String} datasource – the datasource the calculation belongs to
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var calc1 = solutionModel.newCalculation("function myCalculation1() { return 123; }", JSVariable.INTEGER, "db:/example_data/customers");
var calc2 = solutionModel.newCalculation("function myCalculation2() { return '20'; }", "db:/example_data/customers");

var c = solutionModel.getCalculation("myCalculation1", "db:/example_data/customers");
application.output("Name: " + c.getName() + ", Stored: " + c.isStored());

solutionModel.removeCalculation("myCalculation1", "db:/example_data/customers");
c = solutionModel.getCalculation("myCalculation1", "db:/example_data/customers");
if (c != null) {
		application.output("myCalculation could not be removed.");
}

var allCalcs = solutionModel.getCalculations("db:/example_data/customers");
for (var i = 0; i < allCalcs.length; i++) {
		application.output(allCalcs[i]);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveForm
classnode
Table Row (tr)
idname
Table Cell (td)
removeForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeForm
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)

Removes the specified form during the persistent connected client session.

NOTE: Make sure you call history.remove first in your Servoy method (script).

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the form to remove
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true is form has been removed, false if form could not be removed
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//first remove it from the current history, to destroy any active form instance
var success = history.removeForm('myForm')
//removes the named form from this session, please make sure you called history.remove() first
if(success)
{
	solutionModel.removeForm('myForm')
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveGlobalMethod
classnode
Table Row (tr)
idname
Table Cell (td)
removeGlobalMethod
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeGlobalMethod
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the specified global method.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the global method to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var m1 = solutionModel.newGlobalMethod('function myglobalmethod1(){application.output("Global Method 1");}');
var m2 = solutionModel.newGlobalMethod('function myglobalmethod2(){application.output("Global Method 2");}');

var success = solutionModel.removeGlobalMethod("myglobalmethod1");
if (success == false) application.output("!!! myglobalmethod1 could not be removed !!!");

var list = solutionModel.getGlobalMethods();
for (var i = 0; i < list.length; i++) { 
		application.output(list[i].code);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveGlobalVariable
classnode
Table Row (tr)
idname
Table Cell (td)
removeGlobalVariable
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeGlobalVariable
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the specified global variable.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the global variable to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var v1 = solutionModel.newGlobalVariable("globalVar1",JSVariable.INTEGER);
var v2 = solutionModel.newGlobalVariable("globalVar2",JSVariable.TEXT);

var success = solutionModel.removeGlobalVariable("globalVar1");
if (success == false) application.output("!!! globalVar1 could not be removed !!!");

var list = solutionModel.getGlobalVariables();
for (var i = 0; i < list.length; i++) {
		application.output(list[i].name + "[ " + list[i].variableType + "]: " + list[i].variableType);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveMedia
classnode
Table Row (tr)
idname
Table Cell (td)
removeMedia
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeMedia
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the media item specified by name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the media item to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var bytes1 = plugins.file.readFile('D:/Imgs/image1.png');
var image1 = solutionModel.newMedia('image1.png', bytes1);
var bytes2 = plugins.file.readFile('D:/Imgs/image2.jpg');
var image2 = solutionModel.newMedia('image2.jpg',bytes2);
var bytes3 = plugins.file.readFile('D:/Imgs/image3.jpg');
var image3 = solutionModel.newMedia('image3.jpg',bytes3);

var f = solutionModel.newForm("newForm",currentcontroller.getDataSource(),null,false,500,350);
var l = f.newLabel('', 20, 70, 300, 200);
l.imageMedia = image1;
l.borderType =  solutionModel.createLineBorder(4,'#ff0000');
forms["newForm"].controller.show();

var status = solutionModel.removeMedia('image1.jpg');
if (status) application.output("image1.png has been removed");
else application.output("image1.png has not been removed");

var mediaList = solutionModel.getMediaList();
for (var i = 0; i < mediaList.length; i++) {
		application.output(mediaList[i].getName() + ":" + mediaList[i].mimeType);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveRelation
classnode
Table Row (tr)
idname
Table Cell (td)
removeRelation
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeRelation
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the relation specified by name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the relation to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var success = solutionModel.removeRelation('myRelation');
if (success) { application.output("Relation has been removed");}
else {application.output("Relation could not be removed");}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveStyle
classnode
Table Row (tr)
idname
Table Cell (td)
removeStyle
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeStyle
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the specified style.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the name of the style to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var s = solutionModel.newStyle("smStyle1",'form { background-color: yellow; }');
var status = solutionModel.removeStyle("smStyle1");
if (status == false) application.output("Could not remove style.");
else application.output("Style removed.");
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveValueList
classnode
Table Row (tr)
idname
Table Cell (td)
removeValueList
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeValueList
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Removes the specified valuelist.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – name of the valuelist to be removed
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if the removal was successful, false otherwise
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var vlName = "customValueList";
var vl = solutionModel.newValueList(vlName,JSValueList.CUSTOM_VALUES);
vl.customValues = "customvalue1\ncustomvalue2";

var status = solutionModel.removeValueList(vlName);
if (status) application.output("Removal has been done.");
else application.output("ValueList not removed.");

var vls = solutionModel.getValueLists();
if (vls != null) {
	for (var i = 0; i < vls.length; i++) {
		application.output(vls[i]);
	}
	application.output("");
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idrevertForm
classnode
Table Row (tr)
idname
Table Cell (td)
revertForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSForm
Span
stylefloat: left; font-weight: bold;
idiets
revertForm
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)

Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.

NOTE: Make sure you call history.remove first in your Servoy method (script) or call form.controller.recreateUI() before the script ends.

Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} name – the specified name of the form to revert
Table Row (tr)
idret
Table Cell (td)
Returns
JSForm – a JSForm object
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// revert the form to the original solution form, removing any changes done to it through the solution model.
 var revertedForm = solutionModel.revertForm('myForm')
 // add a label on a random place.
 revertedForm.newLabel("MyLabel",Math.random()*100,Math.random()*100,80,20);
 // make sure that the ui is up to date.
 forms.myForm.controller.recreateUI();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idwrapMethodWithArguments
classnode
Table Row (tr)
idname
Table Cell (td)
wrapMethodWithArguments
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
JSMethod
Span
stylefloat: left; font-weight: bold;
idiets
wrapMethodWithArguments
Span
stylefloat: left;
idiets
(method, args)
Table Row (tr)
iddes
Table Cell (td)
Get a JSMethod instance with arguments to be assigned to an event.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{JSMethod} method – JSMethod to be assigned to an event
{Object[]} args – positional arguments
Table Row (tr)
idret
Table Cell (td)
Returns
JSMethod – a JSMethod
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var str = "John's Bookstore"
var form = solutionModel.getForm('orders')
var button = form.getButton('abutton')
var method = form.getFormMethod('doit') // has 4 arguments: event (fixed), boolean, number and string
// string arguments have to be quoted, they are interpreted before the method is called
var quotedString = "'"+utils.stringReplace(str, "'", "\\'")+"'"
// list all arguments the method has, use nulls for fixed arguments (like event)
button.onAction = solutionModel.wrapMethodWithArguments(method, null, true, 42, quotedString)
Table Row (tr)
classlastDetailRow
Table Cell (td)