With Facelets, can I use templates for building new templates?
Can I partially instantiate a template to create a slightly more defined template?
Can I instantiate a template with another template (e.g. using one template to decorate another)?
Suppose A, B, C, D, ... are each sections of
JSF mark-up, and each `_' indicates a template <ui:insert> region.
Example 1:
Suppose I create a template (A _ B _) that leaves room for two regions to be defined.
Obviously I could use it to compose JSF pages such as A C B D and or A E B F.
Could I compose it with just C, to result in a template that defines (A C B _)?
I would use that new template to define JSF pages such as:
A C B D,
A C B F,
A C B H,
etc.
Example 2:
Suppose I have a decorator template that defines (A _ B),
and another template that defines (C _ D _J),
could I compose them to produce a template that defines (A C _ D _ B)
-- with which I could then generate such JSF pages as:
A C E D F B,
A C G D H B
while still using the original two templates to produce
A J B
and
C K D L