search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
27 views
I started using JSF 2.0 with Facelets recently and got puzzled by new composite components knowing existing <ui:include> and other templating techniques offered by Facelets 1.x.
asked Guru 27.1k points 31 50 97

1 Answer

0 votes

 

Use Facelet templates (as in <ui:include> and/or <ui:composition>) if you want to split main page layout fragments into reuseable templates. E.g. header, menu, footer, etc.
 
Use Facelet tag files if you want to have a reuseable group of components in order to prevent/minimize code duplication. E.g. a group of label+input+message components. The major difference with composite components is that the output of a Facelet tag file does not represent a single UIComponent and may in some circumstances be the only solution when a composite component doesn't suffice.
 
 
 
answered Expert 13.2k points 27 40 59

Related questions

0 votes
2 answers 25 views
25 views
asked john Guru 27.1k points 31 50 97
0 votes
1 answer 117 views
0 votes
1 answer 127 views
0 votes
1 answer 114 views
114 views
asked smith Geek 15.3k points 16 41 63
0 votes
2 answers 53 views
53 views
asked john Guru 27.1k points 31 50 97
...