JSF view Tag

Advertisement

This tag is used to create the top level view. This acts as a container of all the components that are part of the view of the page.

JSF view Tag

This tag is used to create the top level view. This
acts as a container of all the components that are part of the view of the page.
Its attribute "locale" is important in the case of making the view
internationalized. We can do so by setting the locale attribute to the locale
you have to present the view of the page. Suppose we set the locale attribute to
"en" or "fr" then the view is presented to the user in English
and French respectively. you can also set the locale dynamically and can present
the view according to the user.

Rendered Output : In the above code all
component tags have been embedded in the view tag.

In the above tag we have set the locale attribute to "fr" i.e. French
locale. In the above code we have used message tag to display the error message
if the input field is left blank. So this message is shown in French because of
the locale set in the code. The output is shown below.