Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
id | cloneComponent |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
cloneComponent |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| cloneComponent |
Span |
---|
| (newName, component, [newParentForm]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Makes an exact copy of the given component (JSComponent/JSField/JSLabel), |
|
| {td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} newName -- the new name of the cloned component
\{[JSComponent]} component -- the component to clone
\{[JSForm]} \[newParentForm\] -- the new parent form
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSComponent] -- the exact copy of the given component{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} newName – the new name of the cloned component {JSComponent} component – the component to clone {JSForm} [newParentForm] – the new parent form |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSComponent – the exact copy of the given component |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// get an existing field to clone.
var field = solutionModel.getForm("formWithField").getField("fieldName");
// get the target form for the copied/cloned field
var form = solutionModel.getForm("targetForm");
// make a clone/copy of the field and re parent it to the target form.
var clone = solutionModel.cloneComponent("clonedField",field,form);
// show it
forms["targetForm"].controller.show();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=cloneForm|class=node}{tr:id=name}{td}h6.cloneForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}cloneForm{span}{span:id=iets|style=float: left;}\(newName, jsForm){span}{td}{tr}{tr:id=des}{td}Makes an exact copy of the given form and gives it the new name.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} newName -- the new name for the form clone
\{[JSForm]} jsForm -- the form to be cloned
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm] -- a JSForm{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSForm |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| cloneForm |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Makes an exact copy of the given form and gives it the new name. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} newName – the new name for the form clone {JSForm} jsForm – the form to be cloned |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSForm – a JSForm |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// get an existing form
var form = solutionModel.getForm("existingForm")
// make a clone/copy from it
var clone = solutionModel.cloneForm("clonedForm", form)
// add a new label to the clone
clone.newLabel("added label",50,50,80,20);
// show it
forms["clonedForm"].controller.show();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getForm|class=node}{tr:id=name}{td}h6.getForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}getForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets the specified form object and returns information about the form (see JSForm node).{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the form
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm] -- a JSForm{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSForm |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getForm |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets the specified form object and returns information about the form (see JSForm node). |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the form |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSForm – a JSForm |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myForm = solutionModel.getForm('existingFormName');
//get the style of the form (for all other properties see JSForm node)
var styleName = myForm.styleName;
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getForms|class=node}{tr:id=name}{td}h6.getForms{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getForms{span}{span:id=iets|style=float: left;}\(\[server\], \[tablename\]){span}{td}{tr}{tr:id=des}{td}Get an array of forms, that are all based on datasource/servername or tablename.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} \[server\] -- the datasource or servername
\{[String]} \[tablename\] -- the tablename
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm]\[] -- an array of JSForm type elements{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSForm[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getForms |
Span |
---|
| ([server], [tablename]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get an array of forms, that are all based on datasource/servername or tablename. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} [server] – the datasource or servername {String} [tablename] – the tablename |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSForm[] – an array of JSForm type elements |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var forms = solutionModel.getForms(datasource)
for (var i in forms)
application.output(forms[i].name)
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalMethod|class=node}{tr:id=name}{td}h6.getGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalMethod{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets an existing global method by the specified name.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the name of the specified global method
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMethod] -- a JSMethod{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | getGlobalMethod |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getGlobalMethod |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMethod |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getGlobalMethod |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an existing global method by the specified name. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the name of the specified global method |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMethod – a JSMethod |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var method = solutionModel.getGlobalMethod("nameOfGlobalMethod");
if (method != null) application.output(method.code);
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalMethods|class=node}{tr:id=name}{td}h6.getGlobalMethods{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalMethods{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}The list of all global methods.{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMethod]\[] -- an array of JSMethod type elements{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | getGlobalMethods |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getGlobalMethods |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMethod[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getGlobalMethods |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
The list of all global methods. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMethod[] – an array of JSMethod type elements |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var methods = solutionModel.getGlobalMethods();
if (methods != null)
for (var x in methods)
application.output(methods[x].getName());
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalVariable|class=node}{tr:id=name}{td}h6.getGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalVariable{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets an existing global variable by the specified name.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the global variable
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSVariable] -- a JSVariable{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | getGlobalVariable |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getGlobalVariable |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSVariable |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getGlobalVariable |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an existing global variable by the specified name. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the global variable |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var globalVariable = solutionModel.getGlobalVariable('globalVariableName');
application.output(globalVariable.name + " has the default value of " + globalVariable.defaultValue);
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getGlobalVariables|class=node}{tr:id=name}{td}h6.getGlobalVariables{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getGlobalVariables{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Gets an array of all global variables.{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSVariable]\[] -- an array of JSVariable type elements{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | getGlobalVariables |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getGlobalVariables |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSVariable[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getGlobalVariables |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an array of all global variables. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSVariable[] – an array of JSVariable type elements |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var globalVariables = solutionModel.getGlobalVariables();
for (var i in globalVariables)
application.output(globalVariables[i].name + " has the default value of " + globalVariables[i].defaultValue);
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMedia|class=node}{tr:id=name}{td}h6.getMedia{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]{span}{span:id=iets|style=float: left; font-weight: bold;}getMedia{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets the specified media object; can be assigned to a button/label.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the media object
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMedia] -- a JSMedia element{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMedia |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getMedia |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets the specified media object; can be assigned to a button/label. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the media object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMedia – a JSMedia element |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myMedia = solutionModel.getMedia('button01.gif')
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMediaList|class=node}{tr:id=name}{td}h6.getMediaList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getMediaList{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Gets the list of all media objects.{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMedia]\[] -- a list with all the media objects.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMedia[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getMediaList |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets the list of all media objects. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMedia[] – a list with all the media objects. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var mediaList = solutionModel.getMediaList();
if (mediaList.length != 0 && mediaList != null) {
for (var x in mediaList) {
application.output(mediaList[x]);
}
|
|
|
|
| }
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRelation|class=node}{tr:id=name}{td}h6.getRelation{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelation{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets an existing relation by the specified name and returns a JSRelation Object.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the relation
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSRelation] -- a JSRelation{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getRelation |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSRelation |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getRelation |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an existing relation by the specified name and returns a JSRelation Object. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the relation |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var relation = solutionModel.getRelation('name');
application.output("The primary server name is " + relation.primaryServerName);
application.output("The primary table name is " + relation.primaryTableName);
application.output("The foreign table name is " + relation.foreignTableName);
application.output("The relation items are " + relation.getRelationItems());
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getRelations|class=node}{tr:id=name}{td}h6.getRelations{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRelations{span}{span:id=iets|style=float: left;}\(\ Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getRelations |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSRelation[] |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getRelations |
Span |
---|
| ([primary_server_name/primary_data_source |
|
|
| \ \\{span}{td}{tr}{tr:id=des}{td}Gets an array of all relations; or an array of all global relations if the specified table is NULL.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \[primary\_server\_name/primary\_data\_source\] -- the specified name of the server or datasource for the specified table
\[primary\_table\_name\] -- the specified name of the table
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSRelation]\[] -- an array of all relations (all elements in the array are of type JSRelation){td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an array of all relations; or an array of all global relations if the specified table is NULL. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters [primary_server_name/primary_data_source] – the specified name of the server or datasource for the specified table [primary_table_name] – the specified name of the table |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSRelation[] – an array of all relations (all elements in the array are of type JSRelation) |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var relations = solutionModel.getRelations('server_name','table_name');
if (relations.length != 0)
for (var i in relations)
application.output(relations[i].name);
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getStyle|class=node}{tr:id=name}{td}h6.getStyle{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSStyle]{span}{span:id=iets|style=float: left; font-weight: bold;}getStyle{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets the style specified by the given name.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the style
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSStyle] -- a JSStyle{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSStyle |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getStyle |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets the style specified by the given name. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the style |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSStyle – a JSStyle |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var style = solutionModel.getStyle('my_existing_style')
style.content = 'combobox { color: #0000ff;font: italic 10pt "Verdana";}'
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getValueList|class=node}{tr:id=name}{td}h6.getValueList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]{span}{span:id=iets|style=float: left; font-weight: bold;}getValueList{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the valuelist
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSValueList] -- a JSValueList object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getValueList |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getValueList |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an existing valuelist by the specified name and returns a JSValueList Object that can be assigned to a field. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the valuelist |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSValueList – a JSValueList object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myValueList = solutionModel.getValueList('myValueListHere')
//now set the valueList property of your field
//myField.valuelist = myValueList
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getValueLists|class=node}{tr:id=name}{td}h6.getValueLists{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getValueLists{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Gets an array of all valuelists for the currently active solution.{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSValueList]\[] -- an array of JSValueList objects{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getValueLists |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getValueLists |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Gets an array of all valuelists for the currently active solution. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSValueList[] – an array of JSValueList objects |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var valueLists = solutionModel.getValueLists();
if (valueLists != null && valueLists.length != 0)
for (var i in valueLists)
application.output(valueLists[i].name);
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newForm|class=node}{tr:id=name}{td}h6.newForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}newForm{span}{span:id=iets|style=float: left;}\(name, Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSForm |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newForm |
Span |
---|
| (name, server_name|data_source, |
|
|
| \\ {span}{td}{tr}{tr:id=des}{td}Creates a new JSForm Object.
NOTE: See the JSForm node for more information about form objects that can be added to the new form.{td}{tr}{tr:id=prs}{td}*Parameters*\\name -- the specified name of the form
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new JSForm Object. NOTE: See the JSForm node for more information about form objects that can be added to the new form. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters name – the specified name of the form server_name|data_source |
|
| --
\\\ --
style -- the specified style
style – the specified style show_in_menu |
|
| --
width -- the width of the form in pixels
height -- the height of the form in pixels
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm] -- a new JSForm object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} width – the width of the form in pixels height – the height of the form in pixels |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSForm – a new JSForm object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myForm = solutionModel.newForm('newForm', 'myServer', 'myTable', 'myStyleName', false, 800, 600)
//now you can add stuff to the form (under JSForm node)
//add a label
myForm.newLabel('Name', 20, 20, 120, 30)
//add a "normal" text entry field
myForm.newTextField('dataProviderNameHere', 140, 20, 140,20)
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newGlobalMethod|class=node}{tr:id=name}{td}h6.newGlobalMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMethod]{span}{span:id=iets|style=float: left; font-weight: bold;}newGlobalMethod{span}{span:id=iets|style=float: left;}\(code){span}{td}{tr}{tr:id=des}{td}Creates a new global method with the specified code.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} code -- the specified code for the global method
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMethod] -- a JSMethod object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | newGlobalMethod |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
newGlobalMethod |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMethod |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newGlobalMethod |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new global method with the specified code. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} code – the specified code for the global method |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMethod – a JSMethod object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var method = solutionModel.newGlobalMethod('function myglobalmethod(){currentcontroller.newRecord()}')
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newGlobalVariable|class=node}{tr:id=name}{td}h6.newGlobalVariable{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSVariable]{span}{span:id=iets|style=float: left; font-weight: bold;}newGlobalVariable{span}{span:id=iets|style=float: left;}\(name, type){span}{td}{tr}{tr:id=des}{td}Creates a new global variable with the specified name and number type.
NOTE: The global variable number type is based on the value assigned from the SolutionModel\-JSVariable node; for example: JSVariable.INTEGER.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name for the global variable
\{[Number]} type -- the specified number type for the global variable
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSVariable] -- a JSVariable object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
id | newGlobalVariable |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
newGlobalVariable |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSVariable |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newGlobalVariable |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new global variable with the specified name and number type. NOTE: The global variable number type is based on the value assigned from the SolutionModel-JSVariable node; for example: JSVariable.INTEGER. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name for the global variable {Number} type – the specified number type for the global variable |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSVariable – a JSVariable object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myGlobalVariable = solutionModel.newGlobalVariable('newGlobalVariable',JSVariable.INTEGER);
myGlobalVariable.defaultValue = 12;
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newMedia|class=node}{tr:id=name}{td}h6.newMedia{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSMedia]{span}{span:id=iets|style=float: left; font-weight: bold;}newMedia{span}{span:id=iets|style=float: left;}\(name, bytes){span}{td}{tr}{tr:id=des}{td}Creates a new media object that can be assigned to a label or a button.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- The name of the new media
\{byte[]} bytes -- The content
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSMedia] -- a JSMedia object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSMedia |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newMedia |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new media object that can be assigned to a label or a button. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – The name of the new media {byte[]} bytes – The content |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSMedia – a JSMedia object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var myMedia = solutionModel.newMedia('button01.gif',bytes)
//now set the imageMedia property of your label or button
//myButton.imageMedia = myMedia
// OR
//myLabel.imageMedia = myMedia
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newRelation|class=node}{tr:id=name}{td}h6.newRelation{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSRelation]{span}{span:id=iets|style=float: left; font-weight: bold;}newRelation{span}{span:id=iets|style=float: left;}\(name, Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
newRelation |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSRelation |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newRelation |
Span |
---|
| (name, primary_server_name|primary_data_source, |
|
|
| \\ foreign_server_name|foreign_data_source, |
|
|
| \\ {span}{td}{tr}{tr:id=des}{td}Creates a new JSRelation Object with a specified name; includes the primary datasource, optional table name, foreign datasource, optional foreign table name, and the type of join for the new relation.{td}{tr}{tr:id=prs}{td}*Parameters*\\name -- the specified name of the new relation
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new JSRelation Object with a specified name; includes the primary datasource, optional table name, foreign datasource, optional foreign table name, and the type of join for the new relation. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters name – the specified name of the new relation primary_server_name|primary_data_source |
|
| --
\\\\ --
foreign_server_name|foreign_data_source |
|
| --
\\\\ --
-- \ \\
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSRelation] -- a JSRelation object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSRelation – a JSRelation object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var rel = solutionModel.newRelation('myRelation','myPrimaryServerName','myPrimaryTableName','myForeignServerName','myForeignTableName',JSRelation.INNER_JOIN);
application.output(rel.getRelationItems()); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newStyle|class=node}{tr:id=name}{td}h6.newStyle{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSStyle]{span}{span:id=iets|style=float: left; font-weight: bold;}newStyle{span}{span:id=iets|style=float: left;}\(name, content){span}{td}{tr}{tr:id=des}{td}Creates a new style with the given css content string under the given name.
NOTE: Will throw an exception if a style with that name already exists.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the name of the new style
\{[String]} content -- the css content of the new style
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSStyle] -- a JSStyle object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSStyle |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newStyle |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new style with the given css content string under the given name. NOTE: Will throw an exception if a style with that name already exists. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the name of the new style {String} content – the css content of the new style |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSStyle – a JSStyle object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var form = solutionModel.newForm('myForm','myServer','myTable',null,true,1000,800);
if (form.transparent == false)
{
var style = solutionModel.newStyle('myStyle','form { background-color: yellow; }');
style.text = style.text + 'field { background-color: blue; }';
form.styleName = 'myStyle';
}
var field = form.newField('columnTextDataProvider',JSField.TEXT_FIELD,100,100,100,50);
forms['myForm'].controller.show();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=newValueList|class=node}{tr:id=name}{td}h6.newValueList{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSValueList]{span}{span:id=iets|style=float: left; font-weight: bold;}newValueList{span}{span:id=iets|style=float: left;}\(name, type){span}{td}{tr}{tr:id=des}{td}Creates a new valuelist with the specified name and number type.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name for the valuelist
\{[Number]} type -- the specified number type for the valuelist; may be JSValueList.CUSTOM\_VALUES, JSValueList.DATABASE\_VALUES, JSValueList.EMPTY\_VALUE\_ALWAYS, JSValueList.EMPTY\_VALUE\_NEVER
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSValueList] -- a JSValueList object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
newValueList |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| newValueList |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Creates a new valuelist with the specified name and number type. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name for the valuelist {Number} type – the specified number type for the valuelist; may be JSValueList.CUSTOM_VALUES, JSValueList.DATABASE_VALUES, JSValueList.EMPTY_VALUE_ALWAYS, JSValueList.EMPTY_VALUE_NEVER |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSValueList – a JSValueList object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var vl1 = solutionModel.newValueList("customText",JSValueList.CUSTOM_VALUES);
vl1.customValues = "customvalue1\ncustomvalue2";
var vl2 = solutionModel.newValueList("customid",JSValueList.CUSTOM_VALUES);
vl2.customValues = "customvalue1|1\ncustomvalue2|2";
var form = solutionModel.newForm("customValueListForm",controller.getDataSource(),null,true,300,300);
var combo1 = form.newComboBox("globals.text",10,10,120,20);
combo1.valuelist = vl1;
var combo2 = form.newComboBox("globals.id",10,60,120,20);
combo2.valuelist = vl2;
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeForm|class=node}{tr:id=name}{td}h6.removeForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Removes the specified form during the persistent connected client session.
NOTE: Make sure you call history.remove first in your Servoy method (script).{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the form to remove
{td}{tr}{tr:id=ret}{td}*Returns*\\ [Boolean] -- true is form has been removed, false if form could not be removed{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| removeForm |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Removes the specified form during the persistent connected client session. NOTE: Make sure you call history.remove first in your Servoy method (script). |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the form to remove |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Boolean – true is form has been removed, false if form could not be removed |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
//first remove it from the current history, to destroy any active form instance
var success = history.removeForm('myForm')
//removes the named form from this session, please make sure you called history.remove() first
if(success)
{
solutionModel.removeForm('myForm')
}
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=revertForm|class=node}{tr:id=name}{td}h6.revertForm{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSForm]{span}{span:id=iets|style=float: left; font-weight: bold;}revertForm{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form.
NOTE: Make sure you call history.remove first in your Servoy method (script) or call Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| JSForm |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| revertForm |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Reverts the specified form to the original (blueprint) version of the form; will result in an exception error if the form is not an original form. NOTE: Make sure you call history.remove first in your Servoy method (script) or call form.controller.recreateUI() |
|
| {td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[String]} name -- the specified name of the form to revert
{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm] -- a JSForm object{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} name – the specified name of the form to revert |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns JSForm – a JSForm object |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
// revert the form to the original solution form, removing any changes done to it through the solution model.
var revertedForm = solutionModel.revertForm('myForm')
// add a label on a random place.
revertedForm.newLabel("MyLabel",Math.random()*100,Math.random()*100,80,20);
// make sure that the ui is up to date.
forms.myForm.controller.recreateUI();
|
|
|
|
| {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |