Generating multiple output pages from a Web diagram

If you create a Web diagram that depicts multiple output pages that do not exist, you can invoke the Web Interaction wizard to generate the output pages for you.
  1. To illustrate this, assume that you have a Web diagram that depicts three unrealized output pages as shown in the following image:
    Web diagram depicting three unrealized output pages.
  2. To invoke the Web Interaction wizard for this interaction design, right-click the action node retrieve and click Open iSeries Web Interaction Wizard.

    The first page of the Web Interaction wizard shows that the Web interaction name retrieve is the same as the action node in the Web diagram.

  3. Click Next to go to the page Specify the Input and Output Pages for your Web Interaction.

    This page of the wizard shows the input JSP page and the three output JSP pages that are depicted in the Web diagram. The options Generate input page and Generate output page are selected.
    Page 2 in the Web Interaction wizard, Specify the Input and Output Pages for your Web Interaction, showing the input and output JSP pages depicted in the Web diagram.

    Note that if you select the input JSP file name, none of the Add, Remove, Preview, or Rename buttons are enabled. If you select any of the output JSP file names, only the Remove button is enabled. If you remove any of the output JSP files, only the remaining output JSP files are generated by the Web Interaction wizard and these JSP files are realized in the Web diagram. The output files that have been removed continue to be depicted as unrealized in the Web diagram.

  4. Click Next to proceed through the pages in the wizard and to specify the necessary options.
  5. When you reach the Design the Result Form page, the name of the first output page that you want to generate is above the Output parameters field.
    The output page name appears above the Output parameters field.
  6. All of the parameters that you specified on page 3 of the wizard as input and output, or output only, are shown in the Output parameters area. All of the parameters are selected for inclusion on the page that the wizard will generate. Clear the check boxes for any parameters that you want to exclude from the first output page that is to be generated.
    Important:
    • The properties on the Page tab are used to define the properties for all of the output pages that are to be generated.
    • Whether or not you select parameters for inclusion on this first output page, you need to use this page to specify the Save to Session and Message Controller properties that are on the Fields tab. These properties, along with Name in Session , are disabled on subsequent Design the Result Form pages. Select the parameter in the Output parameters area on the wizard page and then change the property value for Save to Session or Message Controller, if applicable. All other properties on the Fields tab are available on subsequent Design the Result Form pages.
  7. Click Next to go to the Design the Result page for the next output page that you specified.

    As before, the name of the output page that you want to generate is above the Output parameters field.

    The page properties on the Page tab that are defined for the first output page to be generated, are applied to all remaining output pages that are to be generated. As a result the page properties are disabled for this output page and all remaining output pages.

  8. All of the parameters are selected for inclusion on the page. Clear the check boxes for the parameters that you want to exclude from this output page.

    All properties on the Fields tab for each of the parameters are also available except for the Name in Session,Save to Session, and Message Controller properties.

  9. When you click Next on the last of the Design the Result Form pages in the wizard, the Specify flow controller Information page opens.

    The default value in the Flow Controller column for all of the parameters on the output pages is false. To change the flow controller value for one of the output parameters, click the row in the table containing the output parameter name and then click the button in the row to open the Flow Control Specification window.


    Click the button on the parameter row in the table to open the Flow Control Specification window.
  10. Select true in the list to enable the Value and Output JSP fields in this window.
    The Flow Control Specification window showing the true and false options in the list.

    See Understanding the Flow controller option for a description of the options.

    If you specify more than one output parameter as a flow controller, an error message appears in the status area of the wizard page indicating that only one output parameter can be used.

  11. Click Finish to create the Web interaction, the JSP files, the iSeries Web components within the files, and the iSeries run-time classes used to communicate with the program or procedures.
  12. The JSP files generated by the Web Interaction wizard now appear as realized in the Web diagram:
    Web diagram depicting the realized JSP pages that have been generated by the Web Interaction wizard.
Tip: Each Web interaction is represented by a .wit file in your Web project. To modify a Web interaction, double-click the .wit file to open the Web Interaction wizard and modify the settings for the interaction.
Restriction: The names of the PCML file and the MPCML file generated by the Web Interaction wizard are the same as the Web project name. For example, if the Web project name is myproj, then the PCML file that is generated is myproj.pcml. Similarly, the name of the MPCML file is myproj.mpcml.
  • If you create a new Web project and then import all of the files, including the PCML and MPCML files, from another Web project, the name of the PCML and MPCML files no longer match the name of the new Web project. As a result, the Web application fails to run correctly. You must rename the PCML and MPCML files to match the Web project name to resolve this problem.
  • If you rename an existing Web project, be sure to rename the PCML and the MPCML files to match the new Web project name.