WAM065 Controlling List Output

LANSA WAM

WAM065 - Controlling List Output

Objectives

When you output a list to your web page, you should always consider whether there is a need to limit the number of entries that will be displayed.

If you output a large list:

  • The application may perform badly.
  • The user will need to scroll down the page to find the entries he is interested in, or will need to scroll through the list or grid to find the entries he wants.

If you are an IBM i developer you will be familiar with writing output to sub-files, which the 5250 terminal is then able to scroll through. In the web, if you add 500 entries to the list, they will all be loaded to the page immediately.

This exercise demonstrates how the list paging weblet can be used together with program logic to load a list with one page of entries at a time. This provides one simple technique that could be used.

From your own experience of using web sites you will be familiar with a number of alternative techniques. For example a set of page links, which enable the user to jump to another page of results. These other techniques could also be implemented in a WAM.

When designing applications that may bring back a large set of results, you should always consider as many ways as possible for the user to limit his query to find only the entries he is looking for.

The employee enquiry application:

  • Enables employee numbers to be selected using the AutoComplete weblet
  • The search displays employees with a fixed page size of 10 entries
  • The list_paging_weblet enables the user to page forward and backward to display all the employees found by the search

Note: The code provided in this exercise can be copied from the WAM tutorials in the VL online guide.

To achieve these objectives you will complete the following:

Step 1. Create WAM iiiEmpSearch – Employee Search

Step 2. Add List Paging Images weblet

Step 3. Add AutoComplete Weblets (optional)

Summary

Before You Begin

You should have completed all the preceding exercises in this workshop.