7 Replies Latest reply on Apr 8, 2011 12:43 AM by Shanth K

    rich:component is not working after upgrading to Richfaces 4

    Shah din sani Newbie

      Hi,

       

      I am trying to upgrade to RichFaces 4 from 3.3.x. I am having some problems in migration. At this point i am facing problem with following piece of code.

       

      <rich:menuItem submitMode="server" value="Reset Password"

                                                                            action="resetPassword"

                                                                            onclick="#{rich:component('loading')}.show()"

                                                                            oncomplete="Richfaces.hideModalPanel('loading');" />

                                                                  <rich:menuItem submitMode="server"

                                                                            value="Update personal information" action="updateAcct"

                                                                            onclick="#{rich:component('loading')}.show()"

                                                                            oncomplete="Richfaces.hideModalPanel('loading');" />

                                                                  <rich:menuItem submitMode="server" value="Manage Roles"

                                                                            action="updateRole" onclick="#{rich:component('loading')}.show()"

                                                                            oncomplete="Richfaces.hideModalPanel('loading');" />

                                                                  <rich:menuItem submitMode="server" value="Manage Addresses"

                                                                            action="manageAddresses"

                                                                            onclick="#{rich:component('loading')}.show()"

                                                                            oncomplete="Richfaces.hideModalPanel('loading');" />

       

       

       

      When i load page that has this code then i get following exception. Please advice. Attached is my web.xml file also for review.

       

      pr 5, 2011 9:32:13 PM com.sun.facelets.FaceletViewHandler handleRenderException

      SEVERE: Error Rendering View[/error.xhtml]

      javax.el.ELException: Function 'rich:component' not found

                at org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:198)

                at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:147)

                at org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:155)

                at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:173)

                at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:217)

                at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:67)

                at com.sun.facelets.el.ELText$ELTextVariable.apply(ELText.java:161)

                at com.sun.facelets.el.ELText$ELTextComposite.apply(ELText.java:142)

                at com.sun.facelets.compiler.AttributeInstruction.apply(AttributeInstruction.java:60)

                at com.sun.facelets.compiler.UIInstructionHandler.apply(UIInstructionHandler.java:95)

                at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

                at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)

                at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)

                at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

                at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)

                at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

                at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

                at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

                at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)

                at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)

                at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:144)

                at com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:60)

                at com.sun.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:64)

                at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

                at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

                at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

                at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)

                at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)

                at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)

                at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)

                at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

                at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:143)

                at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)

                at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

                at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)

                at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)

                at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)

                at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1684)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:619)

      21:32:13,015 ERROR FaceletRedirectionViewHandler:42 - Redirected back to ourselves, there must be a problem with the error.xhtml page

      javax.el.ELException: Function 'rich:component' not found

                at org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:198)

                at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:147)

                at org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:155)

                at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:173)

                at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:217)

                at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:67)

                at com.sun.facelets.el.ELText$ELTextVariable.apply(ELText.java:161)

                at com.sun.facelets.el.ELText$ELTextComposite.apply(ELText.java:142)