6 Replies Latest reply on Sep 9, 2009 7:42 PM by pdpantages

    Using ui:insert for title in rich:page

    pdpantages

      Hello Forum,

      I have a template that I want to use rich:page for. On the template, I had used a ui:insert to set the page title. Like so:

       <head>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      
       <title><ui:insert name="page_title">This window needs a title!</ui:insert></title>
      


      Any page that used the template must set the page title with a ui:define directive.
      I want to do this with rich:page also.

      After switching to rich:page, I tried this inside the pageHeader facet.
      <rich:page
       markupType="xhtml"
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:h="http://java.sun.com/jsf/html">
      
       <f:facet name="pageHeader">
       <title><ui:insert name="page_title">This window needs a title!</ui:insert></title>
       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
       <link href="#{theme.css}" rel="stylesheet" type="text/css" />
       <link href="#{theme.alarm}" rel="stylesheet" type="text/css" />
       </f:facet>
      


      However, the above does not work. The titles defined with ui:define are not set.
      The page header facet seems to ignore the title tag.
      Any help will be appreciated, as usual.

      Thanks, PdP