Documentation
Facelets Tools

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Facelets Concepts
  4. Document Types
  5. Design View Support
  6. Code View Support
  7. Keyboard Shortcuts
  8. Tag Object Toolbars
  9. Property Inspectors
Selected 10. Facelets Tag Reference

10. Facelets UI Tag Reference

Contents > Facelets UI Tag Reference > ui:insert

ui:insert

The UI Insert tag is a templating tag that declares a named content element to be defined by another Facelet. It can be used effectively with the ui:define tag to pass values between Facelets.

Facelets Template (template.jsf)

<html>
<head>
<title><ui:insert name="title" /></title>
<body>
<h2><ui:insert name="header" /></h2>
<ui:insert name="message" />
</body>
</html>

HTML Output

<html>
<head>
<title>Welcome</title>
</head>
<body>
<h2>Hello World!</h2>
How are you today?
</body>
</html>

Tag Attributes

name Text
 
The name attribute specifies the name of the matching ui:define tag that will provide the content to be inserted into this Facelet.