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.
Introduced or updated in version: 7
Declaration
NSViewStateAgent
Examples
NSViewStateAgent agent;
agent.callMethod(arg1, arg2);
Methods
DeleteHistory(String,Integer)
Deletes the history element
Introduced or updated in version: 7
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.
Introduced or updated in version: 7
Declaration
NSHistory GetCurrent(String historyName)
Parameters
Type | Name | Description |
---|---|---|
String | historyName |
Returns
Type | Description |
---|---|
NSHistory |
Remarks
This is the item with rank = 1. If no item exists a default value is returned. This is usually the first item in the table representing the history list.
Examples
NSViewStateAgent agent;
String historyName;
NSHistory res = agent.GetCurrent(historyName);
GetHistories()
Returns all history items that belong to the currently logged in user
Introduced or updated in version: 7
Declaration
NSHistory[] GetHistories()
Returns
Type | Description |
---|---|
NSHistory[] |
Examples
NSViewStateAgent agent;
NSHistory[] res = agent.GetHistories();
GetHistoriesByName(String)
Returns the named history list that belong to the currently logged in user
Introduced or updated in version: 7
Declaration
NSHistory[] GetHistoriesByName(String historyName)
Parameters
Type | Name | Description |
---|---|---|
String | historyName |
Returns
Type | Description |
---|---|
NSHistory[] |
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
Introduced or updated in version: 7
Declaration
NSHistory[] GetHistoriesByNames(String[] historyNames)
Parameters
Type | Name | Description |
---|---|---|
String[] | historyNames |
Returns
Type | Description |
---|---|
NSHistory[] |
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.
Introduced or updated in version: 7
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
Type | Description |
---|---|
NSHistory[] |
Examples
NSViewStateAgent agent;
NSHistoryRequest[] requests;
NSHistory[] res = agent.GetHistoriesByNamesAndIds(requests);
GetHistory(Integer)
Gets an NSHistory object.
Introduced or updated in version: 7
Declaration
NSHistory GetHistory(Integer historyId)
Parameters
Type | Name | Description |
---|---|---|
Integer | historyId |
Returns
Type | Description |
---|---|
NSHistory |
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.
Introduced or updated in version: 7
Declaration
Integer GetHistoryLengthPrefValue()
Returns
Type | Description |
---|---|
Integer |
Examples
NSViewStateAgent agent;
Integer res = agent.GetHistoryLengthPrefValue();
GetNextCurrent(String,Integer)
Returns the next current item. If no item exists a default value is returned.
Introduced or updated in version: 7
Declaration
NSHistory GetNextCurrent(String historyName, Integer id)
Parameters
Type | Name | Description |
---|---|---|
String | historyName | |
Integer | id |
Returns
Type | Description |
---|---|
NSHistory |
Remarks
This is usually the first item in the table representing the history list.
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.
Introduced or updated in version: 7
Declaration
NSHistory GetPreviousCurrent(String historyName, Integer id)
Parameters
Type | Name | Description |
---|---|---|
String | historyName | |
Integer | id |
Returns
Type | Description |
---|---|
NSHistory |
Remarks
This is usually the first item in the table representing the history list.
Examples
NSViewStateAgent agent;
String historyName;
Integer id;
NSHistory res = agent.GetPreviousCurrent(historyName, id);
SaveCurrent(NSHistory)
Saves the current history item.
Introduced or updated in version: 7
Declaration
NSHistory SaveCurrent(NSHistory current)
Parameters
Type | Name | Description |
---|---|---|
NSHistory | current |
Returns
Type | Description |
---|---|
NSHistory |
Remarks
This history item is saved with Rank = 1, and all the remaining elements rank values are shifted one down.
The list is maintained with the max lenght of the History list length preference.
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.
Introduced or updated in version: 7
Declaration
NSHistory[] SaveCurrents(NSHistory[] currents)
Parameters
Type | Name | Description |
---|---|---|
NSHistory[] | currents |
Returns
Type | Description |
---|---|
NSHistory[] |
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.
Introduced or updated in version: 7
Declaration
NSHistory[] SaveHistories(String historyName, NSHistory[] history)
Parameters
Type | Name | Description |
---|---|---|
String | historyName | |
NSHistory[] | history |
Returns
Type | Description |
---|---|
NSHistory[] |
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.
Introduced or updated in version: 7
Declaration
Void SetHistoryLengthPrefValue(Integer length)
Parameters
Type | Name | Description |
---|---|---|
Integer | length |
Returns
Type | Description |
---|---|
Void |