Viewing Web page forms' data mappings

Web page forms use a Struts action to map form input data to a form bean. The Data Mappings view shows you a table of such mappings.

Before you can view a Web page forms data mappings, the Data Mappings view must be displayed. By default the Data Mappings view is not displayed. You can add the Data Mappings view by clicking Window > Show View > Other > Struts > Data Mappings.

To view the data mappings for the fields in a form and a form bean:

  1. Select the form either in Struts Explorer or in the Web diagram editor:

    Where form is selected Action
    Struts Explorer Click the name of a JSP file that contains forms, and click the name of a link that has form input subordinate to it.

    Selection of /computeDay in Struts Explorer and the resultant Data Mappings view, showing under /computeDay and formBean the following rows: day, day; (empty), dayOfWeek; month, month; submit, (empty), year, year.

    Web diagram editor Select a connection from a JSP page to an action, in which the connection contains data to be passed to the action.

    Selection of /computeDay in the Web diagram editor and the resultant Data Mappings view, showing under /computeDay and formBean the following rows: day, day; (empty), dayOfWeek; month, month; submit, (empty), year, year.

    If the link or connection submits form data to a Struts action, the Data Mappings view displays a table in which the first column lists the names of the input fields from the Web page form and the second column lists the names of the target fields in the form bean.

  2. You can then compare the form column with the form-bean column to check whether the items match up.

 

Related concepts

Struts actions
Struts form beans
The Data Mappings view
The Struts Explorer view
Web diagrams and the Web diagram editor

 

Related tasks

Viewing a Struts project's structure

Related reference
Icons used by the Struts Explorer view
Struts preferences for Web diagram editor

Feedback