|
We have seen a glimpse of the JSF taglib in the previous "Hello World" Example. JSF has two taglibs which are used to render the JSF views and process the logic at the backend. These taglibs contain from simple form designing tags to the complex Listeners and Date/Time functions. The coming sections will discuss the JSF HTML and core tags in detail. So lets start with HTML Form designing tags.
JSF Html Tags
The JSF html tag lib is the main tag lib to render the UI forms and texts in the JSF example. The following line is used to include the html tag lib in the application.
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
The tags in the HTML tag lib are categorized into the following seven categories.
- Inputs Tags:- These tags are used for the taking the input from the user. Example of such tags is inputText and inputTextarea.
- Outputs Tags:- These tags are used to print some text on the web page Example is outputText and outputLevel tags.
- Commands Tags:-The commandButton tag is the only command tag which is used to submit the forms.
- Selections:-The tags are used to get the choices from the user from some given values. Example of such tags is selectOneRadio and selectOneListbox etc.
- Layouts:- The panelGrid tag is used to group the components in the JSF application.
- Data Table:- The dataTable tag is used to display data in the the table format from some business logic components such as beans.
- Errors and messages:-The message and messages are used to print the error messages on the front end.
Coming section will take you to the in depth of the HTML tag lib available for the JSF tag lib. |