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 |
---|
|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Property Summery |
|
|
HTML Table |
---|
|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Summery |
|
Table Body (tbody) |
---|
Table Row (tr) |
---|
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) |
---|
#clear() Clear the entire history stack. |
|
|
Table Body (tbody) |
---|
Table Row (tr) |
---|
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) |
---|
#getCurrentIndex() Get the current absolute index in the history stack. |
|
|
Table Body (tbody) |
---|
Table Row (tr) |
---|
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) |
---|
#go(i) Navigates to the relative index based on current position in the history. |
|
|
Table Body (tbody) |
---|
Table Row (tr) |
---|
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) |
---|
#removeIndex(index) Removes an absolute index based history stack form item. |
|
|
Table Body (tbody) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
#size() Returns the total size of the history stack. |
|
|
|
HTML Table |
---|
id | property |
---|
class | servoy sDetail |
---|
|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Property Details |
|
Table Body (tbody) |
---|
id | buttonsEnabled |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
buttonsEnabled |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Set/Get the history buttons enabled. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
history.buttonsEnabled = true;
var status = history.buttonsEnabled;
|
|
|
|
|
|
HTML Table |
---|
id | function |
---|
class | servoy sDetail |
---|
|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| back |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Navigates back in the history stack; shows the previous form (if present). |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
history.back();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| clear |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Clear the entire history stack. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
history.clear();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| forward |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Navigates forward in the history stack; shows the next form (if present). |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
history.forward();
|
|
|
|
|
Table Body (tbody) |
---|
id | getCurrentIndex |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getCurrentIndex |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Number |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getCurrentIndex |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get the current absolute index in the history stack. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Number – the current absolute index |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var abs_index = history.getCurrentIndex();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getFormName |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| String |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getFormName |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Get the form name based on the specified absolute index in the history stack location. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Number} i – the absolute index |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns String – the formName |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var name = history.getFormName(history.getCurrentIndex());
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| go |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Navigates to the relative index based on current position in the history. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Number} i – the absolute index |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
history.go(-3);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
removeForm |
|
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 named form item from the history stack (and from memory) if not currently shown. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} formName – the name of the form to remove. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Boolean – true if successful |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var done = history.removeForm('mypreviousform');
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
removeIndex |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| removeIndex |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Removes an absolute index based history stack form item. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Number} index – the index of the form to remove. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Boolean – true if successful |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var done = history.removeIndex(history.getCurrentIndex()+1);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Number |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| size |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns the total size of the history stack. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Number – the size |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var size = history.size();
|
|
|
|
|
|