ui
Tag composition


Defines a composition that optionally uses a template, as outlined in the description of the ui tag library. Multiple compositions can use the same template, thus encapsulating and reusing layout. JSF disregards everything outside of the composition, which lets developers embed compositions in well-formed XHTML pages that can be viewed in an XHTML viewer, such as Dreamweaver or a browser, without including extraneous elements such as head and body.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml"
  5.    xmlns:ui="http://java.sun.com/jsf/facelets">
  6.  
  7.   <body>
  8.  
  9.     THIS LINE, AND EVERYTHING ABOVE IT IS DISREGARDED BY JSF
  10.     <ui:composition template="/layout.xhtml">
  11.  
  12.       <ui:define name="title">#{msgs.contactsWindowTitle}</ui:define>
  13.       <ui:define name="heading">#{msgs.contactsHeading}</ui:define>
  14.  
  15.       <ui:define name="content">
  16.         <ui:include src="contactsTable.xhtml" />
  17.       </ui:define>
  18.          
  19.     </ui:composition>
  20.     THIS LINE, AND EVERYTHING BELOW IT IS DISREGARDED BY JSF
  21.  
  22.   </body>
  23. </html>


Tag Information
Tag ClassNone
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
templatefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)

A URI that points to a template, also known as a layout, that inserts pieces of the page defined in the composition.


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.