Child pages
  • JSLabel

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{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}[String]{td}{td}[#dataProviderID]
The dataprovider of the component.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#displaysTags]
Flag that enables or disables merging of data inside components using tags (placeholders).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#enabled]
The enable state of the component, default true.{td}{tr}{tbody}{tbody}{tr}{td}[NumberString]{td}{td}[#height#format]
The height in pixels of the component format that should be applied when displaying data(using dataProviderID) in the label/button.{td}{tr}{tbody}{tbody}{tr}{td}[StringNumber]{td}{td}[#name#height]
The height in namepixels of the component.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethodNumber]{td}{td}[#onAction]
The method that is executed when the component is clicked.#labelSize]
Size property for a label, values 1 to 60 correspond to header class h1 to h6{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#styleClass#name]
The name of the style class that should be applied to this component.{td}{tr}{tbody}{tbody}{tr}{td}[StringJSMethod]{td}{td}[#text#onAction]
The textmethod that is displayedexecuted insidewhen the component is clicked.{td}{tr}{tbody}{tbody}{tr}{td}[BooleanString]{td}{td}[#visible#styleClass]
The visiblename property of the component, default truestyle class that should be applied to this component.{td}{tr}{tbody}{tbody}{tr}{td}[NumberString]{td}{td}[#width#text]
The text widththat inis pixelsdisplayed ofinside the component.{td}{tr}{tbody}{tbody}{tr}{td}[NumberBoolean]{td}{td}[#x#visible]
The xvisible coordinateproperty of the component on, default true.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#width]
The width in pixels of the formcomponent.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#y#x]
The yx 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}[JSTitle]{td}{td}[#getTitle]\()
Get title label for the label.{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=dataProviderID|class=node}{tr:id=name}{td}h6.dataProviderID{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:dataProviderID_des|trigger=button|text=}{sub-section}{sub-section:dataProviderID_des|trigger=none|class=sIndent}TheReplace dataprovider of the component.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:dataProviderID_snc|trigger=button|text=}{sub-section}{sub-section:dataProviderID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:dataProviderID_prs|trigger=button|text=}{sub-section}{sub-section:dataProviderID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:dataProviderID_ret|trigger=button|text=}{sub-section}{sub-section:dataProviderID_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:dataProviderID_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dataProviderID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:dataProviderID_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dataProviderID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:dataProviderID_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:dataProviderID_sam|trigger=none}{code:language=javascript}
// Normally the dataprovider is specified when a component is created.
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
// But it can be modified later if needed.
field.dataProviderID = 'parent_table_id';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=displaysTags|class=node}{tr:id=name}{td}h6.displaysTags{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:displaysTags_des|trigger=button|text=}{sub-section}{sub-section:displaysTags_des|trigger=none|class=sIndent}FlagReplace that enables or disables merging of data inside components using tags (placeholders).
Tags (or placeholders) are words surrounded by %%on each side. There are data tags and
standard tags. Data tags consist in names of dataproviders surrounded by%%. Standard tags
are a set of predefined tags that are made available by the system.

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

The default value of this flag is "false", that is merging of data is disabled by default.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Sincewith description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:displaysTags_snc|trigger=button|text=}{sub-section}{sub-section:displaysTags_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:displaysTags_sncprs|trigger=button|text=}{sub-section}{sub-section:displaysTags_sncprs|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:displaysTags_prsret|trigger=button|text=}{sub-section}{sub-section:displaysTags_prsret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:displaysTags_retsee|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:displaysTags_retsee|trigger=none|class=sIndent}[Boolean]{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:displaysTags_seelink|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:displaysTags_seelink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:displaysTags_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:displaysTags_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:tr:id=sam}{td}*Sample*\\{sub-section:displaysTags_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:displaysTags_sam|trigger=none}{code:language=javascript}
var label = form.newLabel('You are viewing record no. %%parent_table_id%%. You are running on server %%serverURL%%.', 
					10, 10, 600, 100);
label.displaysTags = true;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=enabled|class=node}{tr:id=name}{td}h6.enabled{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:enabled_des|trigger=button|text=}{sub-section}{sub-section:enabled_des|trigger=none|class=sIndent}TheReplace enable state of the component, default true.{sub-sectionwith description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:enabled_snc|trigger=button|text=}{sub-section}{sub-section:enabled_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:enabled_prs|trigger=button|text=}{sub-section}{sub-section:enabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:enabled_ret|trigger=button|text=}{sub-section}{sub-section:enabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:enabled_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:enabled_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:enabled_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=heightformat|class=node}{tr:id=name}{td}h6.heightformat{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:heightformat_des|trigger=button|text=}{sub-section}{sub-section:heightformat_des|trigger=none|class=sIndent}TheReplace height in pixels of the component.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:heightformat_snc|trigger=button|text=}{sub-section}{sub-section:heightformat_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:heightformat_prs|trigger=button|text=}{sub-section}{sub-section:heightformat_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:heightformat_ret|trigger=button|text=}{sub-section}{sub-section:heightformat_ret|trigger=none|class=sIndent}[NumberString]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:heightformat_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:heightformat_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:heightformat_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:heightformat_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:heightformat_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:heightformat_sam|trigger=none}{code:language=javascript}
var fieldlabel = form.newFieldnewLabel('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20100);
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)label.format = '$#.00';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=nameheight|class=node}{tr:id=name}{td}h6.nameheight{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:nameheight_des|trigger=button|text=}{sub-section}{sub-section:nameheight_des|trigger=none|class=sIndent}TheReplace name of the component. Through this name it can also accessed in methods.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:nameheight_snc|trigger=button|text=}{sub-section}{sub-section:nameheight_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:nameheight_prs|trigger=button|text=}{sub-section}{sub-section:nameheight_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:nameheight_ret|trigger=button|text=}{sub-section}{sub-section:nameheight_ret|trigger=none|class=sIndent}[StringNumber]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:nameheight_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:nameheight_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:nameheight_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:nameheight_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:nameheight_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:nameheight_sam|trigger=none}{code:language=javascript}
var formfield = solutionModelform.newFormnewField('someFormparent_table_text', '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';
{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onActionlabelSize|class=node}{tr:id=name}{td}h6.onActionlabelSize{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:onActionlabelSize_des|trigger=button|text=}{sub-section}{sub-section:onActionlabelSize_des|trigger=none|class=sIndent}TheReplace method that is executed when the component is clicked.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:onActionlabelSize_snc|trigger=button|text=}{sub-section}{sub-section:onActionlabelSize_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:onActionlabelSize_prs|trigger=button|text=}{sub-section}{sub-section:onActionlabelSize_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:onActionlabelSize_ret|trigger=button|text=}{sub-section}{sub-section:onActionlabelSize_ret|trigger=none|class=sIndent}[JSMethodNumber]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:onActionlabelSize_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onActionlabelSize_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:onActionlabelSize_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onActionlabelSize_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:onActionlabelSize_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onActionlabelSize_sam|trigger=none}{code:language=javascript}
var doNothingMethodlabel = form.newMethodnewLabel('function doNothing() { application.output("Doing nothing."); }');
var onClickMethod = form.newMethod('function onClick(event) { application.output("I was clicked at " + event.getTimestamp()); }');
var onDoubleClickMethod = form.newMethod('function onDoubleClick(event) { application.output("I was double-clicked at " + event.getTimestamp()); }');
var onRightClickMethod = form.newMethod('function onRightClick(event) { application.output("I was right-clicked at " + event.getTimestamp()); }');
// At creation the button has the 'doNothing' method as onClick handler, but we'll change that later.
var btn = form.newButton('I am a button', 10, 40, 200, 20, doNothingMethod);
btn.onAction = onClickMethod;
btn.onDoubleClick = onDoubleClickMethod;
btn.onRightClick = onRightClickMethod;
{codeHello', 1);
label.labelSize = 2 // corresponds to header class h2
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=name|class=node}{tr:id=name}{td}h6.name{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:name_des|trigger=button|text=}{sub-section}{sub-section:name_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:name_snc|trigger=button|text=}{sub-section}{sub-section:name_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:name_prs|trigger=button|text=}{sub-section}{sub-section:name_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:name_ret|trigger=button|text=}{sub-section}{sub-section:name_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:name_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:name_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:name_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:name_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onAction|class=node}{tr:id=name}{td}h6.onAction{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:onAction_des|trigger=button|text=}{sub-section}{sub-section:onAction_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:onAction_snc|trigger=button|text=}{sub-section}{sub-section:onAction_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:onAction_prs|trigger=button|text=}{sub-section}{sub-section:onAction_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:onAction_ret|trigger=button|text=}{sub-section}{sub-section:onAction_ret|trigger=none|class=sIndent}[JSMethod]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:onAction_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onAction_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:onAction_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onAction_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:onAction_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:onAction_sam|trigger=none}{code:language=javascript}
var doNothingMethod = form.newMethod('function doNothing() { application.output("Doing nothing."); }');
var onClickMethod = form.newMethod('function onClick(event) { application.output("I was clicked at " + event.getTimestamp()); }');
var onDoubleClickMethod = form.newMethod('function onDoubleClick(event) { application.output("I was double-clicked at " + event.getTimestamp()); }');
var onRightClickMethod = form.newMethod('function onRightClick(event) { application.output("I was right-clicked at " + event.getTimestamp()); }');
// At creation the button has the 'doNothing' method as onClick handler, but we'll change that later.
var btn = form.newButton('I am a button', 10, 40, 200, 20, doNothingMethod);
btn.onAction = onClickMethod;
btn.onDoubleClick = onDoubleClickMethod;
btn.onRightClick = onRightClickMethod;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=styleClass|class=node}{tr:id=name}{td}h6.styleClass{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:styleClass_des|trigger=button|text=}{sub-section}{sub-section:styleClass_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:styleClass_snc|trigger=button|text=}{sub-section}{sub-section:styleClass_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:styleClass_prs|trigger=button|text=}{sub-section}{sub-section:styleClass_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:styleClass_ret|trigger=button|text=}{sub-section}{sub-section:styleClass_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:styleClass_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:styleClass_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:classid=lastDetailRowlink}{td}{td}{tr}{tbody}{tbody:id=styleClass|class=node}{tr:id=name}{td}h6.styleClass*External links*\\{sub-section:styleClass_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:styleClass_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=dessam}{td}*Sample*\\{sub-section:styleClass_dessam|trigger=button|text=}{sub-section}{sub-section:styleClass_des|trigger=none|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:class=sIndent}{sub-section:styleClass_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=text|class=node}{tr:id=name}{td}h6.text{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:text_des|trigger=button|text=}{sub-section}{sub-section:text_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:styleClasstext_snc|trigger=button|text=}{sub-section}{sub-section:styleClasstext_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:styleClasstext_prs|trigger=button|text=}{sub-section}{sub-section:styleClasstext_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:styleClasstext_ret|trigger=button|text=}{sub-section}{sub-section:styleClasstext_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:styleClasstext_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:styleClasstext_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:styleClasstext_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:styleClasstext_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:styleClasstext_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:styleClasstext_sam|trigger=none}{code:language=javascript}
var form = solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field// In general the text is specified when creating the component.
var label = form.newFieldnewLabel('parent_table_Initial 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', 20);
// But Thenit setcan thebe stylechanged classlater onif theneeded.
fieldlabel.text = 'Changed text';
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=textvisible|class=node}{tr:id=name}{td}h6.textvisible{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:textvisible_des|trigger=button|text=}{sub-section}{sub-section:textvisible_des|trigger=none|class=sIndent}TheReplace text that is displayed inside the component.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:textvisible_snc|trigger=button|text=}{sub-section}{sub-section:textvisible_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:textvisible_prs|trigger=button|text=}{sub-section}{sub-section:textvisible_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:textvisible_ret|trigger=button|text=}{sub-section}{sub-section:textvisible_ret|trigger=none|class=sIndent}[StringBoolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:textvisible_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:textvisible_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:textvisible_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:textvisible_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:textvisible_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:textvisible_sam|trigger=none}{code:language=javascript}
// In
generalvar theform text is specified when creating the component.
var label= solutionModel.newForm('printForm', 'db:/example_data/parent_table', null, false, 400, 300);
var field = form.newLabelnewField('Initial parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
// But it can be changed later if needed.
label.text = 'Changed text'field.visible = false;
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=visiblewidth|class=node}{tr:id=name}{td}h6.visiblewidth{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:visiblewidth_des|trigger=button|text=}{sub-section}{sub-section:visiblewidth_des|trigger=none|class=sIndent}TheReplace visible property of the component, default true.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:visiblewidth_snc|trigger=button|text=}{sub-section}{sub-section:visiblewidth_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:visiblewidth_prs|trigger=button|text=}{sub-section}{sub-section:visiblewidth_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:visiblewidth_ret|trigger=button|text=}{sub-section}{sub-section:visiblewidth_ret|trigger=none|class=sIndent}[BooleanNumber]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:visiblewidth_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:visiblewidth_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:visiblewidth_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:visiblewidth_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:visiblewidth_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:visiblewidth_sam|trigger=none}{code:language=javascript}
var formfield = solutionModelform.newFormnewField('printFormparent_table_text', '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 = falseJSField.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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=widthx|class=node}{tr:id=name}{td}h6.widthx{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:widthx_des|trigger=button|text=}{sub-section}{sub-section:widthx_des|trigger=none|class=sIndent}TheReplace width in pixels of the component.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:widthx_snc|trigger=button|text=}{sub-section}{sub-section:widthx_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:widthx_prs|trigger=button|text=}{sub-section}{sub-section:widthx_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:widthx_ret|trigger=button|text=}{sub-section}{sub-section:widthx_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:widthx_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:widthx_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:widthx_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:widthx_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:widthx_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:widthx_sam|trigger=none}{code:language=javascript}
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original widthlocation: ' + field.width);
application.output('original height:x + ', ' + field.heighty);
field.widthx = 20090;
field.heighty = 10090;
application.output('modifiedchanged widthlocation: ' + field.width);
application.output('modified height: x + ', ' + field.heighty);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=xy|class=node}{tr:id=name}{td}h6.xy{td}{trtr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:xy_des|trigger=button|text=}{sub-section}{sub-section:xy_des|trigger=none|class=sIndent}TheReplace x coordinate of the component on the form.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:xy_snc|trigger=button|text=}{sub-section}{sub-section:xy_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:xy_prs|trigger=button|text=}{sub-section}{sub-section:xy_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:xy_ret|trigger=button|text=}{sub-section}{sub-section:xy_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:xy_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:xy_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:xy_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:xy_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:xy_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:xy_sam|trigger=none}{code:language=javascript}
var field = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 10, 100, 20)', JSField.TEXT_FIELD, 10, 10, 100, 20);
application.output('original location: ' + field.x + ', ' + field.y);
field.x = 90;
field.y = 90;
application.output('originalchanged location: ' + field.x + ', ' + field.y);
field.x = 90;
field.y = 90;
application.output('changed location: ' + field.x + ', ' + field.y);
{code}{sub-section}{div}
{code}{sub-section}{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=getTitle|class=node}{tr:id=name}{td}h6.getTitle{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=y|class=node}{tr:id=name}{td}h6.y{td}{trid=sig}{td}{span:style=float: left; margin-right: 5px;}[JSTitle]{span}{span:id=iets|style=float: left; font-weight: bold;}getTitle{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ygetTitle_des|trigger=button|text=}{sub-section}{sub-section:ygetTitle_des|trigger=none|class=sIndent}TheReplace y coordinate of the component on the form.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ygetTitle_snc|trigger=button|text=}{sub-section}{sub-section:ygetTitle_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:ygetTitle_prs|trigger=button|text=}{sub-section}{sub-section:ygetTitle_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ygetTitle_ret|trigger=button|text=}{sub-section}{sub-section:ygetTitle_ret|trigger=none|class=sIndent}[NumberJSTitle]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ygetTitle_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ygetTitle_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ygetTitle_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ygetTitle_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ygetTitle_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ygetTitle_sam|trigger=none}{code:language=javascript}
var fieldform = formsolutionModel.newFieldnewForm('someForm', 'db:/example_data/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););
var label = form.newLabel('Customers', 1);
label.getTitle().text = 'Some text'
forms['someForm'].controller.show()
{code}{sub-section}{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}{table}