Child pages
  • History

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
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

History is a stack of form names that were visible on the screen ordered by appearance. The first/oldest item is stored in position/index 1.

Each container (the main application window or dialogs showing forms) has its own history stack. When the History object is accessed from within scripting, the methods of the History object will work with the history stack for the active container.

Only main forms ( currentcontroller) will be stored in History, so not forms displayed in tabpanels or splitpanes.

The history has a maximum size of 10 entries. When the maximum size is reached, the oldest entries are automatically removed to make place for new entries.

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#buttonsEnabled
Set/Get the history buttons enabled.

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#back()
Navigates back in the history stack; shows the previous form (if present).
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#clear()
Clear the entire history stack.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#forward()
Navigates forward in the history stack; shows the next form (if present).
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getCurrentIndex()
Get the current absolute index in the history stack.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getFormName(i)
Get the form name based on the specified absolute index in the history stack location.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#go(i)
Navigates to the relative index based on current position in the history.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeForm(formName)
Removes the named form item from the history stack (and from memory) if not currently shown.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeIndex(index)
Removes an absolute index based history stack form item.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#size()
Returns the total size of the history stack.

HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
idbuttonsEnabled
classnode
Table Row (tr)
idname
Table Cell (td)
buttonsEnabled
Table Row (tr)
iddes
Table Cell (td)
Set/Get the history buttons enabled.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
history.buttonsEnabled = true;
var status = history.buttonsEnabled;
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idback
classnode
Table Row (tr)
idname
Table Cell (td)
back
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
back
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Navigates back in the history stack; shows the previous form (if present).
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
history.back();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idclear
classnode
Table Row (tr)
idname
Table Cell (td)
clear
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
clear
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Clear the entire history stack.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
history.clear();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idforward
classnode
Table Row (tr)
idname
Table Cell (td)
forward
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
forward
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Navigates forward in the history stack; shows the next form (if present).
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
history.forward();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetCurrentIndex
classnode
Table Row (tr)
idname
Table Cell (td)
getCurrentIndex
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getCurrentIndex
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the current absolute index in the history stack.
Table Row (tr)
idret
Table Cell (td)
Returns
Number – the current absolute index
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var abs_index = history.getCurrentIndex();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetFormName
classnode
Table Row (tr)
idname
Table Cell (td)
getFormName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getFormName
Span
stylefloat: left;
idiets
(i)
Table Row (tr)
iddes
Table Cell (td)
Get the form name based on the specified absolute index in the history stack location.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} i – the absolute index
Table Row (tr)
idret
Table Cell (td)
Returns
String – the formName
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var name = history.getFormName(history.getCurrentIndex());
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgo
classnode
Table Row (tr)
idname
Table Cell (td)
go
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
go
Span
stylefloat: left;
idiets
(i)
Table Row (tr)
iddes
Table Cell (td)
Navigates to the relative index based on current position in the history.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} i – the absolute index
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
history.go(-3);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveForm
classnode
Table Row (tr)
idname
Table Cell (td)
removeForm
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeForm
Span
stylefloat: left;
idiets
(formName)
Table Row (tr)
iddes
Table Cell (td)
Removes the named form item from the history stack (and from memory) if not currently shown.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{String} formName – the name of the form to remove.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if successful
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var done = history.removeForm('mypreviousform');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveIndex
classnode
Table Row (tr)
idname
Table Cell (td)
removeIndex
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeIndex
Span
stylefloat: left;
idiets
(index)
Table Row (tr)
iddes
Table Cell (td)
Removes an absolute index based history stack form item.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} index – the index of the form to remove.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if successful
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var done = history.removeIndex(history.getCurrentIndex()+1);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsize
classnode
Table Row (tr)
idname
Table Cell (td)
size
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
size
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the total size of the history stack.
Table Row (tr)
idret
Table Cell (td)
Returns
Number – the size
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var size = history.size();
Table Row (tr)
classlastDetailRow
Table Cell (td)