Saturday, January 10, 2009

Facelets Template-Parameter

Es gibt mehrere Möglichkeiten Facelets-Templates zu parameterisieren.
  1. Über ui:insert und ui:define
  2. Über EL und ui:param
Facelets Template:

<link rel="stylesheet" type="text/css" href="#{myStylesheet}" media="screen, projection" />
<ui:insert name="myContent">No content supplied.</ui:insert>

Facelets Template-Client:

<ui:composition template="MyTemplate.xhtml">
<ui:param name="myStylesheet" value="" />
<ui:define name="content">
<h1>My Content</h1>

Über ui:insert ist es möglich Blockplatzhalter zu definieren.
Mit ui:param können auch Inline-Passagen definiert werden.

Die Frage wurde in unserem XING JSF-Developers-Forum ( gestellt.


  1. thanks, perfect hint ;)

  2. Thanks, just what i've been looking for ;)

  3. Good post. This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. I am sure this post has helped me save many hours of browsing other similar posts just to find what I was looking for.
    There are many brand from France, also including herve leger, and most of womens stars love wearing herve leger dress when they join in some important party. Now polo ralph lauren is very popular with youthful people, everyone want to get ralph lauren polo shirts, there are lots of online shop which are ralph lauren polo outlet, true religion jeans outlet, it will be convenient for us.