<s>
In	O
computing	O
,	O
Facelets	B-Language
is	O
an	O
open-source	B-Application
Web	B-Application
template	I-Application
system	I-Application
under	O
the	O
Apache	B-Application
license	I-Application
and	O
the	O
default	O
view	O
handler	O
technology	O
(	O
aka	O
view	O
declaration	O
language	O
)	O
for	O
Jakarta	B-Language
Server	I-Language
Faces	I-Language
(	O
JSF	B-Language
;	O
formerly	O
JavaServer	B-Language
Faces	I-Language
)	O
.	O
</s>
<s>
The	O
language	O
requires	O
valid	O
input	O
XML	B-Protocol
documents	I-Protocol
to	O
work	O
.	O
</s>
<s>
Facelets	B-Language
supports	O
all	O
of	O
the	O
JSF	B-Language
UI	O
components	O
and	O
focuses	O
completely	O
on	O
building	O
the	O
JSF	B-Language
component	O
tree	O
,	O
reflecting	O
the	O
view	O
for	O
a	O
JSF	B-Language
application	O
.	O
</s>
<s>
Facelets	B-Language
draws	O
on	O
some	O
of	O
the	O
ideas	O
from	O
Apache	B-Language
Tapestry	I-Language
,	O
and	O
is	O
similar	O
enough	O
to	O
draw	O
comparison	O
.	O
</s>
<s>
The	O
project	O
is	O
conceptually	O
similar	O
to	O
Tapestry	B-Language
's	O
,	O
which	O
treats	O
blocks	O
of	O
HTML	O
elements	O
as	O
framework	O
components	O
backed	O
by	O
Java	B-Language
classes	O
.	O
</s>
<s>
Facelets	B-Language
also	O
has	O
some	O
similarities	O
to	O
the	O
Apache	O
Tiles	O
framework	O
with	O
respect	O
to	O
support	O
templating	O
as	O
well	O
as	O
composition	O
.	O
</s>
<s>
Facelets	B-Language
was	O
originally	O
created	O
by	O
Jacob	O
Hookom	O
in	O
2005	O
as	O
a	O
separate	O
,	O
alternative	O
view	O
declaration	O
language	O
for	O
JSF	B-Language
1.1	O
and	O
JSF	B-Language
1.2	O
which	O
both	O
used	O
JSP	B-Language
as	O
the	O
default	O
view	O
declaration	O
language	O
.	O
</s>
<s>
Starting	O
from	O
JSF	B-Language
2.0	O
,	O
Facelets	B-Language
has	O
been	O
promoted	O
by	O
the	O
JSF	B-Language
expert	O
group	O
to	O
be	O
the	O
default	O
view	O
declaration	O
language	O
.	O
</s>
<s>
JSP	B-Language
has	O
been	O
deprecated	O
as	O
a	O
legacy	O
fall	O
back	O
.	O
</s>
<s>
In	O
Facelets	B-Language
,	O
templates	O
tags	O
from	O
a	O
tag	O
library	O
can	O
be	O
entered	O
in	O
two	O
forms	O
:	O
directly	O
as	O
a	O
qualified	O
xml	B-Protocol
element	O
or	O
indirectly	O
via	O
the	O
jsfc	O
attribute	O
on	O
an	O
arbitrary	O
non-qualified	O
element	O
.	O
</s>
<s>
In	O
the	O
latter	O
case	O
the	O
Facelet	B-Language
compiler	O
will	O
ignore	O
the	O
actual	O
element	O
and	O
will	O
process	O
the	O
element	O
as-if	O
it	O
was	O
the	O
one	O
given	O
by	O
the	O
jsfc	O
attribute	O
.	O
</s>
<s>
The	O
above	O
code	O
can	O
be	O
viewed	O
in	O
a	O
browser	O
,	O
and	O
edited	O
with	O
conventional	O
WYSIWYG	B-Application
design	O
tools	O
.	O
</s>
<s>
Nevertheless	O
,	O
directly	O
using	O
qualified	O
tags	O
is	O
the	O
most	O
popular	O
way	O
of	O
using	O
Facelets	B-Language
in	O
practice	O
and	O
is	O
the	O
style	O
most	O
used	O
in	O
books	O
and	O
examples	O
.	O
</s>
<s>
Facelets	B-Language
provides	O
a	O
facility	O
for	O
templating	O
.	O
</s>
<s>
A	O
Facelets	B-Language
file	O
can	O
reference	O
a	O
master	O
template	O
and	O
provide	O
content	O
for	O
the	O
placeholders	O
this	O
master	O
template	O
defines	O
.	O
</s>
<s>
In	O
addition	O
to	O
templating	O
,	O
Facelets	B-Language
provides	O
support	O
for	O
re-use	O
by	O
letting	O
the	O
user	O
include	O
content	O
that	O
resides	O
in	O
a	O
different	O
file	O
.	O
</s>
<s>
The	O
simplest	O
way	O
to	O
include	O
the	O
content	O
of	O
another	O
Facelet	B-Language
is	O
referencing	O
it	O
by	O
name	O
using	O
the	O
<ui:include>	O
tag	O
.	O
</s>
<s>
This	O
causes	O
the	O
content	O
in	O
the	O
referenced	O
file	O
to	O
be	O
directly	O
included	O
in	O
the	O
calling	O
Facelet	B-Language
by	O
the	O
Facelets	B-Language
compiler	O
.	O
</s>
<s>
Besides	O
re-using	O
content	O
at	O
multiple	O
locations	O
,	O
this	O
can	O
be	O
used	O
to	O
break	O
down	O
a	O
large	O
Facelet	B-Language
into	O
smaller	O
parts	O
.	O
</s>
<s>
Facelets	B-Language
supports	O
indirection	O
for	O
including	O
content	O
via	O
custom	O
tags	O
.	O
</s>
<s>
Such	O
a	O
custom	O
tag	O
can	O
be	O
associated	O
with	O
a	O
Facelet	B-Language
in	O
a	O
taglib	O
file	O
.	O
</s>
<s>
Occurrences	O
of	O
that	O
tag	O
will	O
then	O
be	O
replaced	O
with	O
the	O
content	O
of	O
the	O
associated	O
Facelet	B-Language
.	O
</s>
<s>
The	O
code	O
above	O
uses	O
the	O
tag	O
<my:spacer>	O
to	O
mark	O
the	O
point	O
in	O
the	O
Facelet	B-Language
where	O
content	O
is	O
to	O
be	O
inserted	O
.	O
</s>
<s>
Such	O
a	O
tag	O
has	O
to	O
be	O
declared	O
in	O
a	O
Taglib	O
file	O
where	O
it	O
can	O
be	O
associated	O
with	O
a	O
Facelet	B-Language
as	O
follows	O
:	O
</s>
<s>
The	O
following	O
shows	O
an	O
example	O
of	O
what	O
the	O
actual	O
content	O
Facelet	B-Language
could	O
look	O
like	O
:	O
</s>
<s>
Besides	O
including	O
content	O
directly	O
,	O
Facelets	B-Language
provides	O
the	O
composite	O
component	O
mechanism	O
that	O
makes	O
content	O
available	O
as	O
a	O
first-class	O
JSF	B-Language
component	O
.	O
</s>
<s>
By	O
convention	B-Application
the	O
content	O
is	O
then	O
automatically	O
assigned	O
a	O
namespace	O
and	O
a	O
tag	O
name	O
.	O
</s>
<s>
To	O
customize	O
included	O
content	O
,	O
Facelets	B-Language
allows	O
parameters	O
to	O
be	O
used	O
.	O
</s>
