O'Reilly logo

JSF 1.2 Components by Ian Hlavats

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting input from the user

Accepting input from a user is one of the most common scenarios for web application developers. User input is typically character data that represents different types of information, such as dates, numbers, and text. JSF includes a number of standard components that represent HTML form elements that can be used to collect this information from users.

The HtmlInputText component, for example, is a good choice for accepting short textual input from the user. For use cases that require more text, such as a memo field or comment box, the HtmlInputTextarea component is a better choice as it can accommodate multiline text entry more easily.

Rendering a text field

The following example demonstrates how to accept text input from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required