Child pages
  • JSTab

Versions Compared

Key

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

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[JSForm]{td}{td}[#containsForm]
The name of the form displayed in the tab.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#foreground]
The foreground color of the tab.{td}{tr}{tbody}{tbody}{tr}{td}[JSMedia]{td}{td}[#imageMedia]
The name of the image Media file used.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#name]
The name of the tab.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#relationName]
The name of the relation that links the form which contains the tab 
with the form displayed in the tab.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#text]
The text on the tab.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#toolTipText]
The text displayed when hovering over the component with a mouse cursor.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#x]
The X coordinate of the tab.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#y]
The Y coordinate of the tab.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[UUID]{td}{td}[#getUUID]\()
Returns the UUID of this component.{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=containsForm|class=node}{tr:id=name}{td}h6.containsForm{td}{tr}{tr:id=des}{td}The name of the form displayed in the tab.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\ [JSForm]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var childForm = solutionModel.newForm('childForm', 'example_data', 'child_table', 'code:language=javascript}
var childForm = solutionModel.newForm('childForm', 'example_data', 'child_table', 'null', false, 400, 300);
var anotherChildForm = solutionModel.newForm('anotherChildForm', 'example_data', 'child_table', 'null', false, 400, 300);
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.containsForm = anotherChildForm;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=foreground|class=node}{tr:id=name}{td}h6.foreground{td}{tr}{tr:id=des}{td}The foreground color of the tab.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String[String]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}code:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.foreground = '#FF0000';
{code}{div}{td}{tr}{tr:idclass=linklastDetailRow}{td}*External links*\\{div:class=sIndent{td}{divtr}{tdtbody}{trtbody:id=imageMedia|class=node}{tr:id=sam}name}{td}h6.imageMedia{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.foreground = '#FF0000';
{code}{div}}{tr}{tr:id=des}{td}The name of the image Media file used.{td}{tr}{tr:classid=lastDetailRowret}{td}*Returns*\\ [JSMedia]{td}{tr}{tbody}{tbody:id=imageMedia|class=node}{tr:id=namesam}{td}h6.imageMedia{td}{tr}{tr:id=des}{td}The name of the image Media file used.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td*Sample*\\{div:class=sIndent}{code:language=javascript}
var bytes = plugins.file.readFile('d:/ball.jpg');
var ballImage = solutionModel.newMedia('ball.jpg', bytes);
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.imageMedia = ballImage;
{code}{div}{td}{tr}{tr:idclass=retlastDetailRow}{td}*Returns*\\[JSMedia]{td}{tr}{tbody}{trtbody:id=name|class=seenode}{td}*Also see*\\{div:class=sIndent}{div}tr:id=name}{td}h6.name{td}{tr}{tr:id=linkdes}{td}*External links*\\{div:class=sIndent}{div}The name of the tab.{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var bytesfirstTab = pluginstabs.file.readFilenewTab('d:/ball.jpg');
var ballImage = solutionModel.newMedia('ball.jpg', bytes);
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.imageMedia = ballImagefirstTab', 'Child Form', childForm, relation);
firstTab.name = 'firstTabRenamed';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=namerelationName|class=node}{tr:id=name}{td}h6.namerelationName{td}{tr}{tr:id=des}{td}The name of the tab.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info relation that links the form which contains the tab 
with the form displayed in the tab.{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\ [String]{td}{tr}{tr:id=retsam}{td}*ReturnsSample*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div{div:class=sIndent}{code:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm);
firstTab.relationName = 'parent_table_to_child_table';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{trtbody:id=text|class=linknode}{td}*External links*\\{div:class=sIndent}{div}tr:id=name}{td}h6.text{td}{tr}{tr:id=samdes}{td}*Sample*\\{The text on the tab.{td}{tr}{tr:id=ret}{td}*Returns*\\ [String]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.nametext = 'firstTabRenamedBetter Title';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=relationNametoolTipText|class=node}{tr:id=name}{td}h6.relationNametoolTipText{td}{tr}{tr:id=des}{td}The nametext ofdisplayed thewhen relationhovering that linksover the formcomponent whichwith containsa themouse tabcursor.

withNOTE:
theHTML formshould displayedbe inused the tab.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version infofor multi\-line tooltips; you can also use any
valid HTML tags to format tooltip text. For example: 
<html>This includes<b>bolded text</b> and 
<font color='blue'>BLUE</font> text as well.</html>{td}{tr}{tr:id=prsret}{td}*ParametersReturns*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[ [String]{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var firstTab = tabscode:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.relationNametoolTipText = 'parent_table_to_child_tableTooltip';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=textx|class=node}{tr:id=name}{td}h6.textx{td}{tr}{tr:id=des}{td}The X textcoordinate onof the tab.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{ This influences the order in which the tabs are displayed. 
The tabs are displayed in increasing order of the X coordinate. If two tabs have the 
same X coordinate, then they are displayed in increasing order of the Y coordinate.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div} [Number]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var// firstTabCreate =two tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.text = 'Better Title';
{then make the second one be displayed to the left of the first
// by setting their X coordinates in the needed order.
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.x = 10;
var secondTab = tabs.newTab('secondTab', 'Another Child Form', anotherChildForm);
secondTab.x = 0;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=toolTipTexty|class=node}{tr:id=name}{td}h6.toolTipTexty{td}{tr}{tr:id=des}{td}The textY displayedcoordinate whenof hoveringthe overtab. theTogether component with athe mouseX cursor.coordinate, this NOTE:influences HTMLthe shouldorder be
usedin for multi\-line tooltips; you can also use any
valid HTML tags to format tooltip text. For example: 
<html>This includes<b>bolded text</b> and 
<font color='blue'>BLUE</font> text as well.</html>{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.toolTipText = 'Tooltip';
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=x|class=node}{tr:id=name}{td}h6.x{td}{tr}{tr:id=des}{td}The X coordinate of the tab. This influences the order in which the tabs are displayed. 
The tabs are displayed in increasing order of the X coordinate. If two tabs have the 
same X coordinate, then they are displayed in increasing order of the Y coordinate.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Create two tabs, then make the second one be displayed to the left of the first
// by setting their X coordinates in the needed order.
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.x = 10;
var secondTab = tabs.newTab('secondTab', 'Another Child Form', anotherChildForm);
secondTab.x = 0;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=y|class=node}{tr:id=name}{td}h6.y{td}{tr}{tr:id=des}{td}The Y coordinate of the tab. Together with the X coordinate, this influences the order 
in which the tabs are displayed. The tabs are displayed in increasing order of the X coordinate,
and if two tabs have the same X coordinate, then they are displayed in increasing order 
of the Y coordinate.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}which the tabs are displayed. The tabs are displayed in increasing order of the X coordinate,
and if two tabs have the same X coordinate, then they are displayed in increasing order 
of the Y coordinate.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div} [Number]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Create two tabs, then make the second one be displayed to the left of the first
// by setting their X to the same value and Y coordinates in the needed order. 
var firstTab = tabs.newTab('firstTab', 'Child Form', childForm, relation);
firstTab.x = 0;
firstTab.y = 10;
var secondTab needed order. 
var firstTab = tabs.newTab('secondTabfirstTab', 'Another Child Form', childForm, anotherChildFormrelation);
secondTabfirstTab.x = 0;
secondTabfirstTab.y = 0;
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th 10;
var secondTab = tabs.newTab('secondTab', 'Another Child Form', anotherChildForm);
secondTab.x = 0;
secondTab.y = 0;
{code}{div}{td}{tr}{tbodytr:id=getUUID|class=node}{tr:id=namelastDetailRow}{td}h6.getUUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{trtbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getUUID|class=node}{tr:id=desname}{td}Returns the UUID of this component.h6.getUUID{td}{tr}{tr:id=sncsig}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[UUID]{span:style=float: left; margin-right: 5px;}[UUID]{span}{span:id=iets|style=float: left; font-weight: bold;}getUUID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}Returns the UUID of this component.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div} [UUID]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}