Users and Groups

The users and groups graphical user interface components allow a Java program to present lists of AS/400 users and groups in a graphical user interface.

The following components are available:

  • AS/400 panes are graphical user interface components that present and allow manipulation of one or more AS/400 resources.
  • A VUserList object is a resource that represents a list of AS/400 users and groups for use in AS/400 panes.

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

To use a VUserList, 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. Use setUserInfo() to specify the types of users that should appear. Use setGroupInfo() to specify a group name.

When AS/400 pane objects and VUserList 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 caller 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, a user can perform actions on any user list, user, or group through the pop-up menu.

The following menu item is available for user lists:

  • Properties - allows the user to set the user info and group info properties. This may be used to change the contents of the list.
The following action is available for users and groups:
  • Properties - displays properties such as the user name and description.

Users can only access users and groups to which they are authorized. In addition, the caller 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);

Example

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:


[ Legal | AS/400 Glossary ]