Child pages
  • controller

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hiddendiv: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 EXTRACTAUTO CHANGES FROMUPDATE THE PAGECONTENT ANDTHROUGH MERGETHE THEM BACK INTO SERVOY SOURCE{hiddenDOC GENERATOR{div}
{sub-sectiondiv:id=description|text=}{sub-sectiondiv}\\ 

{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}[Boolean]{td}{td}[#enabled]
Gets or sets the enabled state of a form; also known as "grayed\-out".{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}[String]{td}{td}[#getDataSource]\()
Get the used datasource.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getName]\()
Get the name of this form.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getSelectedIndex]\()
Gets the current record index of the current foundset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setSelectedIndex]\(index)
Sets the current record index of the current foundset.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#show]\()
Shows the form (makes the form visible)
This function does not affect the form foundset in any way.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#showRecords]\(foundset)
Load data into the form and shows the form, is a shortcut for the functions 'loadRecords' and 'show'.{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=enabled|class=node}{tr:id=name}{td}h6.enabled{td}{tr}{builder-show:permission=edit}{tr:id=desret}{td}{sub-section:enabled_des|trigger=button|text=}{sub-section}{sub-section:enabled_des|trigger=none|*Returns*\\{div:class=sIndent}Replace with description{sub-section[Boolean]{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{tr:id=sam}{td}*SinceSample*\\{sub-section:enabled_snc|trigger=button|text=}{sub-section}{sub-section:enabled_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}{code:language=javascript}
//gets the enabled state of the form
var state = forms.customer.controller.enabled;
//enables the form for input
forms.customer.controller.enabled = true;
{code}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prstr:class=lastDetailRow}{td}{td}*Parameters*{tr}{tbody}{table}\\{sub-section:enabled_prs|trigger=button|text=}{sub-section}{sub-section:enabled_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show 

{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=getDataSource}{tr:id=ret}name}{td}h6.getDataSource{td}*Returns*\\{sub-section:enabled_ret|trigger=button|text=}{sub-section}{sub-section:enabled_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getDataSource{span}{span}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:enabled_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_see|trigger=none}{sub-section}[String] -- the datasource{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:enabled_link|trigger=button|text=}{sub-section}{divdiv:class=sIndent}{sub-section:enabled_link|trigger=none}{sub-sectioncode:language=javascript}
var dataSource = forms.customer.controller.getDataSource();
{code}{div}{td}{tr}{builder-show}{tr:idclass=samlastDetailRow}{td}*Sample*\\{sub-section:enabled_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:enabled_sam|trigger=none}{code:language=javascript}
//gets the enabled state of the form
var state = forms.customer.controller.enabled;
//enables the form for input
forms.customer.controller.enabled = true;
{code}{sub-section}{div{td}{tr}{tbody}{tbody:id=getName}{tr:id=name}{td}h6.getName{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}getName{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=lastDetailRow}{tdsIndent}[String] -- the name{div}{td}{tr}{tbodytr:id=sam}{tabletd}*Sample*\\ 

{tablediv:id=function|class=servoy sDetailsIndent}{colgroup}{column:width=100%|padding=0px}{column}{colgroupcode:language=javascript}
var formName = forms.customer.controller.getName();
{code}{div}{td}{tr}{tr:style=height: 30px;}{th:colspan=1}Method Details{thclass=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataSource|class=nodegetSelectedIndex}{tr:id=name}{td}h6.getDataSourcegetSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[StringNumber]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataSourcegetSelectedIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=desret}{td}{sub-section:getDataSource_des|trigger=button|text=}{sub-section}{sub-section:getDataSource_des|trigger=none|class=sIndent}Replace with description{sub-section*Returns*\\{div:class=sIndent}[Number] -- the index{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:getDataSource_snc|trigger=button|text=}{sub-section}{sub-section:getDataSource_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:getDataSource_prs|trigger=button|text=}{sub-section}{sub-section:getDataSource_prs|trigger=none|class=sIndent}{sub-sectiondiv:class=sIndent}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{tbody:id=setSelectedIndex-Number}{tr:id=retname}{td}*Returns*\\{sub-section:getDataSource_ret|trigger=button|text=}{sub-section}{sub-section:getDataSource_ret|trigger=none|class=sIndent}[String] -- the datasource{sub-section}{td}{tr}{builder-show:permission=edith6.setSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}setSelectedIndex{span}{span}\(index){span}{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:getDataSource_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_see|trigger=none}{sub-section}\{[Number]} index -- the index to select
{div}{td}{tr}{tr:id=ret}{builder-show}{builder-show:permission=edittd}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=linksam}{td}*External linksSample*\\{sub-section:getDataSource_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataSource_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataSource_sam|trigger=none}{code:language=javascript}
var dataSource = forms.customer.controller.getDataSource();
{code}{sub-section}{div}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show}{tr:id=name}{td}h6.show{td}{tr}{tr:classid=lastDetailRowsig}{td}{td}{tr}{tbody}{tbody:id=getName|class=node}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}show{span}{span}\(){span}{td}{tr}{tr:id=nameret}{td}h6.getName*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getName_des|trigger=button|text=}{sub-section}{sub-section:getName_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:getName_snc|trigger=button|text=}{sub-section}{sub-section:getName_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:getName_prs|trigger=button|text=}{sub-section}{sub-section:getName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getName_ret|trigger=button|text=}{sub-section}{sub-section:getName_ret|trigger=none|class=sIndent}[String] -- the name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getName_sam|trigger=none}{code:language=javascript}
var formName = forms.customer.controller.getName();
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSelectedIndex|class=node}{tr:id=name}{td}h6.getSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getSelectedIndex{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getSelectedIndex_des|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_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:getSelectedIndex_snc|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_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:getSelectedIndex_prs|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSelectedIndex_ret|trigger=button|text=}{sub-section}{sub-section:getSelectedIndex_ret|trigger=none|class=sIndent}[Number] -- the index{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSelectedIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSelectedIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSelectedIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSelectedIndex_sam|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setSelectedIndex-Number|class=node}{tr:id=name}{td}h6.setSelectedIndex{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setSelectedIndex{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setSelectedIndex-Number_des|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex-Number_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:setSelectedIndex-Number_snc|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex-Number_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setSelectedIndex-Number_prs|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex-Number_prs|trigger=none|class=sIndent}\{[Number]} index -- the index to select
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setSelectedIndex-Number_ret|trigger=button|text=}{sub-section}{sub-section:setSelectedIndex-Number_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setSelectedIndex-Number_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex-Number_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setSelectedIndex-Number_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex-Number_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setSelectedIndex-Number_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setSelectedIndex-Number_sam|trigger=none}{code:language=javascript}
//gets the current record index in the current foundset
var current = forms.customer.controller.getSelectedIndex();
//sets the next record in the foundset, will be reflected in UI
forms.customer.controller.setSelectedIndex(current+1);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=show|class=node}{tr:id=name}{td}h6.show{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}show{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:show_des|trigger=button|text=}{sub-section}{sub-section:show_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:show_snc|trigger=button|text=}{sub-section}{sub-section:show_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:show_prs|trigger=button|text=}{sub-section}{sub-section:show_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:show_ret|trigger=button|text=}{sub-section}{sub-section:show_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:show_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:show_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:show_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:show_sam|trigger=none}{code:language=javascript}
// show the form in the current window/dialog
forms.customer.controller.show();
// show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.show(w);
// show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.show(w);
// or forms.customer.controller.show("mydialog");
//show the form in the main window
//forms.customer.controller.show(null);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showRecords-JSFoundSet|class=node}{tr:id=name}{td}h6.showRecords{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}showRecords{span}{span:id=iets|style=float: left;}\(foundset){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:showRecords-JSFoundSet_des|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_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:showRecords-JSFoundSet_snc|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showRecords-JSFoundSet_prs|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_prs|trigger=none|class=sIndent}\{[JSFoundSet]} foundset -- the foundset to load before showing the form.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showRecords-JSFoundSet_ret|trigger=button|text=}{sub-section}{sub-section:showRecords-JSFoundSet_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showRecords-JSFoundSet_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showRecords-JSFoundSet_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_link|trigger=none}{sub-section}class=sIndent}{code:language=javascript}
// show the form in the current window/dialog
forms.customer.controller.show();
// show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.show(w);
// show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.show(w);
// or forms.customer.controller.show("mydialog");
//show the form in the main window
//forms.customer.controller.show(null);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showRecords-JSFoundSet}{tr:id=name}{td}h6.showRecords{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}showRecords{span}{span}\(foundset){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[JSFoundSet]} foundset -- the foundset to load before showing the form.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showRecords-JSFoundSet_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:showRecords-JSFoundSet_sam|trigger=none}{code:language=javascript}
forms.customer.controller.showRecords(foundset);
// load foundset & show the form in newly created named modal dialog
var w = application.createWindow("mydialog", JSWindow.MODAL_DIALOG);
forms.customer.controller.showRecords(foundset, w);
// load foundset & show the form in an existing window/dialog
var w = application.getWindow("mydialog"); // use null name for main app. window
forms.customer.controller.showRecords(foundset, w);
//forms.customer.controller.showRecords(foundset, "mydialog");
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}