Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is f:view in useful in jsf 2.0?

Tags:

jsf

In jsf 2.0 the <f:view>..</f:view> (assuming f corresponds to faces tags) is said to be useful but I can see no actual use of it, if it can be omitted.

P.S.: I actually found not comments on this matter in specs.

like image 946
Denys S. Avatar asked Feb 16 '11 17:02

Denys S.


People also ask

What is f view in JSF?

f:view declares the beginning of a JSF page.

What is jsf2?

JavaServer Faces (JSF) 2.0, is an MVC web framework which focus on simplifies building user interfaces (comes with 100+ ready UI tags) for Java web application and make reusable UI component easy to implement. Unlike JSF 1. x, almost everything is declared in faces-config.


1 Answers

You can set the contentType (in some cases useful for Safari browsers), locale (I18N, L10N) and encoding with it:

<f:view locale="#{sample.locale}" encoding="UTF-8" contentType="text/html">
like image 148
jiai Avatar answered Oct 10 '22 01:10

jiai