3 Replies Latest reply on Mar 23, 2007 3:00 AM by Carsten Hoehne

    configurable Skinning with Richfaces

    Carsten Hoehne Master

      Hello,
      i do want to implement the configurable skinning shown in the richfaces demo.
      So i have created a seam component called skinBean. And added in web.xml this parameter:

      <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>#{skinBean.skin}</param-value>
       </context-param>
      

      but with no success. I thought that this is because ajax can not access seam components so i took the original skinBean from the example, renamed it to managedSkinBean and configured it as a managed bean in faces config. And of course changed the parameter shown above to managedSeamBean
      But i get this exception again:
      17:01:09,531 ERROR org.ajax4jsf.framework.renderer.AjaxPhaseListener: Exception on get current Skin
      javax.faces.el.EvaluationException: Cannot get value for expression '#{managedSkinBean.skin}'
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
       at org.ajax4jsf.framework.skin.SkinFactoryImpl.getSkinOrName(SkinFactoryImpl.java:187)
       at org.ajax4jsf.framework.skin.SkinFactoryImpl.getSkin(SkinFactoryImpl.java:90)
       at org.ajax4jsf.framework.renderer.AjaxPhaseListener.beforePhase(AjaxPhaseListener.java:134)
       at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalStateException: No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)
       at org.jboss.seam.contexts.PageContext.getPhaseId(PageContext.java:153)
       at org.jboss.seam.contexts.PageContext.isRenderResponsePhase(PageContext.java:165)
       at org.jboss.seam.contexts.PageContext.getCurrentReadableMap(PageContext.java:76)
       at org.jboss.seam.contexts.PageContext.get(PageContext.java:66)
       at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:160)
       at org.jboss.seam.Component.getInstance(Component.java:1577)
       at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
       at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
       at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
       at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
       ... 37 more

      Any ideas why this happens?