4 Replies Latest reply on Aug 3, 2010 2:44 PM by Reseba Reseba

    Dynamic Template (a template per user)

    Reseba Reseba Newbie

      Hi, I want to know if Ican change a Template dynamically, for example I have users eachone with a particular style (width, theme,etc)
      My template:

       

      <rich:page
            
          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="#{layoutBean.theme}"
          width="#{layoutBean.width}"
          sidebarWidth="#{layoutBean.sidebarWidth}"
          sidebarPosition="#{layoutBean.position}">

      .

      .

      .

       

      and when i call the template:


      <ui:composition
          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:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:c="http://java.sun.com/jstl/core"
          xmlns:sf="http://www.springframework.org/tags/faces"
          template="/WEB-INF/layouts/template.xhtml">

      .

      .

      .

       

      the problem is that eachtime a user loggins, the template changes with the style of the last user.(other users template also change)

      How can I fix it?

      Thanks