Child pages
  • JSForm

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Rev: 1377850809279
Wiki Markup
{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 sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{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}[#dataSource]
The names of the database server and table that this form is linked to.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the form.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#navigator]
The navigator (previously named "controller")
that is used to control/navigate to the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onHide]
The method that is triggered when another form is being activated.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onLoad]
The method that is triggered when a form is loaded/reloaded from the repository; used to alter elements, set globals, hide toolbars, 
etc; onShow method can also be assigned.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onRecordSelection]
The method that is triggered each time a record is selected.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#onShow]
The method that is triggered EVERY TIME the form is displayed; an argument must be passed to the method if this is the first time the form is displayed.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#serverName]
Get the server name used by this form.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#tableName]
The \[name of the table/SQL view\].{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}[JSBean]{td}{td}[#getBean]\(name)
Returns a JSBean that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSButton]{td}{td}[#getButton]\(name)
Returns a JSButton that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSButton]\[]{td}{td}[#getButtons]\()
Returns all JSButtons of this form, including the ones without a name.{td}{tr}{tbody}{tbody}{tr}{td}[JSComponent]{td}{td}[#getComponent]\(name)
Returns a JSComponent that has the given name; if found it will be a JSField, JSLabel, JSButton, JSPortal, JSBean or JSTabPanel.{td}{tr}{tbody}{tbody}{tr}{td}[JSComponent]\[]{td}{td}[#getComponents]\()
Returns a array of all the JSComponents that a form has; they are of type JSField,JSLabel,JSButton,JSPortal,JSBean or JSTabPanel.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#getField]\(name)
The field with the specified name.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]\[]{td}{td}[#getFields]\()
Returns all JSField objects of this form, including the ones without a name.{td}{tr}{tbody}{tbody}{tr}{td}[JSFooter]{td}{td}[#getFooter]\()
Get the Footer part on the form if it exists.{td}{tr}{tbody}{tbody}{tr}{td}[JSHeader]{td}{td}[#getHeader]\()
Get the Header part on the form if it exists.{td}{tr}{tbody}{tbody}{tr}{td}[JSInsetList]{td}{td}[#getInsetList]\(name)
Returns an existing inset list.{td}{tr}{tbody}{tbody}{tr}{td}[JSInsetList]\[]{td}{td}[#getInsetLists]\()
Gets all insets lists on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]{td}{td}[#getLabel]\(name)
Returns a JSLabel that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]\[]{td}{td}[#getLabels]\()
Returns all JSLabels of this form (not including its super form), including the ones without a name.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#getMethod]\(name)
Gets an existing form method for the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]\[]{td}{td}[#getMethods]\()
Returns all existing form methods for this form.{td}{tr}{tbody}{tbody}{tr}{td}[JSPart]{td}{td}[#getPart]\(type)
Gets a part of the form from the given type (see JSPart constants).{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#getVariable]\(name)
Gets an existing form variable for the given name.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]\[]{td}{td}[#getVariables]\()
An array consisting of all form variables for this form.{td}{tr}{tbody}{tbody}{tr}{td}[JSBean]{td}{td}[#newBean]\(name, y)
Creates a new JSBean object on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSButton]{td}{td}[#newButton]\(txt, y, jsmethod)
Creates a new button on the form with the given text.{td}{tr}{tbody}{tbody}{tr}{td}[JSCalendar]{td}{td}[#newCalendar]\(dataprovider, y)
Creates a new JSCalendar field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSCalendar]{td}{td}[#newCalendar]\(dataprovider, y)
Creates a new JSCalendar field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSChecks]{td}{td}[#newCheck]\(dataprovider, y)
Creates a new JSChecks field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSChecks]{td}{td}[#newCheck]\(dataprovider, y)
Creates a new JSChecks field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSCombobox]{td}{td}[#newCombobox]\(dataprovider, y)
Creates a new JSCombobox field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSCombobox]{td}{td}[#newCombobox]\(dataprovider, y)
Creates a new JSCombobox field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newField]\(dataprovider, type, y)
Creates a new JSField object on the form .{td}{tr}{tbody}{tbody}{tr}{td}[JSField]{td}{td}[#newField]\(dataprovider, type, y)
Creates a new JSField object on the form .{td}{tr}{tbody}{tbody}{tr}{td}[JSFooter]{td}{td}[#newFooter]\()
Creates a new Footer part on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSHeader]{td}{td}[#newHeader]\()
Creates a new Header part on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSInsetList]{td}{td}[#newInsetList]\(yLocation, relationName, headerText, textDataProviderID)
Creates a new inset list mobile component in the given form.{td}{tr}{tbody}{tbody}{tr}{td}[JSLabel]{td}{td}[#newLabel]\(txt, y)
Creates a new JSLabel object on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSMethod]{td}{td}[#newMethod]\(code)
Creates a new form JSMethod \- based on the specified code.{td}{tr}{tbody}{tbody}{tr}{td}[JSPassword]{td}{td}[#newPassword]\(dataprovider, y)
Creates a new JSPassword field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSPassword]{td}{td}[#newPassword]\(dataprovider, y)
Creates a new JSPassword field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSRadios]{td}{td}[#newRadios]\(dataprovider, y)
Creates a new JSRadios field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSRadios]{td}{td}[#newRadios]\(dataprovider, y)
Creates a new JSRadios field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSTextArea]{td}{td}[#newTextArea]\(dataprovider, y)
Creates a new JSTextArea field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSTextArea]{td}{td}[#newTextArea]\(dataprovider, y)
Creates a new JSTextArea field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSText]{td}{td}[#newTextField]\(dataprovider, y)
Creates a new JSText field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSText]{td}{td}[#newTextField]\(dataprovider, y)
Creates a new JSText field on the form.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#newVariable]\(name, type)
Creates a new form JSVariable \- based on the name of the variable object and the number type, uses the SolutionModel JSVariable constants.{td}{tr}{tbody}{tbody}{tr}{td}[JSVariable]{td}{td}[#newVariable]\(name, type, defaultValue)
Creates a new form JSVariable \- based on the name of the variable object , the  type  and it's default value , uses the SolutionModel JSVariable constants.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeBean]\(name)
Removes a JSBean that has the specified name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeButton]\(name)
Removes a JSButton that has the specified name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeComponent]\(name)
Removes a component (JSLabel, JSButton, JSField, JSPortal, JSBean, JSTabpanel) that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeField]\(name)
Removes a JSField that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeFooter]\()
Removes a JSFooter if it exists.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeHeader]\()
Removes a JSHeader if it exists.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeInsetList]\(name)
Removes inset list from the form.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeLabel]\(name)
Removes a JSLabel that has the given name.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeMethod]\(name)
Removes a  form JSMethod \- based on the specified code.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeVariable]\(name)
Removes a form JSVariable \- based on the name of the variable object.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{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=dataSource}{tr:id=name}{td}h6.dataSource{td}{tr}{tr:id=des}{td}{div:class=sIndent}The names of the database server and table that this form is linked to.{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 myForm = solutionModel.newForm('newForm', 'db:/a_server/a_table', 'aStyleName', false, 800, 600)
myForm.dataSource = 'db:/anotherServerName/anotherTableName'
{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 form.{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('myForm',myDatasource,null,true,800,600);
var formName = form.name;
application.output(formName);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=navigator}{tr:id=name}{td}h6.navigator{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var aForm = solutionModel.newForm('newForm1', myDatasource);
// you can also use SM_DEFAULTS.INGORE to just reuse the navigator that is already set.
// here we assign an other new form as the navigator.
var aNavigator = solutionModel.newForm('navForm', myDatasource);
aForm.navigator = aNavigator;
{code}{The navigator (previously named "controller")
that is used to control/navigate to the form. The navigator is shown at
the left or at the right side of the form, depending on the page orientation. 

The following options are available: 
\-none\- \- no navigator is assigned. 
DEFAULT \- the Servoy default navigator is assigned. 
IGNORE \- the navigator last assigned to a previous form. 
Custom \- a custom navigator based on a selected form.{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=onHide}{tr:id=name}{td}h6.onHide{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form.onShowaForm = formsolutionModel.newMethodnewForm('newForm1'function onShow(firstShow, event) { application.output("onShow intercepted on " + event.getFormName() + ". first show? " + firstShow); return false; }');
form.onHide = form.newMethod('function onHide(event) { application.output("onHide blocked on " + event.getFormName()); return false; }');
myDatasource);
// you can also use SM_DEFAULTS.INGORE to just reuse the navigator that is already set.
// here we assign an other new form as the navigator.
var aNavigator = solutionModel.newForm('navForm', myDatasource);
aForm.navigator = aNavigator;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onLoadonHide}{tr:id=name}{td}h6.onLoad.onHide{td}{tr}{tr:id=des}{td}{div:class=sIndent}The method that is triggered when another form is being activated. 
NOTE: If the onHide method returns false, the form can be prevented from hiding. 
For example, when using onHide with showFormInDialog, the form will not close by clicking the dialog close box (X).{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.onLoadonShow = form.newMethod('function onLoadonShow(firstShow, event) { application.output("onLoadonShow intercepted on " + event.getFormName()); } + ". first show? " + firstShow); return false; }');
form.onUnLoadonHide = form.newMethod('function onUnLoadonHide(event) { application.output("onUnLoadonHide interceptedblocked on " + event.getFormName()); return false; }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onRecordSelectiononLoad}{tr:id=name}{td}h6.onRecordSelectiononLoad{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{des}{td}{div:class=sIndent}{code:language=javascript}
form.onRecordEditStart = form.newMethod('function onRecordEditStart(event) { application.output("onRecordEditStart intercepted on " + event.getFormName()); }');
form.onRecordEditStop = form.newMethod('function onRecordEditStop(record, event) { application.output("onRecordEditStop intercepted on " + event.getFormName() + ". record is: " + record); }');
form.onRecordSelection = form.newMethod('function onRecordSelection(event) { application.output("onRecordSelection intercepted on " + event.getFormName()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=onShow}{tr:id=name}{td}h6.onShowThe method that is triggered when a form is loaded/reloaded from the repository; used to alter elements, set globals, hide toolbars, 
etc; onShow method can also be assigned.
NOTE: onShow should be used to access current foundset dataproviders; onLoad cannot be used because the foundset data is not loaded until after the form is loaded. 
Also calls to loadRecords() should be done in the onShow method and not in the onLoad method
If you call loadRecords() in the onShow method, you may want to set the namedFoundSet property of the form to 'empty' to prevent the first default form query.
NOTE: the onLoad event bubbles down, meaning that the onLoad is first fired on the parent then on a tab in a tabpanel (and in tab of that tab panels if you are 3 deep){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.onShowonLoad = form.newMethod('function onShowonLoad(firstShow, event) { application.output("onShowonLoad intercepted on " + event.getFormName() + ". first show? " + firstShow); return false; }');
form.onHideonUnLoad = form.newMethod('function onHideonUnLoad(event) { application.output("onHideonUnLoad blockedintercepted on " + event.getFormName()); return false; }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=serverNameonRecordSelection}{tr:id=name}{td}h6.serverNameonRecordSelection{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[String]The method that is triggered each time a record is selected. 
If a form is in List view or Special table view \- when the user clicks on it.
In Record view \- after the user navigates to another record using the slider or clicks up or down for next/previous record. 
NOTE: Data and Servoy tag values are returned when the onRecordSelection method is executed.{div}{td}{tr}{tr:id=samret}{td}*SampleReturns*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('myForm',myDatasource,null,true,800,600);
form.serverName = 'anotherServerName';
var theServerName = form.serverName;
application.output(theServerName);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=tableName}{tr:id=name}{td}h6.tableName{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{[JSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
varform.onRecordEditStart aForm = solutionModelform.newFormnewMethod('newForm1', myDatasource, null, true, 800, 600);
aForm.tableName = 'anotherTableOfMine'
if (forms['newForm1'].controller.find())
{
	columnTextDataProvider = '=aSearchedValue'
	columnNumberDataProvider = '>10';
	forms['newForm1'].controller.search()
}function onRecordEditStart(event) { application.output("onRecordEditStart intercepted on " + event.getFormName()); }');
form.onRecordEditStop = form.newMethod('function onRecordEditStop(record, event) { application.output("onRecordEditStop intercepted on " + event.getFormName() + ". record is: " + record); }');
form.onRecordSelection = form.newMethod('function onRecordSelection(event) { application.output("onRecordSelection intercepted on " + event.getFormName()); }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{tabletbody:id=onShow}{tr:id=function|class=servoy sDetailname}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getBean-String}{tr:id=name}{td}h6.getBeantd}h6.onShow{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSBean]{span}{span:style=font-weight: bold;}getBean{span}{span}\(name){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the bean
{div}{td}{tr}{trThe method that is triggered EVERY TIME the form is displayed; an argument must be passed to the method if this is the first time the form is displayed. 

NOTE: onShow can be used to access current foundset dataproviders; onLoad cannot be used because the foundset data is not loaded until after the form is loaded. 

NOTE: the onShow event bubbles down, meaning that the onShow event of a form displayed in a tabPanel is fired after the onShow event of the parent.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSBean] -- a JSBean objectJSMethod]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var btn = myForm.getBean("mybean");
application.output(mybean.classNameform.onShow = form.newMethod('function onShow(firstShow, event) { application.output("onShow intercepted on " + event.getFormName() + ". first show? " + firstShow); return false; }');
form.onHide = form.newMethod('function onHide(event) { application.output("onHide blocked on " + event.getFormName()); return false; }');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getButton-StringserverName}{tr:id=name}{td}h6.getButtonserverName{td}{tr}{tr:id=sigdes}{td}{spandiv:style=margin-right: 5px;}[JSButton]{span}{span:style=font-weight: bold;}getButton{span}{span}\(name){span}{td}{tr}{tr:id=prs}{td}*Parametersclass=sIndent}Get the server name used by this form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}\{[String]} name -- the specified name of the button
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton] -- a JSButton object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var btnform = myFormsolutionModel.getButton("hello")newForm('myForm',myDatasource,null,true,800,600);
form.serverName = 'anotherServerName';
var theServerName = form.serverName;
application.output(btn.texttheServerName);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getButtonstableName}{tr:id=name}{td}h6.getButtonstableName{td}{tr}{tr:id=sigdes}{td}{spandiv:style=margin-right: 5px;}[JSButton]\[]{span}{span:style=font-weight: bold;}getButtons{span}{span}\(){spanclass=sIndent}The \[name of the table/SQL view\].\[the name of the database server connection\] the form is based on.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton]\[] -- the list of all JSbuttons on this formsString]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var buttonsaForm = myFormsolutionModel.getButtons();
for (var b in buttons)
{
	if (buttons[b].name != null) 
		application.output(buttons[b].name);
	else
		application.output(buttons[b].text + " has no name ");newForm('newForm1', myDatasource, null, true, 800, 600);
aForm.tableName = 'anotherTableOfMine'
if (forms['newForm1'].controller.find())
{
	columnTextDataProvider = '=aSearchedValue'
	columnNumberDataProvider = '>10';
	forms['newForm1'].controller.search()
}
{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=getComponentgetBean-String}{tr:id=name}{td}h6.getComponentgetBean{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSComponentJSBean]{span}{span:style=font-weight: bold;}getComponentgetBean{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSBean that has the given name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the componentbean
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSComponentJSBean] -- a JSComponent object (might be a JSField, JSLabel, JSButton, JSPortal, JSBean or JSTabPanel){div}{td}{tr}{tr:JSBean object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frmbtn = solutionModel.getForm("myForm");
var cmp = frm.getComponent.getBean("componentNamemybean");
application.output("Component type and name: " + cmpmybean.className);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getComponentsgetButton-String}{tr:id=name}{td}h6.getComponentsgetButton{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSComponentJSButton]\[]{span}{span:style=font-weight: bold;}getComponentsgetButton{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSButton that has the given name.{div}{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{div:class=sIndent}[JSComponent]\{[String]} name -- anthe specified arrayname of all the JSComponents on the form.button
{div}{td}{tr}{tr:id=samret}{td}*SampleReturns*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.getForm("myForm");
var components = form.getComponents();
for (var i in components)
	application.output("Component type and name: " + components[i][JSButton] -- a JSButton object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var btn = myForm.getButton("hello");
application.output(btn.text);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getField-StringgetButtons}{tr:id=name}{td}h6.getFieldgetButtons{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSButton]\[JSField]{span}{span:style=font-weight: bold;}getFieldgetButtons{span}{span}\(name){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the field
Returns all JSButtons of this form, including the ones without a name.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButton]\[JSField] -- a JSField objectthe list of all JSbuttons on this forms{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var formbuttons = solutionModelmyForm.getFormgetButtons("myForm");
var field = form.getField("myField");
application.output(field.dataProviderID);
for (var b in buttons)
{
	if (buttons[b].name != null) 
		application.output(buttons[b].name);
	else
		application.output(buttons[b].text + " has no name ");
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFieldsgetComponent-String}{tr:id=name}{td}h6.getFieldsgetComponent{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFieldJSComponent]\[]{span}{span:style=font-weight: bold;}getFieldsgetComponent{span}{span}\(name){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[JSField]\[] -- all JSField objects of this formReturns a JSComponent that has the given name; if found it will be a JSField, JSLabel, JSButton, JSPortal, JSBean or JSTabPanel.{div}{td}{tr}{tr:id=samprs}{td}*SampleParameters*\\{div:class=sIndent}{code:language=javascript\{[String]} varname frm-- = solutionModel.getForm("myForm");
var fields = frm.getFields();
for (var f in fields)
{
	var fname = fields[f].name;
	if (fname != null)
		application.output(fname);
}
the specified name of the component
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSComponent] -- a JSComponent object (might be a JSField, JSLabel, JSButton, JSPortal, JSBean or JSTabPanel){div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm("myForm");
var cmp = frm.getComponent("componentName");
application.output("Component type and name: " + cmp);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getFootergetComponents}{tr:id=name}{td}h6.getFootergetComponents{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFooterJSComponent]\[]{span}{span:style=font-weight: bold;}getFootergetComponents{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a array of all the JSComponents that a form has; they are of type JSField,JSLabel,JSButton,JSPortal,JSBean or JSTabPanel.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFooterJSComponent]\[] -- an Aarray of JSFooterall orthe nullJSComponents whenon notthe foundform.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var footer form = solutionModel.getForm("myForm");
var components = form.getFooter(.getComponents();
for (var i in components)
	application.output("Component type and name: " + components[i]);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getHeadergetField-String}{tr:id=name}{td}h6.getHeadergetField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSHeaderJSField]{span}{span:style=font-weight: bold;}getHeadergetField{span}{span}\(name){span}{td}{tr}{tr:id=retdes}{td}*Returns{div:class=sIndent}The field with the specified name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSHeaderString]} name -- A JSHeader or null when not found. the specified name of the field
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField] -- a JSField object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var headerform = solutionModel.getForm("myForm");
var field = form.getHeader(.getField("myField");
application.output(field.dataProviderID);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getInsetList-StringgetFields}{tr:id=name}{td}h6.getInsetListgetFields{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSField]\[JSInsetList]{span}{span:style=font-weight: bold;}getInsetListgetFields{span}{span}\(name){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the inset list's name.
Returns all JSField objects of this form, including the ones without a name.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSInsetListJSField]\[] -- theall existingJSField insetobjects list,of or null if it does not exist.this form{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var formfrm = solutionModel.getForm("myformmyForm");
var insetList = form.getInsetList('mylist1');
 fields = frm.getFields();
for (var f in fields)
{
	var fname = fields[f].name;
	if (fname != null)
		application.output(fname);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getInsetListsgetFooter}{tr:id=name}{td}h6.getInsetListsgetFooter{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSInsetListJSFooter]\[]{span}{span:style=font-weight: bold;}getInsetListsgetFooter{span}{span}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[JSInsetList]\[]Get the Footer part on the form if it exists.{div}{td}{tr}{tr:id=samret}{td}*SampleReturns*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.getForm('test');
var insetLists[JSFooter] -- A JSFooter or null when not found.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var footer = form.getInsetListsgetFooter();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLabel-StringgetHeader}{tr:id=name}{td}h6.getLabelgetHeader{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabelJSHeader]{span}{span:style=font-weight: bold;}getLabelgetHeader{span}{span}\(name){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the label
Get the Header part on the form if it exists.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabelJSHeader] -- aA JSLabelJSHeader object (or null if the label with the specified name does not exist)when not found.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frmheader = solutionModelform.getFormgetHeader("myForm");
var label = frm.getLabel("myLabel");
application.output(label.text);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLabelsgetInsetList-String}{tr:id=name}{td}h6.getLabelsgetInsetList{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSLabelJSInsetList]\[]{span}{span:style=font-weight: bold;}getLabelsgetInsetList{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns an existing inset list.{div}{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{div:class=sIndent}\{[JSLabel]\[String]} name -- the inset list's name.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSInsetList] -- all JSLabels on this formthe existing inset list, or null if it does not exist.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frmform = solutionModel.getForm("myFormmyform");
var labelsinsetList = frmform.getLabels();
for (var i in labels)
{
	var lname = labels[i].name;
	if (lname != null)
		application.output(lname);
}
getInsetList('mylist1');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMethod-StringgetInsetLists}{tr:id=name}{td}h6.getMethodgetInsetLists{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSMethodJSInsetList]\[]{span}{span:style=font-weight: bold;}getMethodgetInsetLists{span}{span}\(name){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the method
Gets all insets lists on the form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod] -- a JSMethod object (or null if the method with the specified name does not exist)JSInsetList]\[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frmform = solutionModel.getForm("myForm"'test');
var methodinsetLists = frmform.getMethodgetInsetLists("myMethod");
application.output(method.code);
{code{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMethodsgetLabel-String}{tr:id=name}{td}h6.getMethodsgetLabel{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSMethod]\[JSLabel]{span}{span:style=font-weight: bold;}getMethodsgetLabel{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns a JSLabel that has the given name.{div}{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{div:class=sIndent}\{[JSMethod]\[String]} name -- the specified name of the label
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel] -- all form methods for the form a JSLabel object (or null if the label with the specified name does not exist){div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm("myForm");
var methodslabel = frm.getMethodsgetLabel("myLabel");
for (var m in methods)
	application.output(methods[m].getName())label.text);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPart-NumbergetLabels}{tr:id=name}{td}h6.getPartgetLabels{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSPartJSLabel]\[]{span}{span:style=font-weight: bold;}getPartgetLabels{span}{span}\(type){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[Number]} type -- The type of the part to retrieve.
Returns all JSLabels of this form (not including its super form), including the ones without a name.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSPartJSLabel]\[] -- Aall JSPartJSLabels instance representing the retrievedon this form part.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
form.getPart(JSPart.HEADER).background = 'red';
form.getPart(JSPart.LEADING_SUBSUMMARY, 160).background = 'red';
{code}{div}{
var frm = solutionModel.getForm("myForm");
var labels = frm.getLabels();
for (var i in labels)
{
	var lname = labels[i].name;
	if (lname != null)
		application.output(lname);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getVariablegetMethod-String}{tr:id=name}{td}h6.getVariablegetMethod{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariableJSMethod]{span}{span:style=font-weight: bold;}getVariablegetMethod{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Gets an existing form method for the given name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the variablemethod
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariableJSMethod] -- a JSVariableJSMethod object (or null if the method with the specified name does not exist){div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm("myForm");
	var fvariablemethod = frm.getVariablegetMethod("myVarNamemyMethod");
	application.output(fvariable.name + " has the default value of " + fvariable.defaultValuemethod.code);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getVariablesgetMethods}{tr:id=name}{td}h6.getVariablesgetMethods{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariableJSMethod]\[]{span}{span:style=font-weight: bold;}getVariablesgetMethods{span}{span}\(){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[JSVariable]\[] -- an array of all variables on thisReturns all existing form methods for this form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod]\[] -- all form methods for the form{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var frm = solutionModel.getForm("myForm");
var variablesmethods = frm.getVariablesgetMethods();
for (var im in variablesmethods)
	application.output(variablesmethods[im].namegetName());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newBeangetPart-String_Number}{tr:id=name}{td}h6.newBeangetPart{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSBeanJSPart]{span}{span:style=font-weight: bold;}newBeangetPart{span}{span}\(name, ytype){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name Gets a part of the JSBeanform object
\{[Number]} y -- from the verticalgiven "y" position of the JSBean object, defines the order of elements on the form
type (see JSPart constants).{div}{td}{tr}{tr:id=retprs}{td}*ReturnsParameters*\\{div:class=sIndent}[JSBean\{[Number]} type -- The type of the part to retrieve.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSPart] -- a JSBean object A JSPart instance representing the retrieved form part.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', 'db:/server1/table1');
var bean = form.newBean('bean', 1);
forms['newForm1'].controller.show()form.getPart(JSPart.HEADER).background = 'red';
form.getPart(JSPart.LEADING_SUBSUMMARY, 160).background = 'red';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newButtongetVariable-String_Number_JSMethod}{tr:id=name}{td}h6.newButtongetVariable{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSButtonJSVariable]{span}{span:style=font-weight: bold;}newButtongetVariable{span}{span}\(txt, y, jsmethodname){span}{td}{tr}{tr:id=prsdes}{td}*Parameters*\\{div:class=sIndent}\{[String]} txt -- the text onGets an existing form variable for the button
\{[Number]} y -- the y coordinate of the button location on the form, defines the order of elements on the form
\{[JSMethod]} jsmethodgiven name.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the methodspecified assignedname toof handlethe anvariable
onAction event
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSButtonJSVariable] -- a new JSButtonJSVariable object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var formfrm = solutionModel.newForm('newForm1', myDatasourcegetForm("myForm");
	var methodfvariable = formfrm.newMethod('function onAction(event) { getVariable("myVarName");
	application.output("onAction intercepted onfvariable.name + " has the default value of " + eventfvariable.getFormName()defaultValue);
}');
var button = form.newButton('myButton', 1, method);
application.output("The new button: " + button.name + " has the following onAction event handling method assigned " + button.onAction.getName());
{code}{div}{{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newCalendar-JSVariable_NumbergetVariables}{tr:id=name}{td}h6.newCalendargetVariables{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSCalendarJSVariable]\[]{span}{span:style=font-weight: bold;}newCalendargetVariables{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}An array consisting of all form variables for this form.{div}{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\{div:class=sIndent}[JSVariable]\{[JSVariable]} dataprovider -- thean specifiedarray dataproviderof name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elementsall variables on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSCalendar] -- a new JSCalendar fieldthis form{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var formfrm = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the fieldgetForm("myForm");
var xvariables = nullfrm.getVariables();
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal', JSVariable.DATETIME);
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar', JSVariable.DATETIME);
var field = form.newCalendar(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show(for (var i in variables)
	application.output(variables[i].name);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newCalendarnewBean-String_Number}{tr:id=name}{td}h6.newCalendarnewBean{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSCalendarJSBean]{span}{span:style=font-weight: bold;}newCalendarnewBean{span}{span}\(dataprovidername, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSBean object on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovidername -- the specified dataprovider name/JSVariable of the JSFieldJSBean object
\{[Number]} y -- the vertical "y" position of the JSFieldJSBean object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSCalendarJSBean] -- a newJSBean JSCalendar fieldobject{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal', JSVariable.DATETIME);
//or a form JSVariable as the dataprovider 
//x 'db:/server1/table1');
var bean = form.newVariablenewBean('myFormVarbean', JSVariable.DATETIME);
var field = form.newCalendar(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newChecknewButton-JSVariableString_Number_JSMethod}{tr:id=name}{td}h6.newChecknewButton{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSChecksJSButton]{span}{span:style=font-weight: bold;}newChecknewButton{span}{span}\(dataprovidertxt, y, jsmethod){span}{td}{tr}{tr:id=prsdes}{td}*{div:class=sIndent}Creates a new button on the form with the given text.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariableString]} dataprovidertxt -- the specified dataprovider name/JSVariable of text on the JSFieldbutton
object
\{[Number]} y -- the vertical "y" positioncoordinate of the JSField objectbutton location on the form, defines the order of elements on the form
\{[JSMethod]} jsmethod -- the method assigned to handle an onAction event
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSChecksJSButton] -- a new JSChecksJSButton fieldobject{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource);

//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.INTEGER);
//x.defaultValue = "'1'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.INTEGER);
//x.defaultValue = "'1'";
var field = form.newCheck(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show()var method = form.newMethod('function onAction(event) { application.output("onAction intercepted on " + event.getFormName()); }');
var button = form.newButton('myButton', 1, method);
application.output("The new button: " + button.name + " has the following onAction event handling method assigned " + button.onAction.getName());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newChecknewCalendar-StringJSVariable_Number}{tr:id=name}{td}h6.newChecknewCalendar{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSChecksJSCalendar]{span}{span:style=font-weight: bold;}newChecknewCalendar{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=prsdes}{td}*{div:class=sIndent}Creates a new JSCalendar field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[StringJSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSChecksJSCalendar] -- a new JSChecksJSCalendar field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal', JSVariable.INTEGERDATETIME);
//x.defaultValue = "'1'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar', JSVariable.INTEGERDATETIME);
//x.defaultValue = "'1'";
var field = form.newChecknewCalendar(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newComboboxnewCalendar-JSVariableString_Number}{tr:id=name}{td}h6.newComboboxnewCalendar{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSComboboxJSCalendar]{span}{span:style=font-weight: bold;}newComboboxnewCalendar{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSCalendar field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariableString]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSComboboxJSCalendar] -- a new JSComboboxJSCalendar field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal', JSVariable.TEXTDATETIME);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar', JSVariable.TEXTDATETIME);
//x.defaultValue = "'Text from
a form variable'";
var field = form.newComboboxnewCalendar(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newComboboxnewCheck-StringJSVariable_Number}{tr:id=name}{td}h6.newComboboxnewCheck{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSComboboxJSChecks]{span}{span:style=font-weight: bold;}newComboboxnewCheck{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSChecks field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[StringJSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSComboboxJSChecks] -- a new JSComboboxJSChecks field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXTINTEGER);
//x.defaultValue = "'Text from a global variable1'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXTINTEGER);
//x.defaultValue = "'Text from a form variable1'";
var field = form.newComboboxnewCheck(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newFieldnewCheck-JSVariableString_Number_Number}{tr:id=name}{td}h6.newFieldnewCheck{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFieldJSChecks]{span}{span:style=font-weight: bold;}newFieldnewCheck{span}{span}\(dataprovider, type, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSChecks field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariableString]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} typey -- the display type of the JSField object (see the Solution Model \-> JSField node for display types)
\{[Number]} y -- the vertical vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField]JSChecks] -- a new JSChecks field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT);
variablemyDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.INTEGER);
//x.defaultValue = "'This is1'";
//or a defaultform valueJSVariable (withas triple quotes)!'";
var fieldthe dataprovider 
//x = form.newFieldnewVariable(variable, JSField.TEXT_FIELD, 1)'myFormVar',JSVariable.INTEGER);
//x.defaultValue = "'1'";
var field = form.newCheck(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newFieldnewCombobox-String_NumberJSVariable_Number}{tr:id=name}{td}h6.newFieldnewCombobox{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFieldJSCombobox]{span}{span:style=font-weight: bold;}newFieldnewCombobox{span}{span}\(dataprovider, type, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSCombobox field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[StringJSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} typey -- the display typevertical "y" position of the JSField object, (seedefines the Solutionorder Modelof \->elements JSFieldon nodethe for display types)
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField]JSCombobox] -- a new JSCombobox field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
variable//x.defaultValue = "'This is'Text from a global variable'";
//or a defaultform valueJSVariable (withas triple quotes)!'";
var fieldthe dataprovider 
//x = form.newFieldnewVariable(variable, JSField.TEXT_FIELD, 1);
'myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newCombobox(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newFooternewCombobox-String_Number}{tr:id=name}{td}h6.newFooternewCombobox{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFooterJSCombobox]{span}{span:style=font-weight: bold;}newFooternewCombobox{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{div:class=sIndent}[JSFooter] -- A JSFooter instance corresponding to the newly created Footer form partCreates a new JSCombobox field on the form.{div}{td}{tr}{tr:id=samprs}{td}*SampleParameters*\\{div:class=sIndent}{code:language=javascript}
var footer = form.newFooter();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newHeader}{tr:id=name}{td}h6.newHeader{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSHeader]{span}{span:style=font-weight: bold;}newHeader{span}{span}\(){span}{\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSHeaderJSCombobox] -- Aa JSHeadernew instance corresponding to the newly created Header form part.JSCombobox field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var headerform = formsolutionModel.newHeader();newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newCombobox(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newField-JSVariable_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, type, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSField object on the form .{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} type -- the display type of the JSField object (see the Solution Model \-> JSField node for display types)
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT);
variable.defaultValue = "'This is a default value (with triple quotes)!'";
var field = form.newField(variable, JSField.TEXT_FIELD, 1);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newField-String_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, type, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSField object on the form .{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} type -- the display type of the JSField object (see the Solution Model \-> JSField node for display types)
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSField]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT);
variable.defaultValue = "'This is a default value (with triple quotes)!'";
var field = form.newField(variable, JSField.TEXT_FIELD, 1);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newFooter}{tr:id=name}{td}h6.newFooter{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSFooter]{span}{span:style=font-weight: bold;}newFooter{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new Footer part on the form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSFooter] -- A JSFooter instance corresponding to the newly created Footer form part.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var footer = form.newFooter();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newHeader}{tr:id=name}{td}h6.newHeader{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSHeader]{span}{span:style=font-weight: bold;}newHeader{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new Header part on the form.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSHeader] -- A JSHeader instance corresponding to the newly created Header form part.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var header = form.newHeader();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newInsetList-Number_String_String_String}{tr:id=name}{td}h6.newInsetList{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSInsetList]{span}{span:style=font-weight: bold;}newInsetList{span}{span}\(yLocation, relationName, headerText, textDataProviderID){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new inset list mobile component in the given form. The inset list will be populated based on the given datasource and relation.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Number]} yLocation -- the vertical location of the inset list in the form's components list.
\{[String]} relationName -- the relation used to show data, just like it would happen in a related tab\-panel.
\{[String]} headerText -- can be null; it's a convenience argument for setting the title (header text) for the inset list.
\{[String]} textDataProviderID -- can be null; it's a convenience argument for setting the dataprovider that will be used to populate the main text area of the list's items.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSInsetList] -- the newly created inset list.{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var f = solutionModel.newForm("created_by_sm_1","db:/udm/contacts");
// create an inset list
var insetList = f.newInsetList(8,"accountmanager_to_companies","Companies","company_name");
insetList.subtextDataProviderID = "company_description";
insetList.onAction = f.newMethod("function buttonPressed() { plugins.dialogs.showWarningDialog('Title', 'inset list clicked','OK'); }");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newLabel-String_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, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSLabel object on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} txt -- the specified text of the label object
\{[Number]} y -- the vertical "y" position of the label, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSLabel] -- a JSLabel object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource);
var label = form.newLabel('The text on the label', 1);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newMethod-String}{tr:id=name}{td}h6.newMethod{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSMethod]{span}{span:style=font-weight: bold;}newMethod{span}{span}\(code){spancode){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new form JSMethod \- based on the specified code.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} code -- the specified code for the new method
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSMethod] -- a new JSMethod object for this form{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var method = form.newMethod('function aMethod(event){application.output("Hello world!");}');
var button = myListViewForm.newButton('Show message!',50,50,100,30,method);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newPassword-JSVariable_Number}{tr:id=name}{td}h6.newPassword{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSPassword]{span}{span:style=font-weight: bold;}newPassword{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSPassword field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSPassword] -- a new JSPassword field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
var field = form.newPassword(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newPassword-String_Number}{tr:id=name}{td}h6.newPassword{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSPassword]{span}{span:style=font-weight: bold;}newPassword{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSPassword field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSPassword] -- a new JSPassword field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
var field = form.newPassword(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRadios-JSVariable_Number}{tr:id=name}{td}h6.newRadios{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSRadios]{span}{span:style=font-weight: bold;}newRadios{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSRadios field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSRadios] -- a new JSRadios field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newRadios(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRadios-String_Number}{tr:id=name}{td}h6.newRadios{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSRadios]{span}{span:style=font-weight: bold;}newRadios{span}{span}\(dataprovider, y){span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSRadios field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSRadios] -- a new JSRadios field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newRadios(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextArea-JSVariable_Number}{tr:id=name}{td}h6.newTextArea{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSTextArea]{span}{span:style=font-weight: bold;}newTextArea{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSTextArea field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSTextArea] -- a new JSTextArea field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newTextArea(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextArea-String_Number}{tr:id=name}{td}h6.newTextArea{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSTextArea]{span}{span:style=font-weight: bold;}newTextArea{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSTextArea field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSTextArea] -- a new JSTextArea field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var field = form.newTextArea(x,1);
//or a column data provider as the dataprovider
//field.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextField-JSVariable_Number}{tr:id=name}{td}h6.newTextField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSText]{span}{span:style=font-weight: bold;}newTextField{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSText field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSVariable]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSText] -- a new JSText field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the Text Field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var textField = form.newTextField(x,1);
//or a column data provider as the dataprovider
//textField.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newTextField-String_Number}{tr:id=name}{td}h6.newTextField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSText]{span}{span:style=font-weight: bold;}newTextField{span}{span}\(dataprovider, y){span-weight: bold;}newTextField{span}{span}\(dataprovider, y){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new JSText field on the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} dataprovider -- the specified dataprovider name/JSVariable of the JSField object
\{[Number]} y -- the vertical "y" position of the JSField object, defines the order of elements on the form
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSText] -- a new JSText field{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1',myDatasource); 
//choose the dataprovider or JSVariable you want for the Text Field
var x = null;
//global JSVariable as the dataprovider 
//x = solutionModel.newGlobalVariable('globals', 'myGlobal',JSVariable.TEXT);
//x.defaultValue = "'Text from a global variable'";
//or a form JSVariable as the dataprovider 
//x = form.newVariable('myFormVar',JSVariable.TEXT);
//x.defaultValue = "'Text from a form variable'";
var textField = form.newTextField(x,1);
//or a column data provider as the dataprovider
//textField.dataProviderID = columnTextDataProvider;
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newVariable-String_Number}{tr:id=name}{td}h6.newVariable{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariable]{span}{span:style=font-weight: bold;}newVariable{span}{span}\(name, type){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Creates a new form JSVariable \- based on the name of the variable object and the number type, uses the SolutionModel JSVariable constants.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the variable
\{[Number]} type -- the specified type of the variable (see Solution Model \-> JSVariable node constants)
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable] -- a JSVariable object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT , "'This is a default value (with triple quotes)!'");
//or variable = form.newVariable('myVar', JSVariable.TEXT)
//variable.defaultValue = "'This is a default value (with triple quotes)!'" // setting the default value after the variable is created requires form recreation
//variable.defaultValue = "{a:'First letter',b:'Second letter'}"   
var field = form.newField(variable, JSField.TEXT_FIELD, 100, 100, 200, 200);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newVariable-String_Number_String}{tr:id=name}{td}{td}{tr}{tbody}{tbody:id=newVariable-String_Number_String}{tr:id=name}{td}h6.newVariableh6.newVariable{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[JSVariable]{span}{span:style=font-weight: bold;}newVariable{span}{span}\(name, type, defaultValue){span}{td}{tr}{tr:id=sigdes}{td}{spandiv:style=margin-right: 5px;}[JSVariable]{span}{span:style=font-weight: bold;}newVariable{span}{span}\(name, type, defaultValue){spanclass=sIndent}Creates a new form JSVariable \- based on the name of the variable object , the  type  and it's default value , uses the SolutionModel JSVariable constants.

This method does not require the form to be destroyed and recreated. Use this method if you want to change the form's model without destroying the runtime form</b>{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the variable
\{[Number]} type -- the specified type of the variable (see Solution Model \-> JSVariable node constants)
\{[String]} defaultValue -- the default value as a javascript expression string
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[JSVariable] -- a JSVariable object{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', myDatasource, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT , "'This is a default value (with triple quotes)!'");
//or variable = form.newVariable('myVar', JSVariable.TEXT)
//variable.defaultValue = "'This is a default value (with triple quotes)!'" // setting the default value after the variable is created requires form recreation
//variable.defaultValue = "{a:'First letter',b:'Second letter'}"   
var field = form.newField(variable, JSField.TEXT_FIELD, 100, 100, 200, 200);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeBean-String}{tr:id=name}{td}h6.removeBean{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeBean{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSBean that has the specified name. Returns true if removal was successful, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the JSBean to be removed
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the JSBean has been removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.getForm('myform');
form.removeBean('mybean')
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeButton-String}{tr:id=name}{td}h6.removeButton{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeButton{span}{span}\(name){span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSButton that has the specified name. Returns true if removal was successful, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the JSButton to be removed
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the JSButton has been removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newFormX',myDatasource,null,true,800,600);
var b1 = form.newButton('This is button1',100,100,200,50,null);
b1.name = 'b1';
var jsmethod = form.newMethod("function removeMe(event) { var form = solutionModel.getForm('newFormX'); if (form.removeButton('b1') == true) application.output('Button has been removed ok'); else application.output('Button could not be deleted'); forms['newFormX'].controller.recreateUI();}");
var b2 = form.newButton('Click here to remove button1',100,230,200,50,jsmethod);
b2.name = 'b2';
forms['newFormX'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeComponent-String}{tr:id=name}{td}h6.removeComponent{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeComponent{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a component (JSLabel, JSButton, JSField, JSPortal, JSBean, JSTabpanel) that has the given name. It is the same as calling "if(!removeLabel(name) &amp;&amp; !removeButton(name) ....)".
Returns true if removal was successful, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the component to be deleted
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if component has been successfully deleted; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newFormX','db:/server1/parent_table',null,true,1000,750);
var jsbutton = form.newButton('JSButton to delete',100,100,200,50,null);
jsbutton.name = 'jsb';
var jslabel = form.newLabel('JSLabel to delete',100,200,200,50,null);
jslabel.name = 'jsl';
jslabel.transparent = false;
jslabel.background = 'green';
var jsfield = form.newField('scopes.globals.myGlobalVariable',JSField.TEXT_FIELD,100,300,200,50);
jsfield.name = 'jsf';
var relation = solutionModel.newRelation('parentToChild','db:/server1/parent_table','db:/server1/child_table',JSRelation.INNER_JOIN);
relation.newRelationItem('parent_table_id', '=', 'child_table_id');
var jsportal = form.newPortal('jsp',relation,100,400,300,300);
jsportal.newField('child_table_id',JSField.TEXT_FIELD,200,200,120);
var childOne = solutionModel.newForm('childOne','db:/server1/child_table',null,false,400,300);
childOne.newField('child_table_id', JSField.TEXT_FIELD,10,10,100,20);
var childTwo = solutionModel.newForm('childTwo','server1','other_table',null,false,400,300);
childTwo.newField('some_table_id', JSField.TEXT_FIELD,10,10,100,100); 
var jstabpanel = form.newTabPanel('jst',450,30,620,460);
jstabpanel.newTab('tab1','Child One',childOne,relation);
jstabpanel.newTab('tab2','Child Two',childTwo);
var jsmethod = form.newMethod("function removeMe(event) { var form = solutionModel.getForm('newFormX');\n if ((form.removeComponent('jsb') == true) && (form.removeComponent('jsl') == true) && (form.removeComponent('jsf') == true) && (form.removeComponent('jsp') == true) & (form.removeComponent('jst') == true)) application.output('Components removed ok'); else application.output('Some component(s) could not be deleted'); forms['newFormX'].controller.recreateUI();}");
var removerButton = form.newButton('Click here to remove form components',450,500,250,50,jsmethod);
removerButton.name = 'remover';
forms['newFormX'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeField-String}{tr:id=name}{td}h6.removeField{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeField{span}{span}\(name){spanspan:style=font-weight: bold;}removeField{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSField that has the given name. Returns true if removal was successful, false otherwise.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the JSField to remove
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true is the JSField has been successfully removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newFormX',myDatasource,null,true,800,600);
var jsfield = form.newField(scopes.globals.myGlobalVariable,JSField.TEXT_FIELD,100,300,200,50);
jsfield.name = 'jsf';
var jsmethod = form.newMethod("function removeMe(event) { var form = solutionModel.getForm('newFormX');\n if (form.removeComponent('jsf') == true) application.output('Field has been removed ok'); else application.output('Field could not be deleted'); forms['newFormX'].controller.recreateUI();}");
var removerButton = form.newButton('Click here to remove the field',450,500,250,50,jsmethod);
removerButton.name = 'remover';
forms['newFormX'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeFooter}{tr:id=name}{td}h6.removeFooter{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeFooter{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSFooter if it exists.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the JSFooter has successfully been removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.getForm('myform');
form.removeFooter()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeHeader}{tr:id=name}{td}h6.removeHeader{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeHeader{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSHeader if it exists.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the JSHeader has successfully been removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.getForm('myform');
form.removeHeader()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeInsetList-String}{tr:id=name}{td}h6.removeInsetList{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeInsetList{span}{span}\(name){span}{span}\(name){spantd}{tr}{tr:id=des}{td}{div:class=sIndent}Removes inset list from the form.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- Inset List name.
{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.getForm('test');
form.removeInsetList('myinsetlist');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeLabel-String}{tr:id=name}{td}h6.removeLabel{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeLabel{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a JSLabel that has the given name. Returns true if removal successful, false otherwise{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the JSLabel to be removed
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if the JSLabel with the given name has successfully been removed; false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newFormX',myDatasource,null,true,1000,750);
var jslabel = form.newLabel('JSLabel to delete',100,200,200,50,null);
jslabel.name = 'jsl';
jslabel.transparent = false;
jslabel.background = 'green';
var jsmethod = form.newMethod("function removeMe(event) { var form = solutionModel.getForm('newFormX'); if (form.removeComponent('jsl') == true) application.output('Label has been removed'); else application.output('Label could not be deleted'); forms['newFormX'].controller.recreateUI();}");
var removerButton = form.newButton('Click here to remove the green label',450,500,250,50,jsmethod);
removerButton.name = 'remover';
forms['newFormX'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeMethod-String}{tr:id=name}{td}h6.removeMethod{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeMethod{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a  form JSMethod \- based on the specified code.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the method
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if method was removed successfully , false otherwise{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', null, null, true, 800, 600);
var hello = form.newMethod('function aMethod(event){application.output("Hello world!");}');
var removeMethod = form.newMethod('function removeMethod(event){ \
									solutionModel.getForm(event.getFormName()).removeMethod("aMethod"); \
									forms[event.getFormName()].controller.recreateUI();\
									}');
var button1 = form.newButton('Call method!',50,50,120,30,hello);
var button2 = form.newButton('Remove Mehtod!',200,50,120,30,removeMethod);
forms['newForm1'].controller.show();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeVariable-String}{tr:id=name}{td}h6.removeVariable{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}removeVariable{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Removes a form JSVariable \- based on the name of the variable object.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the specified name of the variable
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean] -- true if removed, false otherwise (ex: no var with that name){div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var form = solutionModel.newForm('newForm1', null, null, true, 800, 600);
var variable = form.newVariable('myVar', JSVariable.TEXT);
variable.defaultValue = "'This is a default value (with triple quotes)!'";
//variable.defaultValue = "{a:'First letter',b:'Second letter'}"
var field = form.newField(variable, JSField.TEXT_FIELD, 100, 100, 200, 200);
forms['newForm1'].controller.show();

variable = form.removeVariable('myVar');
application.sleep(4000);
forms['newForm1'].controller.recreateUI();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}