Standard HTML components

You can use standard HTML components in your Web pages. The standard HTML components are listed under Form Tags in the Palette view.

In addition to these components, the Table component is also available for your use. This Table component appears as Simple Table under i Web Components in the Palette view to distinguish it from the IBM® i Table Web component.

All of these components need to be included within a FORM on your JSP page so that they appear as input and output fields in the Web Interaction wizard. The Simple Table can be included in the FORM, in contrast to the IBM i Table Web component, which must be outside of the FORM on the page.

The following table shows the IBM i Web components and the equivalent HTML components that are supported for Web interactions in IBM i Web applications. It also indicates the location of the HTML components in the Palette.

i Web component HTML component supported for Web interactions Location of the HTML component in the Palette
Button Submit Button Form Tags
Check Box Check Box Form Tags
Combo Box Drop-Down Box Form Tags
Hyperlink - -
Image - -
Image Button - -
Label - -
Radio Button Group Radio Button Form Tags
Selection Box List Box Form Tags
Table (also used for subfiles) - -
- Simple Table IBM i Web Components
Text Area Text Area Form Tags
Text Entry Text Field Form Tags

Additional considerations

You need to take the following into consideration when you use standard HTML components in Web interactions:
  • Standard HTML components do not contain i-specific attributes. For example, the i Text Entry Web component includes i-specific data formatting options. In addition, runtime validation is performed on certain attribute values defined for the Text Entry Web component. The i Table Web component can handle database data from a database that resides on an i host. i-specific features like this are not available for standard HTML components.
  • The Drop-Down Box, List Box, Text Area, and Text Field standard HTML components can be linked to parameters in both the "Map and Link the Input Parameters to the Input Fields" page, and the "Map and Link the Output Parameters to the Output Fields" page in the Web Interaction wizard.

    However, the Check Box, Radio Button, and Submit Button standard HTML components can only be linked to parameters in the "Map and Link the Input Parameters to the Input Fields" page in the Web Interaction wizard.

  • For standard HTML components that are used for output page fields, when the HTML components are linked to parameters in the Web Interaction wizard, and the wizard is run to create the Web interaction, then the data that you defined for the HTML components is replaced with JavaScript.

    To restore the data, invoke the Web Interaction wizard to edit the Web interaction (you can double-click the interaction_name.wit file in your Web project to open the wizard), unlink the HTML components from the parameters in the wizard, and click Finish to run the wizard and to update the Web interaction. The original data that you defined for the HTML components is now available in the Attributes view.

  • After the data has been replaced by JavaScript for the List Box or Drop-Down Box HTML components, you can add data by selecting the Options tab in the Attributes view for the respective HTML component and entering the additional data in the Name and Value fields. The next time you run the Web Interaction wizard for Web interactions that use these HTML components, the new data is replaced by JavaScript.
    To remove or change the data for these HTML components:
    1. Invoke the Web Interaction wizard to edit the Web interaction.
    2. Unlink the fields from the parameters in the wizard.
    3. Click Finish to run the wizard and to update the Web interaction.
    4. Select the Options tab in the Attributes view for the respective List Box or Drop-Down Box HTML component.
    5. Change or remove the data that appears on the Options tab.
    6. Invoke the Web Interaction wizard to edit the Web interaction.
    7. Link the fields to the parameters in the wizard.
    8. Click Finish to run the wizard to update the Web interaction, which replaces the data with JavaScript.
  • You cannot add data to the Initial value field for Text Area or Text Field HTML components after the HTML components have been linked to parameters and the Web Interaction wizard has been run.
    However you can change or remove the data in the Initial value field.
    1. Invoke the Web Interaction wizard to edit the Web interaction.
    2. Unlink the HTML components from the parameters in the wizard.
    3. Click Finish to run the wizard to update the Web interaction.
    4. Change or remove the data that appears in the Initial value field in the Attributes view for the respective Text Area or Text Field HTML component.
    5. Invoke the Web Interaction wizard to edit the Web interaction.
    6. Link the HTML components to the parameters in the wizard.
    7. Click Finish to run the wizard and to update the Web interaction. The data is replaced with JavaScript.
  • Define the delimiter in the value returned from the host program, and in the IBM i Web components as a semicolon (;). This ensures that the data returned from the host program is handled the same way for both the Drop-Down Box and List Box standard HTML components, and for the Combo Box and Selection Box i Web components. See the description of the Data tab in Combo Box Web component, and in Selection Box Web component for further information about the format of the data returned from a host program.
  • The same naming limitations for i Web components apply to standard HTML components. However, validation at design time of the attribute values for standard HTML components is limited. The names of standard HTML components are validated when you invoke the Web Interaction wizard. A dialog indicates which of the standard HTML component names require changes and valid names are recommended. This is also done for i Web component names.

Feedback