The record-level access classes in the vaccess package allow a Java™ program to present various views of server files.
The following components are available:
You can use the record-level access graphical user interface components with keyed access to a server file. Keyed access means that the Java program can access the records of a file by specifying a key.
Keyed access works the same for each record-level access graphical user interface component. Use setKeyed() to specify keyed access instead of sequential access. Specify a key using the constructor or the setKey() method. See Specifying the key for more information about how to specify the key.
By default, only records whose keys are equal to the specified key are displayed. To change this, specify the searchType property using the constructor or setSearchType() method. Possible choices are as follows:
The following example creates a RecordListTablePane object to display all records less than or equal to a key.
// Create a key that contains a // single element, the Integer 5. Object[] key = new Object[1]; key[0] = new Integer (5); // Create a RecordListTablePane // object. Assume that "system" is an // AS400 object that is created and // initialized elsewhere. Specify // the key and search type. RecordListTablePane tablePane = new RecordListTablePane (system, "/QSYS.LIB/QGPL.LIB/PARTS.FILE", key, RecordListTablePane.KEY_LE); // Load the file contents. tablePane.load (); // Add the table pane to a frame. // Assume that "frame" is a JFrame // created elsewhere. frame.getContentPane ().add (tablePane);