This tag is used to include the content of a page. This page name is specified by src attribute of include tag. The page that has been included should use composition tag or component tag. It may contain xhtml or xml to be included. In the program below, we have used include tag and src attribute is set to "includepage.xhtml". So the content of this page will be included in the "include.xhtml" page and rendered in "includetemplate.xhtml" because insert tag with name attribute set to face5 is used in "includetemplate.xhtml".
include.xhtml:
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"> Content above composition tag will not be rendered. RoseIndia Facelet Tags TutorialWelcome to the Facelet world..........Content below composition tag will not be rendered. |
includetemplate.xhtml :
xmlns:ui="http://java.sun.com/jsf/facelets"> |
includepage.xhtml : The content in this page that will be included in the "includetemplate.xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"> This is the content of "includepage.xhtml" |
Rendered Output :
Html Source Code :
RoseIndia Facelet Tags TutorialWelcome to the Facelet world..........Enter UserID : Enter Password : name="is" value="" /> This is the content of "includepage.xhtml" |
This tag contains only one attribute :
src : This is the required attribute that can be a litral or EL expression. This value must specify a facelet whose content will be included in your template document.
0 comments:
Post a Comment