This content has been marked as final.
Show 2 replies
-
1. Re: Setting Skin on Login.xhtml
indyjones2 Aug 19, 2009 10:07 PM (in response to indyjones2)I don't have to use the Request to pass the Skin Name.....
Any ideas?
thanks
Indy
-
2. Re: Setting Skin on Login.xhtml
lvdberg Aug 20, 2009 9:26 AM (in response to indyjones2)There are a number of tricks to do this. I myself do the following:
Line in web.xml
<context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>#{skinAction.skin}</param-value> </context-param> <context-param>
A user has a property skinName which is retrieved when you log in and used when this bean is called, but using a query parameter hould work the same.
@Name("skinAction") @Scope(ScopeType.SESSION) public class SkinAction implements Serializable { @In(required=false) User currentUser; private static final long serialVersionUID = 9018532822592154331L; String skin = "DEFAULT"; public void personalSkin(){ if (currentUser == null) return; else { skin = currentUser.getSkinName(); } } public String getSkin() { if (skin == null) return "DEFAULT"; else return skin; } public void setSkin(String skin) { this.skin = skin; } }