{div:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.\\ \\ Enter additional information related to this 'class' inside the \{div} macro with 'id=description'{div}
{div:id=description}{div}\\
{table:id=|class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Extends{th}{tr}{tr}{td}{span:class=sWordList}[JSComponent]{span}{td}{tr}{table}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#anchors]
Enables a component to stick to a specific side of form and/or to
grow or shrink when a window is resized.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#background]
The background color of the component.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#borderType]
The type, color and style of border of the component.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled]
The enable state of the component, default true.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#fontType]
The font type of the component.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreground]
The foreground color of the component.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#formIndex]
The Z index of this component.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#groupID]
A String representing a group ID for this component.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#height]
The height in pixels of the component.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#initialSort]
The default sort order for the rows displayed in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#multiLine]
When set, portal rows can have a custom layout of fields, buttons, etc.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the component.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onDrag]
The method that is triggered when (non Design Mode) dragging occurs.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onDragEnd]
The method that is triggered when (non Design Mode) dragging end occurs.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onDragOver]
The method that is triggered when (non Design Mode) dragging over a component occurs.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onDrop]
The method that is triggered when (non Design Mode) dropping occurs.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onRender]
The method that is executed when the component is rendered.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#printSliding]
Enables an element to resize based on its content and/or move when printing.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#printable]
Flag that tells if the component should be printed or not when the form is printed.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#relationName]
The name of the relationship between the table related to the currently active
form and the table you want to show data from in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#reorderable]
When set, the portal rows can be re\-ordered by dragging the column headers.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#resizable]
When set the portal rows can be resized by users.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#rowHeight]
The height of each row in pixels.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#scrollbars]
Scrollbar options for the vertical and horizontal scrollbars.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#showHorizontalLines]
When set, the portal displays horizontal lines between the rows.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#showVerticalLines]
When set the portal displays vertical lines between the columns.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#sortable]
When set, users can sort the contents of the portal by clicking on the column headings.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#styleClass]
The name of the style class that should be applied to this component.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#tabSeq]
An index that specifies the position of the component in the tab sequence.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#transparent]
Flag that tells if the component is transparent or not.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#visible]
The visible property of the component, default true.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#width]
The width in pixels of the component.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#x]
The x coordinate of the component on the form.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#y]
The y coordinate of the component on the form.{td}{tr}{tbody}{table}\\
{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSButton]{td}{td}[#getButton]\(name)
Retrieves a button from the portal based on the name of the button.{td}{tr}{tbody}{tbody}{tr}{td}[JSButton]\[]{td}{td}[#getButtons]\()
Retrieves an array with all buttons in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getDesignTimeProperty]\()
Get a design\-time property of an element.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#getField]\(name)
Retrieves a field from this portal based on the name of the field.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]\[]{td}{td}[#getFields]\()
Retrieves an array with all fields in a portal.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getIntercellSpacing]\()
The additional spacing between cell rows.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]{td}{td}[#getLabel]\(name)
Retrieves a label from this portal based on the name of the label.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]\[]{td}{td}[#getLabels]\()
Retrieves all labels from the portal.{td}{tr}{tbody}{tbody}{tr}{td}[UUID]{td}{td}[#getUUID]\()
Returns the UUID of this component.{td}{tr}{tbody}{tbody}{tr}{td}[JSButton]{td}{td}[#newButton]\(text, x, width, height, action)
Creates a new button on the portal with the given text, place, size and JSMethod as the onClick action.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newCalendar]\(dataprovider, x, width, height)
Creates a new calendar field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newCheck]\(dataprovider, x, width, height)
Creates a new checkbox field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newComboBox]\(dataprovider, x, width, height)
Creates a new combobox field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newField]\(dataprovider, displaytype, x, width, height)
Creates a new field on this form.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newHtmlArea]\(dataprovider, x, width, height)
Creates a new HTML Area field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newImageMedia]\(dataprovider, x, width, height)
Creates a new Image Media field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]{td}{td}[#newLabel]\(txt, x, width, height)
Creates a new label on the form, with the given text, place and size.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]{td}{td}[#newLabel]\(text, x, width, height, action)
Creates a new label on the form, with the given text, place, size and an JSMethod as the onClick action.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newPassword]\(dataprovider, x, width, height)
Creates a new password field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newRadios]\(dataprovider, x, width, height)
Creates a new radio buttons field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newRtfArea]\(dataprovider, x, width, height)
Creates a new RTF Area field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newTextArea]\(dataprovider, x, width, height)
Creates a new text area field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newTextField]\(dataprovider, x, width, height)
Creates a new text field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newTypeAhead]\(dataprovider, x, width, height)
Creates a new type ahead field in the portal.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#putDesignTimeProperty]\()
Set a design\-time property of an element.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#removeDesignTimeProperty]\()
Clear a design\-time property of an element.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setIntercellSpacing]\(width, height)
The additional spacing between cell rows.{td}{tr}{tbody}{table}\\
{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=anchors}{tr:id=name}{td}h6.anchors{td}{tr}{tr:id=des}{td}{div:class=sIndent}Enables a component to stick to a specific side of form and/or to
grow or shrink when a window is resized.
If opposite anchors are activated then the component with grow or
shrink with the window. For example if Top and Bottom are activated,
then the component will grow/shrink when the window is vertically
resized. If Left and Right are activated then the component
will grow/shrink when the window is horizontally resized.
If opposite anchors are not activated, then the component will
keep a constant distance from the sides of the window which
correspond to the activated anchors.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('mediaForm', 'db:/example_data/parent_table', null, false, 400, 300);
var strechAllDirectionsLabel = form.newLabel('Strech all directions', 10, 10, 380, 280);
strechAllDirectionsLabel.background = 'red';
strechAllDirectionsLabel.anchors = SM_ANCHOR.ALL;
var strechVerticallyLabel = form.newLabel('Strech vertically', 10, 10, 190, 280);
strechVerticallyLabel.background = 'green';
strechVerticallyLabel.anchors = SM_ANCHOR.WEST | SM_ANCHOR.NORTH | SM_ANCHOR.SOUTH;
var strechHorizontallyLabel = form.newLabel('Strech horizontally', 10, 10, 380, 140);
strechHorizontallyLabel.background = 'blue';
strechHorizontallyLabel.anchors = SM_ANCHOR.NORTH | SM_ANCHOR.WEST | SM_ANCHOR.EAST;
var stickToTopLeftCornerLabel = form.newLabel('Stick to top-left corner', 10, 10, 200, 100);
stickToTopLeftCornerLabel.background = 'orange';
stickToTopLeftCornerLabel.anchors = SM_ANCHOR.NORTH | SM_ANCHOR.WEST; // This is equivalent to SM_ANCHOR.DEFAULT
var stickToBottomRightCornerLabel = form.newLabel('Stick to bottom-right corner', 190, 190, 200, 100);
stickToBottomRightCornerLabel.background = 'pink';
stickToBottomRightCornerLabel.anchors = SM_ANCHOR.SOUTH | SM_ANCHOR.EAST;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=background}{tr:id=name}{td}h6.background{td}{tr}{tr:id=des}{td}{div:class=sIndent}The background color of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// This property can be used on all types of components.
// Here it is illustrated only for labels and fields.
var greenLabel = form.newLabel('Green',10,10,100,50);
greenLabel.background = 'green'; // Use generic names for colors.
var redField = form.newField('parent_table_text',JSField.TEXT_FIELD,10,110,100,30);
redField.background = '#FF0000'; // Use RGB codes for colors.
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=borderType}{tr:id=name}{td}h6.borderType{td}{tr}{tr:id=des}{td}{div:class=sIndent}The type, color and style of border of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//HINT: To know exactly the notation of this property set it in the designer and then read it once out through the solution model.
var field = form.newField('my_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
field.borderType = solutionModel.createLineBorder(1,'#ff0000');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=enabled}{tr:id=name}{td}h6.enabled{td}{tr}{tr:id=des}{td}{div:class=sIndent}The enable state of the component, default true.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=fontType}{tr:id=name}{td}h6.fontType{td}{tr}{tr:id=des}{td}{div:class=sIndent}The font type of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var label = form.newLabel('Text here', 10, 50, 100, 20);
label.fontType = solutionModel.createFont('Times New Roman',1,14);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=foreground}{tr:id=name}{td}h6.foreground{td}{tr}{tr:id=des}{td}{div:class=sIndent}The foreground color of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// This property can be used on all types of components.
// Here it is illustrated only for labels and fields.
var labelWithBlueText = form.newLabel('Blue text', 10, 10, 100, 30);
labelWithBlueText.foreground = 'blue'; // Use generic names for colors.
var fieldWithYellowText = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 50, 100, 20);
fieldWithYellowText.foreground = '#FFFF00'; // Use RGB codes for colors.
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=formIndex}{tr:id=name}{td}h6.formIndex{td}{tr}{tr:id=des}{td}{div:class=sIndent}The Z index of this component. If two components overlap,
then the component with higher Z index is displayed above
the component with lower Z index.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var labelBelow = form.newLabel('Green', 10, 10, 100, 50);
labelBelow.background = 'green';
labelBelow.formIndex = 10;
var fieldAbove = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 30);
fieldAbove.background = '#FF0000';
fieldAbove.formIndex = 20;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=groupID}{tr:id=name}{td}h6.groupID{td}{tr}{tr:id=des}{td}{div:class=sIndent}A String representing a group ID for this component. If several
components have the same group ID then they belong to the same
group of components. Using the group itself, all components can
be disabled/enabled or made invisible/visible.
The group id should be a javascript compatible identifier to allow access of the group in scripting.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('someForm', 'db:/example_data/parent_table', null, false, 400, 300);
var label = form.newLabel('Green', 10, 10, 100, 20);
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
label.groupID = 'someGroup';
field.groupID = 'someGroup';
forms['someForm'].elements.someGroup.enabled = false;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=height}{tr:id=name}{td}h6.height{td}{tr}{tr:id=des}{td}{div:class=sIndent}The height in pixels of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original width: ' + field.width);
application.output('original height: ' + field.height);
field.width = 200;
field.height = 100;
application.output('modified width: ' + field.width);
application.output('modified height: ' + field.height);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=initialSort}{tr:id=name}{td}h6.initialSort{td}{tr}{tr:id=des}{td}{div:class=sIndent}The default sort order for the rows displayed in the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp',rel,10,10,620,460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',100,100,20);
childrenPortal.newTextField('child_table_parent_id', 200, 100, 20);
childrenPortal.initialSort = 'child_table_text desc';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=multiLine}{tr:id=name}{td}h6.multiLine{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set, portal rows can have a custom layout of fields, buttons, etc. displayed for each
matching row (rather than the default "grid").{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp',rel,10,10,620,460);
// Set the fields some distance apart horizontally. By default this distance
// is ignored and the components are put in a grid.
var idField = childrenPortal.newTextField('child_table_id', 0, 100, 20);
idField.background = 'yellow';
var textField = childrenPortal.newTextField('child_table_text',150,100,20);
textField.background = 'green';
var parentIdField = childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
parentIdField.background = 'orange';
// Disable the grid placing of components, and make the distance between components
// become active.
childrenPortal.multiLine = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name}{tr:id=name}{td}h6.name{td}{tr}{tr:id=des}{td}{div:class=sIndent}The name of the component. Through this name it can also accessed in methods.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.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';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onDrag}{tr:id=name}{td}h6.onDrag{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is triggered when (non Design Mode) dragging occurs.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
form.onDrag = form.newMethod('function onDrag(event) { application.output("onDrag intercepted from " + event.getSource()); }');
form.onDragEnd = form.newMethod('function onDragEnd(event) { application.output("onDragEnd intercepted from " + event.getSource()); }');
form.onDragOver = form.newMethod('function onDragOver(event) { application.output("onDragOver intercepted from " + event.getSource()); }');
form.onDrop = form.newMethod('function onDrop(event) { application.output("onDrop intercepted from " + event.getSource()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onDragEnd}{tr:id=name}{td}h6.onDragEnd{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is triggered when (non Design Mode) dragging end occurs.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
form.onDrag = form.newMethod('function onDrag(event) { application.output("onDrag intercepted from " + event.getSource()); }');
form.onDragEnd = form.newMethod('function onDragEnd(event) { application.output("onDragEnd intercepted from " + event.getSource()); }');
form.onDragOver = form.newMethod('function onDragOver(event) { application.output("onDragOver intercepted from " + event.getSource()); }');
form.onDrop = form.newMethod('function onDrop(event) { application.output("onDrop intercepted from " + event.getSource()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onDragOver}{tr:id=name}{td}h6.onDragOver{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is triggered when (non Design Mode) dragging over a component occurs.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
form.onDrag = form.newMethod('function onDrag(event) { application.output("onDrag intercepted from " + event.getSource()); }');
form.onDragEnd = form.newMethod('function onDragEnd(event) { application.output("onDragEnd intercepted from " + event.getSource()); }');
form.onDragOver = form.newMethod('function onDragOver(event) { application.output("onDragOver intercepted from " + event.getSource()); }');
form.onDrop = form.newMethod('function onDrop(event) { application.output("onDrop intercepted from " + event.getSource()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onDrop}{tr:id=name}{td}h6.onDrop{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is triggered when (non Design Mode) dropping occurs.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
form.onDrag = form.newMethod('function onDrag(event) { application.output("onDrag intercepted from " + event.getSource()); }');
form.onDragEnd = form.newMethod('function onDragEnd(event) { application.output("onDragEnd intercepted from " + event.getSource()); }');
form.onDragOver = form.newMethod('function onDragOver(event) { application.output("onDragOver intercepted from " + event.getSource()); }');
form.onDrop = form.newMethod('function onDrop(event) { application.output("onDrop intercepted from " + event.getSource()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onRender}{tr:id=name}{td}h6.onRender{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is executed when the component is rendered.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
portal.onRender = form.newMethod('function onRender(event) { event.getElement().bgcolor = \'#00ff00\' }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=printSliding}{tr:id=name}{td}h6.printSliding{td}{tr}{tr:id=des}{td}{div:class=sIndent}Enables an element to resize based on its content and/or move when printing.
The component can move horizontally or vertically and can grow or shrink in
height and width, based on its content and the content of neighboring
components.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var slidingLabel = form.newLabel('Some long text here', 10, 10, 5, 5);
slidingLabel.printSliding = SM_PRINT_SLIDING.GROW_HEIGHT | SM_PRINT_SLIDING.GROW_WIDTH;
slidingLabel.background = 'gray';
forms['printForm'].controller.showPrintPreview();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=printable}{tr:id=name}{td}h6.printable{td}{tr}{tr:id=des}{td}{div:class=sIndent}Flag that tells if the component should be printed or not when the form is printed.
By default components are printable.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var printedField = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
var notPrintedField = form.newField('parent_table_id', JSField.TEXT_FIELD, 10, 40, 100, 20);
notPrintedField.printable = false; // This field won't show up in print preview and won't be printed.
forms['printForm'].controller.showPrintPreview()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=relationName}{tr:id=name}{td}h6.relationName{td}{tr}{tr:id=des}{td}{div:class=sIndent}The name of the relationship between the table related to the currently active
form and the table you want to show data from in the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Create the portal based on one relation.
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
var idField = childrenPortal.newTextField('child_table_id', 0, 100, 20);
var textField = childrenPortal.newTextField('child_table_text',150,100,20);
var parentIdField = childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
// Now make the portal be based on another relation.
childrenPortal.relationName = 'parent_to_smaller_children';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=reorderable}{tr:id=name}{td}h6.reorderable{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set, the portal rows can be re\-ordered by dragging the column headers.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
childrenPortal.reorderable = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=resizable}{tr:id=name}{td}h6.resizable{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set the portal rows can be resized by users.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
// Make the columns resizable. By default they are not resizable.
childrenPortal.resizable = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rowHeight}{tr:id=name}{td}h6.rowHeight{td}{tr}{tr:id=des}{td}{div:class=sIndent}The height of each row in pixels. If 0 or not set, the height defaults to 10.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
childrenPortal.rowHeight = 30;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=scrollbars}{tr:id=name}{td}h6.scrollbars{td}{tr}{tr:id=des}{td}{div:class=sIndent}Scrollbar options for the vertical and horizontal scrollbars. Each of the
vertical and horizontal scrollbars can be configured to display all the time,
to display only when needed or to never display.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var noScrollbars = form.newField('my_table_text', JSField.TEXT_AREA, 10, 10, 100, 100);
noScrollbars.scrollbars = SM_SCROLLBAR.HORIZONTAL_SCROLLBAR_NEVER | SM_SCROLLBAR.VERTICAL_SCROLLBAR_NEVER;
var neededScrollbars = form.newField('my_table_text', JSField.TEXT_AREA, 120, 10, 100, 100);
neededScrollbars.scrollbars = SM_SCROLLBAR.HORIZONTAL_SCROLLBAR_AS_NEEDED | SM_SCROLLBAR.VERTICAL_SCROLLBAR_AS_NEEDED;
var alwaysScrollbars = form.newField('my_table_text', JSField.TEXT_AREA, 230, 10, 100, 100);
alwaysScrollbars.scrollbars = SM_SCROLLBAR.HORIZONTAL_SCROLLBAR_ALWAYS | SM_SCROLLBAR.VERTICAL_SCROLLBAR_ALWAYS;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showHorizontalLines}{tr:id=name}{td}h6.showHorizontalLines{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set, the portal displays horizontal lines between the rows.
NOTE:
In a multi\-line portal, a horizontal line is only displayed
in the selected row; to display a horizontal line in all rows, add a
line to the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
childrenPortal.showHorizontalLines = true;
childrenPortal.showVerticalLines = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showVerticalLines}{tr:id=name}{td}h6.showVerticalLines{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set the portal displays vertical lines between the columns.
NOTE:
In a multi\-line portal, a vertical line is only displayed
in the selected row; to display a vertical line in all rows, add
a line to the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
childrenPortal.showHorizontalLines = true;
childrenPortal.showVerticalLines = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sortable}{tr:id=name}{td}h6.sortable{td}{tr}{tr:id=des}{td}{div:class=sIndent}When set, users can sort the contents of the portal by clicking on the column headings.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',150,100,20);
childrenPortal.newTextField('child_table_parent_id', 300, 100, 20);
childrenPortal.sortable = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=styleClass}{tr:id=name}{td}h6.styleClass{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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.
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=tabSeq}{tr:id=name}{td}h6.tabSeq{td}{tr}{tr:id=des}{td}{div:class=sIndent}An index that specifies the position of the component in the tab sequence. The components
are put into the tab sequence in increasing order of this property. A value of 0 means
to use the default mechanism of building the tab sequence (based on their location on the form).
A value of \-2 means to remove the component from the tab sequence.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Create three fields. Based on how they are placed, by default they will come one
// after another in the tab sequence.
var fieldOne = form.newField('parent_table_id', JSField.TEXT_FIELD, 10, 10, 100, 20);
var fieldTwo = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
var fieldThree = form.newField('parent_table_id', JSField.TEXT_FIELD, 10, 70, 100, 20);
// Set the third field come before the first in the tab sequence, and remove the
// second field from the tab sequence.
fieldOne.tabSeq = 2;
fieldTwo.tabSeq = SM_DEFAULTS.IGNORE;
fieldThree.tabSeq = 1;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=transparent}{tr:id=name}{td}h6.transparent{td}{tr}{tr:id=des}{td}{div:class=sIndent}Flag that tells if the component is transparent or not.
The default value is "false", that is the components
are not transparent.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Load an image from disk an create a Media object based on it.
var imageBytes = plugins.file.readFile('d:/ball.jpg');
var media = solutionModel.newMedia('ball.jpg', imageBytes);
// Put on the form a label with the image.
var image = form.newLabel('', 10, 10, 100, 100);
image.imageMedia = media;
// Put two fields over the image. The second one will be transparent and the
// image will shine through.
var nonTransparentField = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 20, 100, 20);
var transparentField = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 50, 100, 20);
transparentField.transparent = true;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=visible}{tr:id=name}{td}h6.visible{td}{tr}{tr:id=des}{td}{div:class=sIndent}The visible property of the component, default true.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=width}{tr:id=name}{td}h6.width{td}{tr}{tr:id=des}{td}{div:class=sIndent}The width in pixels of the component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original width: ' + field.width);
application.output('original height: ' + field.height);
field.width = 200;
field.height = 100;
application.output('modified width: ' + field.width);
application.output('modified height: ' + field.height);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=x}{tr:id=name}{td}h6.x{td}{tr}{tr:id=des}{td}{div:class=sIndent}The x coordinate of the component on the form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=y}{tr:id=name}{td}h6.y{td}{tr}{tr:id=des}{td}{div:class=sIndent}The y coordinate of the component on the form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
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);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getButton-String}{tr:id=name}{td}h6.getButton{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSButton]{span}{span:style=font-weight: bold;}getButton{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves a button from the portal based on the name of the button.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- The name of the button to retrieve.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton] -- A JSButton instance that corresponds to the button with the specified name.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var clickMethod = form.newMethod('function clickMe() { application.output("I was clicked!"); }');
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
var btn = childrenPortal.newButton('Click me!', 400, 100, 20, clickMethod);
btn.name = 'clickMeBtn'; // Give a name to the button, so we can retrieve it by name later.
// Retrieve the button by name and do something with it.
var btnBack = childrenPortal.getButton('clickMeBtn');
btnBack.background = 'yellow';
// Retrieve the button through the array of all buttons and do something with it.
var allButtons = childrenPortal.getButtons();
var btnBackAgain = allButtons[0];
btnBackAgain.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getButtons}{tr:id=name}{td}h6.getButtons{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSButton]\[]{span}{span:style=font-weight: bold;}getButtons{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves an array with all buttons in the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton]\[] -- An array with all buttons in the portal.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var clickMethod = form.newMethod('function clickMe() { application.output("I was clicked!"); }');
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
var btn = childrenPortal.newButton('Click me!', 400, 100, 20, clickMethod);
btn.name = 'clickMeBtn'; // Give a name to the button, so we can retrieve it by name later.
// Retrieve the button by name and do something with it.
var btnBack = childrenPortal.getButton('clickMeBtn');
btnBack.background = 'yellow';
// Retrieve the button through the array of all buttons and do something with it.
var allButtons = childrenPortal.getButtons();
var btnBackAgain = allButtons[0];
btnBackAgain.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDesignTimeProperty}{tr:id=name}{td}h6.getDesignTimeProperty{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}getDesignTimeProperty{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get a design\-time property of an element.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
var prop = fld.getDesignTimeProperty('myprop')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getField-String}{tr:id=name}{td}h6.getField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}getField{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves a field from this portal based on the name of the field.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- The name of the field to retrieve.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance corresponding to the field with the specified name.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var cal = childrenPortal.newField('my_table_date', JSField.CALENDAR, 0, 60, 20);
var tfield = childrenPortal.newField('my_table_text', JSField.TEXT_FIELD, 60, 60, 20);
tfield.name = 'textField'; // Give a name to the field so we can retrieve it later by name.
// Retrieve the text field by its name and do something with it.
var textFieldBack = childrenPortal.getField('textField');
textFieldBack.background = 'yellow';
// Retrieve the calendar field through the array of all fields and do something with it.
var allFields = childrenPortal.getFields();
var calFieldBack = allFields[0];
calFieldBack.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFields}{tr:id=name}{td}h6.getFields{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]\[]{span}{span:style=font-weight: bold;}getFields{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves an array with all fields in a portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField]\[] -- An array with JSField instances corresponding to all fields in the portal.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var cal = childrenPortal.newField('my_table_date', JSField.CALENDAR, 0, 60, 20);
var tfield = childrenPortal.newField('my_table_text', JSField.TEXT_FIELD, 60, 60, 20);
tfield.name = 'textField'; // Give a name to the field so we can retrieve it later by name.
// Retrieve the text field by its name and do something with it.
var textFieldBack = childrenPortal.getField('textField');
textFieldBack.background = 'yellow';
// Retrieve the calendar field through the array of all fields and do something with it.
var allFields = childrenPortal.getFields();
var calFieldBack = allFields[0];
calFieldBack.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getIntercellSpacing}{tr:id=name}{td}h6.getIntercellSpacing{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getIntercellSpacing{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The additional spacing between cell rows. Is composed from the horizontal spacing
and the vertical spacing.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String] -- A java.awt.Dimension object holding the horizontal and vertical intercell spacing.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var spacing = childrenPortal.getIntercellSpacing();
application.output("horizontal spacing: " + spacing.width);
application.output("vertical spacing: " + spacing.height);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLabel-String}{tr:id=name}{td}h6.getLabel{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabel]{span}{span:style=font-weight: bold;}getLabel{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves a label from this portal based on the name of the label.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- The name of the label to retrieve.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel] -- A JSLabel instance corresponding to the label with the specified name.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var calLabel = childrenPortal.newLabel('Date', 120, 60, 20);
var textLabel = childrenPortal.newLabel('Text', 180, 60, 20);
textLabel.name = 'textLabel'; // Give a name to this label, so we can retrieve it by name.
// Retrieve the second label by name.
var textLabelBack = childrenPortal.getLabel('textLabel');
textLabelBack.background = 'yellow';
// Retrieve the first label through the array of all labels.
var allLabels = childrenPortal.getLabels();
var calLabelBack = allLabels[0];
calLabelBack.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLabels}{tr:id=name}{td}h6.getLabels{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabel]\[]{span}{span:style=font-weight: bold;}getLabels{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Retrieves all labels from the portal.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel]\[] -- An array of JSLabel instances corresponding to all labels in the portal.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var calLabel = childrenPortal.newLabel('Date', 120, 60, 20);
var textLabel = childrenPortal.newLabel('Text', 180, 60, 20);
textLabel.name = 'textLabel'; // Give a name to this label, so we can retrieve it by name.
// Retrieve the second label by name.
var textLabelBack = childrenPortal.getLabel('textLabel');
textLabelBack.background = 'yellow';
// Retrieve the first label through the array of all labels.
var allLabels = childrenPortal.getLabels();
var calLabelBack = allLabels[0];
calLabelBack.foreground = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getUUID}{tr:id=name}{td}h6.getUUID{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[UUID]{span}{span:style=font-weight: bold;}getUUID{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the UUID of this component.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[UUID]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newButton-String_Number_Number_Number_Object}{tr:id=name}{td}h6.newButton{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSButton]{span}{span:style=font-weight: bold;}newButton{span}{span}\(text, x, width, height, action){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new button on the portal with the given text, place, size and JSMethod as the onClick action.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} text -- The text to be displayed on the button.
\{[Number]} x -- The x coordinate of the button. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the button.
\{[Number]} height -- The height of the button. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
\{[Object]} action -- The JSMethod object that should be executed when the button is clicked.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton] -- A JSButton instance representing the newly created button.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var clickMethod = form.newMethod('function clickMe() { application.output("I was clicked!"); }');
var childrenPortal = form.newPortal('pp', 'parent_to_child', 10, 10, 620, 460);
childrenPortal.newButton('Click me!', 400, 100, 20, clickMethod);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newCalendar-Object_Number_Number_Number}{tr:id=name}{td}h6.newCalendar{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newCalendar{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new calendar field in the portal. It is equivalent to calling "newField"
with the type JSField.CALENDAR.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created calendar.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var cal = childrenPortal.newCalendar('my_table_date', 0, 60, 20);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newCheck-Object_Number_Number_Number}{tr:id=name}{td}h6.newCheck{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newCheck{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new checkbox field in the portal. It is equivalent to calling "newField"
with the type JSField.CHECKS.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created checkbox field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
var chk = childrenPortal.newCheck('my_table_options', 60, 60, 50);
chk.valuelist = vlist;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newComboBox-Object_Number_Number_Number}{tr:id=name}{td}h6.newComboBox{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newComboBox{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new combobox field in the portal. It is equivalent to calling "newField"
with the type JSField.COMBOBOX.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created combobox field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
var cmb = childrenPortal.newComboBox('my_table_options', 120, 160, 20);
cmb.valuelist = vlist;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newField-Object_Number_Number_Number_Number}{tr:id=name}{td}h6.newField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newField{span}{span}\(dataprovider, displaytype, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new field on this form. The type of the field is specified by
using one of the JSField constants like JSField.TEXT\_FIELD.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} displaytype -- The display type of the field. Use constants from JSField for this parameter.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
var cal = childrenPortal.newField('my_table_date', JSField.CALENDAR, 0, 60, 20);
var chk = childrenPortal.newField('my_table_options', JSField.CHECKS, 60, 60, 50);
chk.valuelist = vlist;
var cmb = childrenPortal.newField('my_table_options', JSField.COMBOBOX, 120, 160, 20);
cmb.valuelist = vlist;
var html = childrenPortal.newField('my_table_html', JSField.HTML_AREA, 180, 60, 50);
var img = childrenPortal.newField('my_table_image', JSField.IMAGE_MEDIA, 240, 60, 50);
var pwd = childrenPortal.newField('my_table_text', JSField.PASSWORD, 300, 60, 20);
var radio = childrenPortal.newField('my_table_options', JSField.RADIOS, 360, 60, 50);
radio.valuelist = vlist;
var rtf = childrenPortal.newField('my_table_rtf', JSField.RTF_AREA, 420, 60, 50);
var tarea = childrenPortal.newField('my_table_text', JSField.TEXT_AREA, 480, 60, 50);
var tfield = childrenPortal.newField('my_table_text', JSField.TEXT_FIELD, 540, 60, 20);
var tahead = childrenPortal.newField('my_table_text', JSField.TYPE_AHEAD, 600, 60, 20);
tahead.valuelist = vlist;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newHtmlArea-Object_Number_Number_Number}{tr:id=name}{td}h6.newHtmlArea{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newHtmlArea{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new HTML Area field in the portal. It is equivalent to calling "newField"
with the type JSField.HTML\_AREA.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created HTML Area field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var html = childrenPortal.newHtmlArea('my_table_html', 180, 60, 50);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newImageMedia-Object_Number_Number_Number}{tr:id=name}{td}h6.newImageMedia{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newImageMedia{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new Image Media field in the portal. It is equivalent to calling "newField"
with the type JSField.IMAGE\_MEDIA.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created Image Media field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var img = childrenPortal.newImageMedia('my_table_image', 240, 60, 50);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newLabel-String_Number_Number_Number}{tr:id=name}{td}h6.newLabel{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabel]{span}{span:style=font-weight: bold;}newLabel{span}{span}\(txt, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new label on the form, with the given text, place and size.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} txt -- The text that will be displayed in the label.
\{[Number]} x -- The x coordinate of the label. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the label.
\{[Number]} height -- The height of the label. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel] -- A JSLabel instance that represents the newly created label.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var clickMethod = form.newMethod('function clickMe() { application.output("I was clicked!"); }');
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var calLabel = childrenPortal.newLabel('Date', 120, 60, 20);
// This will result in a button being actually created, because we specify an action.
var textLabel = childrenPortal.newLabel('Text', 180, 60, 20, clickMethod);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newLabel-String_Number_Number_Number_Object}{tr:id=name}{td}h6.newLabel{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabel]{span}{span:style=font-weight: bold;}newLabel{span}{span}\(text, x, width, height, action){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new label on the form, with the given text, place, size and an JSMethod as the onClick action.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} text -- The text that will be displayed in the label.
\{[Number]} x -- The x coordinate of the label. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the label.
\{[Number]} height -- The height of the label. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
\{[Object]} action -- The JSMethod object that should be executed when the label is clicked.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel] -- A JSLabel instance that represents the newly created label.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var clickMethod = form.newMethod('function clickMe() { application.output("I was clicked!"); }');
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var calLabel = childrenPortal.newLabel('Date', 120, 60, 20);
// This will result in a button being actually created, because we specify an action.
var textLabel = childrenPortal.newLabel('Text', 180, 60, 20, clickMethod);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newPassword-Object_Number_Number_Number}{tr:id=name}{td}h6.newPassword{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newPassword{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new password field in the portal. It is equivalent to calling "newField"
with the type JSField.PASSWORD.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created password field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var pwd = childrenPortal.newPassword('my_table_text', 300, 60, 20);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRadios-Object_Number_Number_Number}{tr:id=name}{td}h6.newRadios{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newRadios{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new radio buttons field in the portal. It is equivalent to calling "newField"
with the type JSField.RADIOS.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created radio buttons.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
var radio = childrenPortal.newRadios('my_table_options', 360, 60, 50);
radio.valuelist = vlist;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRtfArea-Object_Number_Number_Number}{tr:id=name}{td}h6.newRtfArea{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newRtfArea{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new RTF Area field in the portal. It is equivalent to calling "newField"
with the type JSField.RTF\_AREA.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created RTF Area field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var rtf = childrenPortal.newRtfArea('my_table_rtf', 420, 60, 50);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextArea-Object_Number_Number_Number}{tr:id=name}{td}h6.newTextArea{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newTextArea{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new text area field in the portal. It is equivalent to calling "newField"
with the type JSField.TEXT\_AREA.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created text area field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var tarea = childrenPortal.newTextArea('my_table_text', 480, 60, 50);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextField-Object_Number_Number_Number}{tr:id=name}{td}h6.newTextField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newTextField{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new text field in the portal. It is equivalent to calling "newField"
with the type JSField.TEXT\_FIELD.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created text field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var tfield = childrenPortal.newTextField('my_table_text', 540, 60, 20);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTypeAhead-Object_Number_Number_Number}{tr:id=name}{td}h6.newTypeAhead{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]{span}{span:style=font-weight: bold;}newTypeAhead{span}{span}\(dataprovider, x, width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new type ahead field in the portal. It is equivalent to calling "newField"
with the type JSField.TYPE\_AHEAD.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} dataprovider -- The data provider for this field. Can be either a column name, or an instance of JSVariable.
\{[Number]} x -- The x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.
\{[Number]} width -- The width of the field.
\{[Number]} height -- The height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- A JSField instance that corresponds to the newly created type ahead field.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp', 'parent_to_my_table', 10, 10, 1180, 780);
var vlist = solutionModel.newValueList('options', JSValueList.CUSTOM_VALUES);
vlist.customValues = "one\ntwo\nthree\nfour";
var tahead = childrenPortal.newTypeAhead('my_table_text', 600, 60, 20);
tahead.valuelist = vlist;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=putDesignTimeProperty}{tr:id=name}{td}h6.putDesignTimeProperty{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}putDesignTimeProperty{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Set a design\-time property of an element.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
fld.putDesignTimeProperty('myprop', 'strawberry')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeDesignTimeProperty}{tr:id=name}{td}h6.removeDesignTimeProperty{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}removeDesignTimeProperty{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Clear a design\-time property of an element.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm('orders')
var fld = frm.getField('fld')
fld.removeDesignTimeProperty('myprop')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setIntercellSpacing-Number_Number}{tr:id=name}{td}h6.setIntercellSpacing{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setIntercellSpacing{span}{span}\(width, height){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The additional spacing between cell rows. Is composed from the horizontal spacing
and the vertical spacing.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} width -- The horizontal spacing between cells.
\{[Number]} height -- The vertical spacing between cells.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childrenPortal = form.newPortal('pp',rel,10,10,620,460);
childrenPortal.newTextField('child_table_id', 0, 100, 20);
childrenPortal.newTextField('child_table_text',100,100,20);
childrenPortal.newTextField('child_table_parent_id', 200, 100, 20);
childrenPortal.setIntercellSpacing(5,10);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientservoy sReturnTypes2100%height: 30px;2ExtendssWordListBLOCKservoy sSummary12%30%58%height: 30px;3Property SummaryEnables a component to stick to a specific side of form and/or to grow or shrink when a window is resized.The background color of the component.The type, color and style of border of the component.The enable state of the component, default true.The font type of the component.The foreground color of the component.The Z index of this component.A String representing a group ID for this component.The height in pixels of the component.The default sort order for the rows displayed in the portal.When set, portal rows can have a custom layout of fields, buttons, etc.The name of the component.The method that is triggered when (non Design Mode) dragging occurs.The method that is triggered when (non Design Mode) dragging end occurs.The method that is triggered when (non Design Mode) dragging over a component occurs.The method that is triggered when (non Design Mode) dropping occurs.The method that is executed when the component is rendered.Enables an element to resize based on its content and/or move when printing.Flag that tells if the component should be printed or not when the form is printed.The name of the relationship between the table related to the currently active form and the table you want to show data from in the portal.When set, the portal rows can be re-ordered by dragging the column headers.When set the portal rows can be resized by users.The height of each row in pixels.Scrollbar options for the vertical and horizontal scrollbars.When set, the portal displays horizontal lines between the rows.When set the portal displays vertical lines between the columns.When set, users can sort the contents of the portal by clicking on the column headings.The name of the style class that should be applied to this component.An index that specifies the position of the component in the tab sequence.Flag that tells if the component is transparent or not.The visible property of the component, default true.The width in pixels of the component.The x coordinate of the component on the form.The y coordinate of the component on the form.servoy sSummary12%30%58%height: 30px;3Methods SummaryGet the value of an attribute of the element.Returns the attribute names of an element.Retrieves a button from the portal based on the name of the button.Retrieves an array with all buttons in the portal.Returns the comment of this component.Get a design-time property of an element.Get the design-time properties of an element.Retrieves a field from this portal based on the name of the field.Retrieves an array with all fields in a portal.Returns the name of the form.The additional spacing between cell rows.Retrieves a label from this portal based on the name of the label.Retrieves all labels from the portal.Returns the UUID of this component.Creates a new button on the portal with the given text, place, size and JSMethod as the onClick action.Creates a new calendar field in the portal.Creates a new checkbox field in the portal.Creates a new combobox field in the portal.Creates a new field on this form.Creates a new HTML Area field in the portal.Creates a new Image Media field in the portal.Creates a new label on the form, with the given text, place and size.Creates a new label on the form, with the given text, place, size and an JSMethod as the onClick action.Creates a new password field in the portal.Creates a new radio buttons field in the portal.Creates a new RTF Area field in the portal.Creates a new text area field in the portal.Creates a new text field in the portal.Creates a new type ahead field in the portal.Set a design-time property of an element.Remove the attribute of an element.Clear a design-time property of an element.voidSet the attribute value of an element.voidThe additional spacing between cell rows.propertyservoy sDetail2100%height:30px2Property Detailsanchorsname
anchors
dessIndent
Enables a component to stick to a specific side of form and/or to
grow or shrink when a window is resized.
If opposite anchors are activated then the component with grow or
shrink with the window. For example if Top and Bottom are activated,
then the component will grow/shrink when the window is vertically
resized. If Left and Right are activated then the component
will grow/shrink when the window is horizontally resized.
If opposite anchors are not activated, then the component will
keep a constant distance from the sides of the window which
correspond to the activated anchors.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowbackgroundname
background
dessIndent
The background color of the component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowborderTypename
borderType
dessIndent
The type, color and style of border of the component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowenabledname
enabled
dessIndent
The enable state of the component, default true.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowfontTypename
fontType
dessIndent
The font type of the component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowforegroundname
foreground
dessIndent
The foreground color of the component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowformIndexname
formIndex
dessIndent
The Z index of this component. If two components overlap,
then the component with higher Z index is displayed above
the component with lower Z index.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgroupIDname
groupID
dessIndent
A String representing a group ID for this component. If several
components have the same group ID then they belong to the same
group of components. Using the group itself, all components can
be disabled/enabled or made invisible/visible.
The group id should be a javascript compatible identifier to allow access of the group in scripting.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowheightname
height
dessIndent
The height in pixels of the component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowinitialSortname
initialSort
dessIndent
The default sort order for the rows displayed in the portal.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowmultiLinename
multiLine
dessIndent
When set, portal rows can have a custom layout of fields, buttons, etc. displayed for each
matching row (rather than the default "grid").
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownamename
name
dessIndent
The name of the component. Through this name it can also accessed in methods.
Must be a valid javascript name. (no - in the name or start with number)
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowonDragname
onDrag
dessIndent
The method that is triggered when (non Design Mode) dragging occurs.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowonDragEndname
onDragEnd
dessIndent
The method that is triggered when (non Design Mode) dragging end occurs.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowonDragOvername
onDragOver
dessIndent
The method that is triggered when (non Design Mode) dragging over a component occurs.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowonDropname
onDrop
dessIndent
The method that is triggered when (non Design Mode) dropping occurs.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowonRendername
onRender
dessIndent
The method that is executed when the component is rendered.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowprintSlidingname
printSliding
dessIndent
Enables an element to resize based on its content and/or move when printing.
The component can move horizontally or vertically and can grow or shrink in
height and width, based on its content and the content of neighboring
components.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowprintablename
printable
dessIndent
Flag that tells if the component should be printed or not when the form is printed.
By default components are printable.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowrelationNamename
relationName
dessIndent
The name of the relationship between the table related to the currently active
form and the table you want to show data from in the portal.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowreorderablename
reorderable
dessIndent
When set, the portal rows can be re-ordered by dragging the column headers.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowresizablename
resizable
dessIndent
When set the portal rows can be resized by users.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowrowHeightname
rowHeight
dessIndent
The height of each row in pixels. If 0 or not set, the height defaults to 10.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowscrollbarsname
scrollbars
dessIndent
Scrollbar options for the vertical and horizontal scrollbars. Each of the
vertical and horizontal scrollbars can be configured to display all the time,
to display only when needed or to never display.
When set, the portal displays horizontal lines between the rows.
NOTE:
In a multi-line portal, a horizontal line is only displayed
in the selected row; to display a horizontal line in all rows, add a
line to the portal.
When set the portal displays vertical lines between the columns.
NOTE:
In a multi-line portal, a vertical line is only displayed
in the selected row; to display a vertical line in all rows, add
a line to the portal.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowsortablename
sortable
dessIndent
When set, users can sort the contents of the portal by clicking on the column headings.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowstyleClassname
styleClass
dessIndent
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.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowtabSeqname
tabSeq
dessIndent
An index that specifies the position of the component in the tab sequence. The components
are put into the tab sequence in increasing order of this property. A value of 0 means
to use the default mechanism of building the tab sequence (based on their location on the form).
A value of -2 means to remove the component from the tab sequence.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowtransparentname
transparent
dessIndent
Flag that tells if the component is transparent or not.
The default value is "false", that is the components
are not transparent.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowvisiblename
visible
dessIndent
The visible property of the component, default true.
The additional spacing between cell rows. Is composed from the horizontal spacing
and the vertical spacing.
ret
Returns
sIndent A java.awt.Dimension object holding the horizontal and vertical intercell spacing.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowgetLabelname
getLabel(name)
dessIndent
Retrieves a label from this portal based on the name of the label.
prs
Parameters
sIndentnameThe name of the label to retrieve.ret
Returns
sIndent A JSLabel instance corresponding to the label with the specified name.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowgetLabelsname
getLabels()
dessIndent
Retrieves all labels from the portal.
ret
Returns
sIndent An array of JSLabel instances corresponding to all labels in the portal.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRowgetUUIDname
getUUID()
dessIndent
Returns the UUID of this component.
ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRownewButtonname
newButton(text, x, width, height, action)
dessIndent
Creates a new button on the portal with the given text, place, size and JSMethod as the onClick action.
prs
Parameters
sIndenttextThe text to be displayed on the button.xThe x coordinate of the button. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the button.heightThe height of the button. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.actionThe JSMethod object that should be executed when the button is clicked.ret
Returns
sIndent A JSButton instance representing the newly created button.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewCalendarname
newCalendar(dataprovider, x, width, height)
dessIndent
Creates a new calendar field in the portal. It is equivalent to calling "newField"
with the type JSField.CALENDAR.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created calendar.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewCheckname
newCheck(dataprovider, x, width, height)
dessIndent
Creates a new checkbox field in the portal. It is equivalent to calling "newField"
with the type JSField.CHECKS.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created checkbox field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewComboBoxname
newComboBox(dataprovider, x, width, height)
dessIndent
Creates a new combobox field in the portal. It is equivalent to calling "newField"
with the type JSField.COMBOBOX.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created combobox field.clients
Creates a new field on this form. The type of the field is specified by
using one of the JSField constants like JSField.TEXT_FIELD.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.displaytypeThe display type of the field. Use constants from JSField for this parameter.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewHtmlAreaname
newHtmlArea(dataprovider, x, width, height)
dessIndent
Creates a new HTML Area field in the portal. It is equivalent to calling "newField"
with the type JSField.HTML_AREA.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created HTML Area field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewImageMedianame
newImageMedia(dataprovider, x, width, height)
dessIndent
Creates a new Image Media field in the portal. It is equivalent to calling "newField"
with the type JSField.IMAGE_MEDIA.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created Image Media field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewLabelname
newLabel(txt, x, width, height)
dessIndent
Creates a new label on the form, with the given text, place and size.
prs
Parameters
sIndenttxtThe text that will be displayed in the label.xThe x coordinate of the label. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the label.heightThe height of the label. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSLabel instance that represents the newly created label.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewLabelname
newLabel(text, x, width, height, action)
dessIndent
Creates a new label on the form, with the given text, place, size and an JSMethod as the onClick action.
prs
Parameters
sIndenttextThe text that will be displayed in the label.xThe x coordinate of the label. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the label.heightThe height of the label. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.actionThe JSMethod object that should be executed when the label is clicked.ret
Returns
sIndent A JSLabel instance that represents the newly created label.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewPasswordname
newPassword(dataprovider, x, width, height)
dessIndent
Creates a new password field in the portal. It is equivalent to calling "newField"
with the type JSField.PASSWORD.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created password field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewRadiosname
newRadios(dataprovider, x, width, height)
dessIndent
Creates a new radio buttons field in the portal. It is equivalent to calling "newField"
with the type JSField.RADIOS.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created radio buttons.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewRtfAreaname
newRtfArea(dataprovider, x, width, height)
dessIndent
Creates a new RTF Area field in the portal. It is equivalent to calling "newField"
with the type JSField.RTF_AREA.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created RTF Area field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewTextAreaname
newTextArea(dataprovider, x, width, height)
dessIndent
Creates a new text area field in the portal. It is equivalent to calling "newField"
with the type JSField.TEXT_AREA.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created text area field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewTextFieldname
newTextField(dataprovider, x, width, height)
dessIndent
Creates a new text field in the portal. It is equivalent to calling "newField"
with the type JSField.TEXT_FIELD.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created text field.clients
Supported Clients
sIndentSmartClient,WebClientsam
Sample
sIdentjavascriptlastDetailRownewTypeAheadname
newTypeAhead(dataprovider, x, width, height)
dessIndent
Creates a new type ahead field in the portal. It is equivalent to calling "newField"
with the type JSField.TYPE_AHEAD.
prs
Parameters
sIndentdataproviderThe data provider for this field. Can be either a column name, or an instance of JSVariable.xThe x coordinate of the field. If the portal does not have the "multiLine" property set, then the x coordinates are used only for determining the order of the columns in the grid. If the portal has the "multiLine" property set, then the components are actually displayed at the specified coordinates.widthThe width of the field.heightThe height of the field. In a portal the height of all components is set to the height of the first component, unless the "multiLine" property is set.ret
Returns
sIndent A JSField instance that corresponds to the newly created type ahead field.clients