Command Handlers and the List Manager

An instance list normally allows the user to select one or more business object instances and then execute commands against these instances. Executing the command literally means that the uExecute method in the command handler is executed.

 

In command handler you often need to find out:

 

Note that VLF-ONE also supports the concept of Associated Instances.

You can use these List Manager methods in your command handlers:

Method Description
GetCurrentInstance

Used to ask the list manager for details of the current business object instance.

If your command handler is designed to handle single business object instances, for example for displaying the details of a specific product, you need to use this method to find out what the current product is. 

Use property #avListManager.CurrentInstance which is a direct reference to the #VF_LM003O current instance list data item.

Refer to Handling Instance List Entries in VLF-ONE. In VLF-ONE you should understand the use of an associated instance as well.

GetSelectedInstance

In VLF-WIN it is used to ask the list manager to return all selected instances in the list. Some command handlers are designed to work with multiple object instances (e.g. Printing details of all selected employees).

Refer to Handling Instance List Entries in VLF-ONE.

GetFromList

 

Used to ask the list manager to return the unique identifier and the visual identifiers for an instance in the instance list. AKeyn and NKeyn values are required to uniquely identify the instance to be read.

Refer to Handling Instance List Entries in VLF-ONE..

In VLF-ONE you should understand the use of an associated instance as well.

GetInstance

Used to ask the list manager to return all instances entries in the list. This method allows command handlers to be designed to work with all object instances returned by a filter.

Refer toHandling Instance List Entries in VLF-ONE.

 

In VLF-WIN applications the list manager also signals a ListSelectionChanged event which you might want to listen to use in more complex command handlers. It is signaled whenever the selected set of object instances changes. You should not attempt to change the content or selection in the instance list in any way within a ListSelectionChanged event handler.