Exercise 4.2: Linking to the update record page

Before you begin, you must complete Exercise 4.1: Generating the output page from the Web Interaction wizard.

Now let's modify the customer details page so that you can link to the update record page.

Instead of having the default Submit and Reset buttons you want to add a link to return to the inquiry page and you want to add a push button to submit a request for invoking the dispUpdate procedure. You did create the Web interaction to generate this request in the previous exercise.

To link to the update record page:

  1. In the Project Explorer, drill down to your result.jsp page and double-click.
    result.jsp

    On the page you will see two push buttons at the bottom of the page, delete both.

  2. Select the Submit button and press the Delete key.
  3. Select the Reset button and press the Delete key.

    Now you add the link back to the inquiry page.

  4. Type Back to Customer Inquiry.
  5. Highlight the text Back to Customer Inquiry, right-click and click Insert Link on the pop-up menu.
    result.jsp

    The Insert Link dialog opens.

  6. In the URL field, type inquiry.jsp
    Insert Link
  7. Click OK.

    Now you add the update push button that when clicked, will send a request to fetch the customer data and display the custDispUpdate page.

  8. Put your cursor right before the Back to Customer Inquiry link and press Enter on your keyboard.
    Page Designer
  9. In the right pane, click the Palette tab and expand iSeries Web Components if not already expanded.
  10. Click and drag the Button component to the location shown.
    Adding a button

    The Properties pane in the bottom left of the workbench should automatically appear.

  11. If not, right-click the button and click Properties on the pop-up menu.
    Pop-up menu
  12. Fill in the Button's details as shown below:
    Button details

    Your Customer Details page should now look like this:
    Completed custDetailResults.jsp

  13. Save and close the file.

You have linked the customer details page to the update record page and now you are ready to begin Exercise 4.3: Creating the update error page.