Exercise 7.1: Adding a new command key description pattern

The prefix for the command key description in the SLTCUST record format is Fkey=.
Function key description on customer selection panel
This doesn't follow the CUA rules normally used in iSeries user interfaces, so the WebFacing conversion does not recognize this pattern and does not hide it. You have to add this prefix pattern to the WebFacing Tool conversion rules in the WebFacing Properties dialog.

To add a new command key description pattern to WebFacing conversion rules:

  1. In the WebFacing Projects view, right-click your WebFacing project wflabxx.
  2. Click Properties on the pop-up menu.
    Popup menu for WebFacing project

    The Properties for wflabxx dialog opens.
    WebFacing Properties dialog

  3. In the left pane of the Properties for wflabxx, under Conversion, select Command Key Recognition Patterns.

    The right pane will switch to Command Key Recognition Patterns.
    Command key recognition patterns dialog

  4. In the Prefix list, type Fkey
  5. In the Separator list, leave =
  6. Click Add to the right of these two lists.

    The additional rule is now part of this style.

  7. Click OK.

Next, you will test this feature by converting the DDS member and running the application.

Reconverting DDS members

Since these are conversion properties you are changing and not style properties as in the previous module, you will need to reconvert all members that contain command key descriptions with this pattern. In the sample Order Entry application this is only member SLTCUSTD.

To reconvert DDS members:

  1. In the workbench in the WebFacing Project view, expand the wflabxx project, if not already expanded.
  2. Expand the DDS folder, if not already expanded.
  3. Right-click the SLTCUSTD member icon.
  4. Click Convert on the pop-up menu.

    After the conversion, take a look at the change.

Testing the applied new rule

Let's see how the new rule is applied to your WebFacing application.

To test the applied new rule:

  1. Right-click index.jsp in the WebFacing Projects view.
  2. Click Run > Run on Server on the pop-up menu.
  3. Go to the browser pane and click the Order Entry link.

    You will see the first screen of the sample application.

  4. Click Prompt or press F4.

    The Customer Selection list window opens.
    Customer selection window without command key label

    Note:
    Notice that the command key text Fkey12=Cancel is gone from the bottom of the window.
  5. If the push button still shows, restart the Application server.
    1. Click the Servers tab at the bottom of the workbench.
      Servers tab
    2. Right-click the server icon.
    3. Click Restart > Start on the pop-up menu.
      Restart server option
    4. Run the application again.
  6. Select a customer or cancel by pressing F12 to return to the Order Entry Application window.

Now that you know how to change the command key recognition patterns in the WebFacing Tool, you can add text to frequently used command keys that don't have a text description in the DDS source.
Missing label for command key

Back on the Order Entry panel, you can see that the push button for F12 does not have a description. Its label shows F12. You will learn how to fix the label in the next exercise.

You have started the Properties dialog, selected Command Key Recognition Patterns, added a new command key rule and reconverted the DDS members, tested the applied rule, and now you are ready to begin Exercise 7.2: Adding command key button labels.