; “In the cli...">

Understand the goal of jsf ui: composition

What are the benefits of the following?

<ui:composition template="template.xhtml">;

“In the client page of a template using <ui:composition>everything that is outside the tag, it is ignored and not included in the processed output” (JavaServerFaces 2.0, full link, page 61)

Since everything that is outside <ui:define>is ignored, why is there something there? Nothing needs to be set out <ui:define>.

But at the same time, all that I get will be the template itself with the filling in of only some "variables".

This does not seem to be the case. Another thing that I do not understand is that the template attribute of the composition element is optional. What is a template client without a template link?

+5
source share
1 answer

What are the benefits of the following?

<ui:composition template="template.xhtml">

With this, you can declare to use a base template that has placeholders to insert template definitions. This is more useful than doing it the other way around. You will need to include, for example, the title, footer and / or menu on each page again and again. With a template, you do not need to do this. It just comes in the template.


“In the client page of a template using <ui:composition>everything that is outside the tag, it is ignored and not included in the processed output” (JavaServerFaces 2.0, full link, page 61)

Since everything external is ignored, why is there something there? Nothing needs to be set out <ui:define>.

. ? , , , . " " . , , <ui:composition> . . JSF ?


, , , . ?

include, <ui:include>.

. :

+7

All Articles