Users and groups

The users and groups graphical user interface components allow you to present lists of AS/400 users and groups through the VUser class.

The following components are available:

AS/400 panes and VUserList objects can be used together to present many views of the list. They can also be used to allow the user to select users and groups.

To use a VUserList, you must first set the system property. Set this property by using a constructor or through the setSystem() method. The VUserList object is then "plugged" into the AS/400 pane as the root, using the pane's constructor or setRoot() method.

VUserList has some other useful properties for defining the set of users and groups that are presented in AS/400 panes:

You can use the VUserAndGroup object to get information about the Users and Groups on the system. Before you can get information about a particular object, you need to load the information so that it can be accessed. You can display the AS/400 system in which the information is found by using the getSystem method.

When AS/400 pane objects and VUserList or VUserAndGroup objects are created, they are initialized to a default state. The list of users and groups has not been loaded. To load the contents, the Java program must explicitly call the load() method on either object to initiate communication to the AS/400 system to gather the contents of the list.

At run-time, you can perform actions on any user list, user, or group through the pop-up menu.

The following action is available for users:

The following menu item is available for user lists:

The following action is available for users and groups:

Users can only access users and groups to which they are authorized. In addition, the Java program can prevent the user from performing actions by using the setAllowActions() method on the pane.

The following example creates a VUserList and presents it in an AS400DetailsPane:

    // Create the VUserList object.
    // Assume that "system" is an AS400
    // object created and initialized
    // elsewhere. 
    VUserList root = new VUserList (system);

    // 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);
The following example shows how to use the VUserAndGroup object:
    // Create the VUserAndGroup object.
    // Assume that "system" is an AS/400 object created and initialized elsewhere.
    VUserAndGroup root = new VUserAndGroup(system);

    // Create and Load an AS/400ExplorerPane
    AS400ExplorerPane explorerPane = new AS400ExplorerPane(root);
    explorerPane.load();
        
    // Add the explorer pane to a frame
    // Assume that "frame" is a JFrame created elsewhere
    frame.getContentPane().add(explorerPane);

Other Examples

Present a list of users on the system using an AS400ListPane with a VUserList object.

The following image shows the VUserList graphical user interface component:

VUserList graphical user interface component