Presentation class

The Resource package and its classes have been deprecated. You are advised to use the Access package instead.

Every resource object, resource list, and meta data object has an associated com.ibm.as400.resource.Presentation object that provides translated information, such as the name, full name, and icon.

Example: Printing a resource list and its sort values using their Presentations

You can use the Presentation information to present resource objects, resource lists, attributes, selections, and sorts to end users in text format.

   void printCurrentSort(ResourceList resourceList) throws ResourceException
   {
       // Get the presentation for the ResourceList and print its full name.
       Presentation resourceListPresentation = resourceList.getPresentation();
       System.out.println(resourceListPresentation.getFullName());

       // Get the current sort value.
       Object[] sortIDs = resourceList.getSortValue();

       // Print each sort ID.
       for(int i = 0; i < sortIDs.length; ++i)
       {
           ResourceMetaData sortMetaData = resourceList.getSortMetaData(sortIDs[i]);
           System.out.println("Sorting by " + sortMetaData.getName());
       }
   }