6 Replies Latest reply on Jul 15, 2011 1:19 PM by Sean Jensen

    Use the Seam theme selector to alter the Richfaces skin

    Ingo Jobling Master

      Hello,


      I am posting this because others might find it useful.


      myPage.xhtml:
      
          <h:selectOneMenu value="#{themeSelector.theme}" valueChangeListener="#{themeSelector.select}" onchange="submit()">
              <f:selectItems value="#{themeSelector.themes}"/>
          </h:selectOneMenu>
      
      web.xml:
      
              <context-param>
                <param-name>org.richfaces.SKIN</param-name>
                <param-value>#{theme.skin}</param-value>
              </context-param>
      
      components.xml:
      
              xmlns:theme="http://jboss.com/products/seam/theme"
      
              http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.0.xsd
      
           <theme:theme-selector cookie-enabled="true" theme="emeraldTown">
                <theme:available-themes>
                     <value>blueSky</value>
                     <value>emeraldTown</value>
                </theme:available-themes>
           </theme:theme-selector>
      
      blueSky.properties:
          
          skin=blueSky
      
      emeraldTown.properties:
      
          skin=emeraldTown