Help

Controls

PermLinkWikiLink
Switch Workspace

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
14. Jul 2008, 05:35 America/New_York | Link

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

 

The only limit to our realization of tomorrow will be our doubts of today. FDR

5 Replies:
15. Jul 2008, 21:22 America/New_York | Link

Wouldn't this fit here ? :)

17. Jul 2008, 16:44 America/New_York | Link

I have done that in this way you described..but I get the following failure:

14:41:09,655 ERROR [AjaxPhaseListener] Exception on get current Skin 
org.richfaces.skin.SkinNotFoundException: Skin with name skin not found
	at org.richfaces.skin.SkinFactoryImpl.loadProperties(SkinFactoryImpl.java:366)
	at org.richfaces.skin.SkinFactoryImpl.buildSkin(SkinFactoryImpl.java:300)
	at org.richfaces.skin.SkinFactoryImpl.getSkinByName(SkinFactoryImpl.java:126)
	at org.richfaces.skin.SkinFactoryImpl.getSkin(SkinFactoryImpl.java:141)
	at org.ajax4jsf.event.AjaxPhaseListener.beforePhase(AjaxPhaseListener.java:119)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)

Skin with name skin not found (but Skins are exists!) Any ideas?

06. Aug 2008, 16:47 America/New_York | Link
Worked with following in web.xml:

         <context-param>
   <param-name>org.richfaces.SKIN</param-name>
   <param-value>#{themeSelector.theme}</param-value>
</context-param>


and additional properties file called skin.properties
06. Aug 2008, 22:27 America/New_York | Link

This seems to work fine to begin with, but after a few times, I get an infinite redirect loop and the following error

org.richfaces.skin.SkinNotFoundException: Name for current Skin calculated as null

The application hangs and the only way is to remove the skinning in components.xml. (add a default in web.xml)

16. Apr 2010, 19:38 America/New_York | Link

I am getting the same exception, Did anyone got this thing working ??