Class NSViewStateAgent
User interface view state, history, currentXXX values.
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSViewStateAgent()
User interface view state, history, currentXXX values.
Declaration
NSViewStateAgent Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
Methods
DeleteHistory(String,Integer)
Deletes the history element
Declaration
Void DeleteHistory(String historyName, Integer id) Parameters
| Type | Name | Description |
| String | historyName | |
| Integer | id |
Returns
| Type | Description |
| Void |
GetCurrent(String)
Gets the current (most recent) value of the history list.
Declaration
NSHistory GetCurrent(String historyName) Examples
NSViewStateAgent agent;
String historyName;
NSHistory res = agent.GetCurrent(historyName);
Parameters
| Type | Name | Description |
| String | historyName |
Returns
| Type | Description |
| NSHistory |
GetHistories()
Returns all history items that belong to the currently logged in user
Declaration
NSHistory[] GetHistories() Examples
NSViewStateAgent agent;
NSHistory[] res = agent.GetHistories();
Returns
| Type | Description |
| NSHistory[] |
GetHistoriesByName(String)
Returns the named history list that belong to the currently logged in user
Declaration
NSHistory[] GetHistoriesByName(String historyName) Examples
NSViewStateAgent agent;
String historyName;
NSHistory[] res = agent.GetHistoriesByName(historyName);
Parameters
| Type | Name | Description |
| String | historyName |
Returns
| Type | Description |
| NSHistory[] |
GetHistoriesByNames(String[])
Returns the named history lists that belong to the currently logged in user
Declaration
NSHistory[] GetHistoriesByNames(String[] historyNames) Examples
NSViewStateAgent agent;
String[] historyNames;
NSHistory[] res = agent.GetHistoriesByNames(historyNames);
Parameters
| Type | Name | Description |
| String[] | historyNames |
Returns
| Type | Description |
| NSHistory[] |
GetHistoriesByNamesAndIds(NSHistoryRequest[])
Returns history data for the named entities and the given IDs, which may not directly correspond to the current history records in the database.
Declaration
NSHistory[] GetHistoriesByNamesAndIds(NSHistoryRequest[] requests) Examples
NSViewStateAgent agent;
NSHistoryRequest[] requests;
NSHistory[] res = agent.GetHistoriesByNamesAndIds(requests);
Parameters
| Type | Name | Description |
| NSHistoryRequest[] | requests | Array of request objects that define what entities we are requesting history information for. |
Returns
| Type | Description |
| NSHistory[] |
GetHistory(Integer)
Gets an NSHistory object.
Declaration
NSHistory GetHistory(Integer historyId) Examples
NSViewStateAgent agent;
NSHistory thing = agent.GetHistory(123);
Parameters
| Type | Name | Description |
| Integer | historyId |
Returns
| Type | Description |
| NSHistory |
GetHistoryLengthPrefValue()
Gets the logged-on user's preferred history list length. Will return the system preference if no user preferences are available.
Declaration
Integer GetHistoryLengthPrefValue() Examples
NSViewStateAgent agent;
Integer res = agent.GetHistoryLengthPrefValue();
Returns
| Type | Description |
| Integer |
GetNextCurrent(String,Integer)
Returns the next current item. If no item exists a default value is returned.
Declaration
NSHistory GetNextCurrent(String historyName, Integer id) Examples
NSViewStateAgent agent;
String historyName;
Integer id;
NSHistory res = agent.GetNextCurrent(historyName, id);
Parameters
| Type | Name | Description |
| String | historyName | |
| Integer | id |
Returns
| Type | Description |
| NSHistory |
GetPreviousCurrent(String,Integer)
Returns the previous current item. If no item exists a default value is returned.
Declaration
NSHistory GetPreviousCurrent(String historyName, Integer id) Examples
NSViewStateAgent agent;
String historyName;
Integer id;
NSHistory res = agent.GetPreviousCurrent(historyName, id);
Parameters
| Type | Name | Description |
| String | historyName | |
| Integer | id |
Returns
| Type | Description |
| NSHistory |
SaveCurrent(NSHistory)
Saves the current history item.
Declaration
NSHistory SaveCurrent(NSHistory current) Examples
NSViewStateAgent agent;
NSHistory current;
NSHistory res = agent.SaveCurrent(current);
Parameters
| Type | Name | Description |
| NSHistory | current |
Returns
| Type | Description |
| NSHistory |
SaveCurrents(NSHistory[])
Saves the history elements as the current value for their respective lists. If more than one item is submitted for the same list, they are added sequently, meaning that the last one is the most current.
Declaration
NSHistory[] SaveCurrents(NSHistory[] currents) Examples
NSViewStateAgent agent;
NSHistory[] currents;
NSHistory[] res = agent.SaveCurrents(currents);
Parameters
| Type | Name | Description |
| NSHistory[] | currents |
Returns
| Type | Description |
| NSHistory[] |
SaveHistories(String,NSHistory[])
Replaces the existing history-list for the currently logged-in user. All elements must belong to the same history list. If not they are ignored.
Declaration
NSHistory[] SaveHistories(String historyName, NSHistory[] history) Examples
NSViewStateAgent agent;
String historyName;
NSHistory[] history;
NSHistory[] res = agent.SaveHistories(historyName, history);
Parameters
| Type | Name | Description |
| String | historyName | |
| NSHistory[] | history |
Returns
| Type | Description |
| NSHistory[] |