-
1. Re: Allow user to Dynamically change skin like RichFaces dem
sergeysmirnov Aug 3, 2007 4:57 PM (in response to sansaric)You are on the right way, actually.
Does your skinBean has a 'skin' property of type String? If yes, what is the default value of it? -
2. Re: Allow user to Dynamically change skin like RichFaces dem
ishabalov Aug 3, 2007 4:59 PM (in response to sansaric)I guess there is something else there, you did everything right:
Here is faces config from our richfaces-demo
http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
web.xml:
http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
Skin.java:
http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/SkinBean.java -
3. Re: Allow user to Dynamically change skin like RichFaces dem
sansaric Aug 3, 2007 5:25 PM (in response to sansaric)Thank you for your replies. Yes my skinBean has a 'skin' property of type String and the default value is set to 'blueSky'. My skinBean is almost the same as the one in the demo with a few changes. Below is the error I get:
BTW: The link provided in one of the responses for the demo web.xml is broke. Please send me the correct one.
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error matching patterns
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:148)
root cause
javax.servlet.ServletException: Cannot get value for expression '#{skinBean.skin}'
javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
org.securityfilter.authenticator.FormAuthenticator.processLogin(FormAuthenticator.java:228)
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:138)
root cause
javax.faces.el.EvaluationException: Cannot get value for expression '#{skinBean.skin}'
org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:405)
org.ajax4jsf.framework.skin.SkinFactoryImpl.getSkinOrName(SkinFactoryImpl.java:187)
org.ajax4jsf.framework.skin.SkinFactoryImpl.getSkin(SkinFactoryImpl.java:90)
org.ajax4jsf.framework.ajax.AjaxContext.processHeadResources(AjaxContext.java:400)
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:262)
org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:74)
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
org.securityfilter.authenticator.FormAuthenticator.processLogin(FormAuthenticator.java:228)
org.securityfilter.filter.SecurityFilter.doFilter(SecurityFilter.java:138) -
4. Re: Allow user to Dynamically change skin like RichFaces dem
ishabalov Aug 3, 2007 8:11 PM (in response to sansaric)should works. try to set skin temporary to "blueSky" and put somewhere on the page #{skinBean}, something wrong in your bean.
-
5. Re: Allow user to Dynamically change skin like RichFaces dem
sansaric Aug 6, 2007 9:45 AM (in response to sansaric)Thanks to all who helped. You were correct about having a bug in my Bean which I corrected and it worked.
-
6. Re: Allow user to Dynamically change skin like RichFaces dem
damatrix Jul 11, 2008 8:37 AM (in response to sansaric)I honestly think that this should be in the Richfaces documentation pdf. I've met so many people who asked this question and it's strange they have to come to the this forum before they find such a simple thing.