2 Replies Latest reply on May 25, 2009 7:17 AM by Adrien Adrien

    rich:page pageTitle and facelets page template

    Adrien Adrien Apprentice

      Hi
      I m just start to migrate my application to use rich:page.
      I have a page templating with facelets, title is a dynamic value for the template.

      Before i used :

      <title><ui:insert name="title" /></title>

      to insert title page.

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       >
      
      <head>
       <title><ui:insert name="title" /></title>
       <ui:insert name="keywords" />
       <ui:insert name="description" />
       <ui:include src="/WEB-INF/jspf/commons/metaspublic.xhtml" />
      </head>



      But with rich:page it s seem to be impossible to use ui:insert for pageTitle like that:

      <rich:page xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j" markupType="xhtml"
       contentType="text/html" theme="#{prefs.layout.theme}"
       width="#{prefs.layout.width}" sidebarWidth="#{prefs.layout.sidebarWidth}"
       sidebarPosition="#{prefs.layout.position}" >
      
      <f:view contentType="text/html" > <!-- safari compatibility -->
      
       <f:facet name="pageHeader">
       <h:panelGroup>
       <title><ui:insert name="title" /></title>
       <ui:insert name="keywords" />
       <ui:insert name="description" />
       <ui:include src="/WEB-INF/jspf/commons/metaspublic.xhtml" />
       <script type="text/javascript" src="/pub/javascript/norightbutton.js"></script>
       </h:panelGroup>
       </f:facet>


      How can i dynamically set my title in ma page template using page?

      Thanks for your help.