Creating an input form
Once you have an existing data connection in your project, you can create an input form. With an input form, users can read and write data from the form to the existing data source to which it is connected.
Follow these steps to create an input form on the Faces JSP page:
- Open the appropriate Faces JSP page.
- Open the Data drawer on the palette.
- Drag a relational record from the Data drawer to the Faces JSP page. This action sets where the data will be stored when the form is submitted. If you have an existing data connection, you can use that. Otherwise, create a new connection.
- Once the connection is made, you can choose which data table to use from the Table Selection dialog.
- Choose the columns to use. Once you have chosen the table and columns, the Page Data view displays the data available for you to use on this page.
- In the Page Data view, select an input control (for example, Department Number) and drag it to the appropriate place on the data table on the page. This action binds the data in your table to the data source listed in the Page Data view. For example, you drag a Department Number column from the Page Data view to an input number component that you named Department.
- To add validation to this input field:
- Select the input number field.
- In the Properties view for the input component, click the Validation tab.
- Check Value is required to require the user to enter a value.
- Enter minimum and maximum values for the user.
Related concepts
JavaServer Faces
Related tasks
Creating Faces applications - overview
Creating a Faces JSP page
Adding a relational record to a Faces JSP file
Adding a relational record list to a Faces JSP file
Related reference
Faces components reference
Attributes for Faces components