Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ui:composition and ui:decorate in Facelets

What are the differences between ui:composition and ui:decorate in Facelets ? Both seem to support ui:define as child tags . In what cases would you use each of these ?

like image 686
Geek Avatar asked Oct 26 '12 17:10

Geek


1 Answers

Anything outside <ui:composition> tag is disregarded. This isn't true for <ui:decorate>, which is thus beneficial as "template-in-template".

How that makes sense can maybe be better understood by looking at some real world examples in the below answers:

  • What is the real conceptual difference between ui:decorate and ui:include?
  • Is it possible to use template with composite component in JSF 2?
  • Is there a way to run a JSF page without building the whole project?
like image 87
BalusC Avatar answered Oct 28 '22 06:10

BalusC