You can use multiple input and output pages for a Web interaction.
The multiple pages are specified when you select the options Use
input pages and Use output pages on the
wizard page "Specify the Input and Output Pages for your Web Interaction".
You
can use pages in a parallel, independent organization, and link program parameters
to the same fields on multiple pages.
Note: The following description refers
to multiple input pages within a Web application that uses a program on an IBM® i host.
You can also use multiple pages with Java™ bean methods in the same way.
Use pages in a parallel organization
Parallel use
of pages implies that the pages are independent of each other. The independent
pages can contain fields that are linked to the same input parameters in a
host program. However, only one of the pages can be used to input data to
the host program for processing at any one time. The results of the processing
are returned to the output pages defined in the interaction.
Consider
the following example:
- Use input pages input1.jsp, input2.jsp,
and host program pgm1.
- Page input1.jsp contains input fields in1, in2,
and a Submit button.
- Page input2.jsp contains input fields in3, in4,
and a Submit button.
- The Submit button on each page calls pgm1 with
the action class generated by the Web Interaction wizard.
- Program pgm1 has input parameters inhost1 and inhost2.
- Parameter inhost1 is linked to in1 in input1.jsp,
and to in3 in input2.jsp.
- Parameter inhost2 is linked to in2 in input1.jsp,
and to in4 in input2.jsp.
When the application runs, either input1.jsp or input2.jsp displays
in the browser.
- If input1.jsp is displayed, the user enters
values for in1 and in2,
and clicks Submit to initiate the call to pgm1 and
passes the data that was entered to parameters inhost1 and inhost2 for
processing.
- If input2.jsp is displayed, the user enters
values for in3 and in4,
and clicks Submit to initiate the call to pgm1 and
to pass the data that was entered, to parameters inhost1 and inhost2 for
processing.
In this parallel use of independent pages, the same program parameter
can be linked to more than one field if the field is on a different page.
In this way, more than one input page can be defined in the Web Interaction
wizard to call the same host program.