You will create the update record page using the Web interaction wizard.
Creating the update record page
To create the update record page:
The Select page opens.
The Web Interaction wizard opens.
This next page is where you specify the input and output pages.
You want to get from the current results page to the update page. So
you use the result page as an existing input page and let the Web Interaction
wizard generate an update page for you.
This is the page your original Web Interaction generated; you are now linking it with another Web Interaction.
On the next page, you will need to add another program instance and define the input and output parameters for this Web Interaction.
You will notice that the structure and the program from your previous Web Interaction are visible, and available for your use.
Adding a program
To add a program:
The service program has several procedures that we have already coded for you. One of these procedures is dispUpdate. It gets the customer detail data from a database file given a customer number.
You will see that the program has been added under the Program call definitions.
Adding parameters
To add parameters:
Now you need to add the structure you defined earlier.
Your wizard page should now look like this:
You can see the new parameters you have defined for this interaction.
The input parameter page opens.
Now you will link the input page field to the program parameter.
You have just linked a field on the input page to the input parameter of our program.
Now its time to design the output page.
First you will change the output page title.
Designing the output page
To design the output page:
Now you need to change the field labels to make sense and to make the fields editable.
By default the output data is displayed as a label when the Web Interaction wizard generates the html for the page. Since you want to allow changes to the data you need to change all field attributes from Input Style: Label to Input Style: Text Entry.
CUSTNA | Customer Name |
REPNO | Representative Number |
CONTAC | Contact |
CPHONE | Phone Number |
CFAX | Fax Number |
CADDR | Address |
CCITY | City |
CCOUNT | Country |
CZIP | Zip |
Your page should now look like this:
The Page Designer opens.
The customer number field needs to be protected so no changes can be made
to it.
You don't want to allow the user to change the customer number.
You have created the update record page, added a program, added parameters and designed the output page and now you are ready to begin Exercise 4.2: Linking to the update record page.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.