Class NSViewStateAgent
User interface view state, history, currentXXX values.
Syntax
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSViewStateAgent()
User interface view state, history, currentXXX values.
Declaration
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
Methods
DeleteHistory(String,Integer)
Deletes the history element
Declaration
Void DeleteHistory(String historyName, Integer id)
Parameters
Returns
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
GetCurrent(String)
Gets the current (most recent) value of the history list.
Declaration
NSHistory GetCurrent(String historyName)
Parameters
Type |
Name |
Description |
String |
historyName |
|
Returns
Examples
NSViewStateAgent agent;
String historyName;
NSHistory res = agent.GetCurrent(historyName);
GetHistories()
Returns all history items that belong to the currently logged in user
Declaration
NSHistory[] GetHistories()
Returns
Examples
NSViewStateAgent agent;
NSHistory[] res = agent.GetHistories();
GetHistoriesByName(String)
Returns the named history list that belong to the currently logged in user
Declaration
NSHistory[] GetHistoriesByName(String historyName)
Parameters
Type |
Name |
Description |
String |
historyName |
|
Returns
Examples
NSViewStateAgent agent;
String historyName;
NSHistory[] res = agent.GetHistoriesByName(historyName);
GetHistoriesByNames(String[])
Returns the named history lists that belong to the currently logged in user
Declaration
NSHistory[] GetHistoriesByNames(String[] historyNames)
Parameters
Type |
Name |
Description |
String[] |
historyNames |
|
Returns
Examples
NSViewStateAgent agent;
String[] historyNames;
NSHistory[] res = agent.GetHistoriesByNames(historyNames);
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.Use this method if you know exactly which items you need, regardless of whether they are in the current history or not.The history in the database is not changed or even looked at by this method.
Declaration
NSHistory[] GetHistoriesByNamesAndIds(NSHistoryRequest[] requests)
Parameters
Type |
Name |
Description |
NSHistoryRequest[] |
requests |
Array of request objects that define what entities we are requesting history information for.
|
Returns
Examples
NSViewStateAgent agent;
NSHistoryRequest[] requests;
NSHistory[] res = agent.GetHistoriesByNamesAndIds(requests);
GetHistory(Integer)
Gets an NSHistory object.
Declaration
NSHistory GetHistory(Integer historyId)
Parameters
Type |
Name |
Description |
Integer |
historyId |
|
Returns
Examples
NSViewStateAgent agent;
NSHistory thing = agent.GetHistory(123);
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()
Returns
Examples
NSViewStateAgent agent;
Integer res = agent.GetHistoryLengthPrefValue();
GetNextCurrent(String,Integer)
Returns the next current item. If no item exists a default value is returned.
Declaration
NSHistory GetNextCurrent(String historyName, Integer id)
Parameters
Returns
Examples
NSViewStateAgent agent;
String historyName;
Integer id;
NSHistory res = agent.GetNextCurrent(historyName, id);
GetPreviousCurrent(String,Integer)
Returns the previous current item. If no item exists a default value is returned.
Declaration
NSHistory GetPreviousCurrent(String historyName, Integer id)
Parameters
Returns
Examples
NSViewStateAgent agent;
String historyName;
Integer id;
NSHistory res = agent.GetPreviousCurrent(historyName, id);
SaveCurrent(NSHistory)
Saves the current history item.
Declaration
NSHistory SaveCurrent(NSHistory current)
Parameters
Returns
Examples
NSViewStateAgent agent;
NSHistory current;
NSHistory res = agent.SaveCurrent(current);
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)
Parameters
Returns
Examples
NSViewStateAgent agent;
NSHistory[] currents;
NSHistory[] res = agent.SaveCurrents(currents);
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)
Parameters
Returns
Examples
NSViewStateAgent agent;
String historyName;
NSHistory[] history;
NSHistory[] res = agent.SaveHistories(historyName, history);
SetHistoryLengthPrefValue(Integer)
Sets the logged-on user's preferred history list length.
Declaration
Void SetHistoryLengthPrefValue(Integer length)
Parameters
Type |
Name |
Description |
Integer |
length |
|
Returns
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);