Show TOC

Creating the JSF UI ComponentsLocate this document in the navigation structure

Prerequisites

There is a proper project to wrap the JSF application.

Context

JSF provides a rich set of UI components you can add to Web pages, such as tables, input fields, combo boxes, buttons, and so on (most of them correspond to HTML elements).

  • For the static elements, such as static images, links and texts, you need to add the corresponding markup tag in the JSP page

  • For the dynamic elements, such as form elements (buttons, input fields, radio buttons, and so on), you have to bind the behavior of the element with the corresponding property of managed beans.

Procedure


  1. Create a JSP page, in which you can add UI components

    More information: Creating JSF JSP Files .

  2. Add the necessary content to the page.

    More information:

  3. Optionally, for the input elements, provide input validation.

    More information: Validating User Input .