A VMessageList object is a resource that represents a list of messages for use in AS/400 panes. This is for message lists generated by command or program calls. The following methods return message lists:
To use a VMessageList, set the messageList property. Set this property by using a constructor or through the setMessageList() method. The VMessageList object is then "plugged" into the AS/400 pane as the root, using the pane's constructor or setRoot() method.
When AS/400 pane and VMessageList objects are created, they are initialized to a default state. The list of messages is not loaded at creation time. To load the contents, the caller must explicitly call the load() method on either object.
At run-time, a user can perform actions on any message through the pop-up menu. The following action is available for messages:
The caller can prevent the user from performing actions by using the setAllowActions() method on the pane.
The following example creates a VMessageList for the messages generated by a command call and presents it in an AS400DetailsPane:
// Create the VMessageList object. // Assume that "command" is a // CommandCall object created and run // elsewhere. VMessageList root = new VMessageList (command.getMessageList ()); // Create and load an AS400DetailsPane // object. AS400DetailsPane detailsPane = new AS400DetailsPane (root); detailsPane.load (); // Add the details pane to a frame. // Assume that "frame" is a JFrame // created elsewhere. frame.getContentPane ().add (detailsPane);
Present the list of messages generated by a command call using an AS400DetailsPane with a VMessageList object.
The following image shows the VMessageList graphical user interface component: