Child pages
  • JSButton

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1381949650879

...

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_ALERT
Constant for specifying a predefined icon type for a button.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_BACK
Constant for specifying a predefined icon type for a button.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_BARS
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_CHECK
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_DELETE
Constant for specifying a predefined icon type for a button.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_DOWN
Constant for specifying a predefined icon type for a button.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_EDIT
Constant for specifying a predefined icon type for a button.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_FORWARD
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_GEAR
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_GRID
Constant for specifying a predefined icon type for a button.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_HOME
Constant for specifying a predefined icon type for a button.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_INFO
Constant for specifying a predefined icon type for a button.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_LEFT
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_MINUS
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_PLUS
Constant for specifying a predefined icon type for a button.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_REFRESH
Constant for specifying a predefined icon type for a button.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_RIGHT
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_SEARCH
Constant for specifying a predefined icon type for a button.
Table Body (tbody)
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_STAR
Constant for specifying a predefined icon type for a button.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#ICONICON_UP
Constant for specifying a predefined icon type for a button.

HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#dataProviderIDdataProviderID
The dataprovider of the component.
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#displaysTagsdisplaysTags
Flag that enables or disables merging of data inside components using tags (placeholders).
tbody
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#enabledenabled
The enable state of the component, default true.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#formatformat
The format that should be applied when displaying data(using dataProviderID) in the label/button.
Table Body (tbody)
#height
The height in pixels of the component.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#iconTypeiconType
Icon shown on a button.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#namename
The name of the component.
tbody
Table Body (tbody)
Table Row (tr)
Table Cell (td)
JSMethod
Table Cell (td)
#onActiononAction
The method that is executed when the component is clicked.
tbody
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#styleClassstyleClass
The name of the style class that should be applied to this component.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#texttext
The text that is displayed inside the component.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#visiblevisible
The visible property of the component, default true.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#widthx
The width in pixels x coordinate of the component on the form.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#x
The x coordinate of the component on the form.
Table Body (tbody)
#y
The y y
The y coordinate of the component on the form.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)

0px
HTML Table
id
classservoy sSummary
Colgroup Tag
Column
padding
width80px
Column
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Constants Details
Table Body (tbody)
idICON_ALERT
Table Row (tr)
idname
Table Cell (td)
ICON_ALERT
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_BACK
Table Row (tr)
idname
Table Cell (td)
ICON_BACK
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_BARS
Table Row (tr)
idname
Table Cell (td)
ICON_BARS
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_CHECK
Table Row (tr)
idname
Table Cell (td)
ICON_CHECK
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_DELETE
Table Row (tr)
idname
Table Cell (td)
ICON_DELETE
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_DOWN
Table Row (tr)
idname
Table Cell (td)
ICON_DOWN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_EDIT
Table Row (tr)
idname
Table Cell (td)
ICON_EDIT
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_FORWARD
Table Row (tr)
idname
Table Cell (td)
ICON_FORWARD
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_GEAR
Table Row (tr)
idname
Table Cell (td)
ICON_GEAR
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_GRID
Table Row (tr)
idname
Table Cell (td)
ICON_GRID
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_HOME
Table Row (tr)
idname
Table Cell (td)
ICON_HOME
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_INFO
Table Row (tr)
idname
Table Cell (td)
ICON_INFO
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_LEFT
Table Row (tr)
idname
Table Cell (td)
ICON_LEFT
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_MINUS
Table Row (tr)
idname
Table Cell (td)
ICON_MINUS
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_PLUS
Table Row (tr)
idname
Table Cell (td)
ICON_PLUS
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_REFRESH
Table Row (tr)
idname
Table Cell (td)
ICON_REFRESH
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_RIGHT
Table Row (tr)
idname
Table Cell (td)
ICON_RIGHT
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_SEARCH
Table Row (tr)
idname
Table Cell (td)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_STAR
Table Row (tr)
idname
Table Cell (td)
ICON_STAR
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idICON_UP
Table Row (tr)
idname
Table Cell (td)
ICON_UP
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for specifying a predefined icon type for a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

myButton.iconType = JSButton.ICON_...;
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
iddataProviderID
Table Row (tr)
idname
Table Cell (td)
dataProviderID
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The dataprovider of the component.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

// Normally the dataprovider is specified when a component is created.
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
// But it can be modified later if needed.
field.dataProviderID = 'parent_table_id';

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
iddisplaysTags
Table Row (tr)
idname
Table Cell (td)
displaysTags
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

Flag that enables or disables merging of data inside components using tags (placeholders).
Tags (or placeholders) are words surrounded by %%on each side. There are data tags and
standard tags. Data tags consist in names of dataproviders surrounded by%%. Standard tags
are a set of predefined tags that are made available by the system.

See the "Merging data" section for more details about tags.

The default value of this flag is "false", that is merging of data is disabled by default.

Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var label = form.newLabel('You are viewing record no. %%parent_table_id%%. You are running on server %%serverURL%%.',

...


					10, 10, 600, 100);
label.displaysTags = true;

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idenabled
Table Row (tr)
idname
Table Cell (td)
enabled
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The enable state of the component, default true.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
field.enabled = false;

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idformat
Table Row (tr)
idname
Table Cell (td)
format
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The format that should be applied when displaying data(using dataProviderID) in the label/button.
Some examples are "#%", "dd-MM-yyyy", "MM-dd-yyyy", etc.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var label = form.newLabel('', 10, 10, 100, 100);
label.format = '$#.00';

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
id

...

iconType
Table Row (tr)
idname
Table Cell (td)
height
iconType
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

...

Icon shown on a button.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent

...

String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var 

...

btn = form.

...

newButton('

...

I am a button', 

...

1, null);

...

classlastDetailRow

...

btn.iconType = JSButton.ICON_STAR
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idname
Table Row (tr)
idname
Table Cell (td)
iconType
name
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

...

The name of the component. Through this name it can also accessed in methods.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var 

...

form = 

...

solutionModel.

...

classlastDetailRow

...

newForm('someForm', 'db:/example_data/parent_table', null, false, 620, 300);
var label = form.newLabel('Label', 10, 10, 150, 150);
label.name = 'myLabel'; // Give a name to the component.
forms['someForm'].controller.show()
// Now use the name to access the component.
forms['someForm'].elements['myLabel'].text = 'Updated text';
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idonAction
Table Row (tr)
idname
Table Cell (td)
name
onAction
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The

...

method that is executed when the component is clicked.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent

...

JSMethod
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var 

...

doNothingMethod = 

...

form.

...

newMethod('

...

function doNothing() { application.output("Doing nothing."); }');
var 

...

onClickMethod = form.

...

newMethod('

...

classlastDetailRow

...

idonAction
Table Row (tr)
idname
Table Cell (td)
onAction
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The method that is executed when the component is clicked.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
JSMethod
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var doNothingMethod = form.newMethod('function doNothing() { application.output("Doing nothing."); }');
var onClickMethod = form.newMethod('function onClick(event) { application.output("I was clicked at " + event.getTimestamp()); }');
var onDoubleClickMethod = form.newMethod('function onDoubleClick(event) { application.output("I was double-clicked at " + event.getTimestamp()); }');
var onRightClickMethod = form.newMethod('function onRightClick(event) { application.output("I was right-clicked at " + event.getTimestamp()); }');
// At creation the button has the 'doNothing' method as onClick handler, but we'll change that later.
var btn = form.newButton('I am a button', 10, 40, 200, 20, doNothingMethod);
btn.onAction = onClickMethod;
btn.onDoubleClick = onDoubleClickMethod;
btn.onRightClick = onRightClickMethod;

...

classlastDetailRow

...

idstyleClass
Table Row (tr)
idname
Table Cell (td)
styleClass
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

The name of the style class that should be applied to this component.

When defining style classes for specific component types, their names
must be prefixed according to the type of the component. For example
in order to define a class names 'fancy' for fields, in the style
definition the class must be named 'field.fancy'. If it would be
intended for labels, then it would be named 'label.fancy'. When specifying
the class name for a component, the prefix is dropped however. Thus the
field or the label will have its styleClass property set to 'fancy' only.

Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
var style = solutionModel.newStyle('myStyle','field.fancy { background-color: yellow; }');
form.styleName = 'myStyle'; // First set the style on the form.
field.styleClass = 'fancy'; // Then set the style class on the field.

...

classlastDetailRow

...

idtext
Table Row (tr)
idname
Table Cell (td)
text

...

iddes

...

classsIndent

...

function onClick(event) { application.output("I was clicked at " + event.getTimestamp()); }');
var onDoubleClickMethod = form.newMethod('function onDoubleClick(event) { application.output("I was double-clicked at " + event.getTimestamp()); }');
var onRightClickMethod = form.newMethod('function onRightClick(event) { application.output("I was right-clicked at " + event.getTimestamp()); }');
// At creation the button has the 'doNothing' method as onClick handler, but we'll change that later.
var btn = form.newButton('I am a button', 10, 40, 200, 20, doNothingMethod);
btn.onAction = onClickMethod;
btn.onDoubleClick = onDoubleClickMethod;
btn.onRightClick = onRightClickMethod;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstyleClass
Table Row (tr)
idname
Table Cell (td)
styleClass
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent

The name of the style class that should be applied to this component.

When defining style classes for specific component types, their names
must be prefixed according to the type of the component. For example
in order to define a class names 'fancy' for fields, in the style
definition the class must be named 'field.fancy'. If it would be
intended for labels, then it would be named 'label.fancy'. When specifying
the class name for a component, the prefix is dropped however. Thus the
field or the label will have its styleClass property set to 'fancy' only.

Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var 

...

form 

...

= solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field = form.

...

newField('

...

parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
var style = solutionModel.newStyle('myStyle','field.fancy { background-color: yellow; }');
form.styleName = 'myStyle'; // 

...

First 

...

set 

...

the 

...

style 

...

on 

...

the 

...

form.

...

field.

...

styleClass = '

...

fancy'; // Then set the style class on the field.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
id

...

text
Table Row (tr)
idname
Table Cell (td)
visible
text
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The

...

text that is displayed inside the component

...

.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent

...

String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div

...

classsIndent

...

languagejavascript

...

classsIndent
Code Block
languagejavascript
// In general the text is specified when creating the component.
var label = form.newLabel('Initial text', 10, 10, 100, 20);
// But it can be changed later if needed.
label.text = 'Changed text';
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
id

...

visible
Table Row (tr)
idname
Table Cell (td)
width
visible
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The

...

visible property of the component, default true.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent

...

Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field = form.newField('parent_table_text', JSField.TEXT_FIELD

...

,

...

 10, 10, 100, 20);
field.visible = false;
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idx
Table Row (tr)
idname
Table Cell (td)
x
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The x coordinate of the component on the form.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original location: ' + field.x + ', ' + field.y);
field.x = 90;
field.y = 90;
application.output('changed location: ' + field.x + ', ' + field.y);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idy
Table Row (tr)
idname
Table Cell (td)
y
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
The y coordinate of the component on the form.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

...

var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original location: ' + field.x + ', ' + field.y);
field.x = 90;
field.y = 90;
application.output('changed location: ' + field.x + ', ' + field.y);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

...

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details