5 Replies Latest reply on Oct 6, 2008 4:02 AM by Ilya Shaikovsky

    rich:findComponent not found

    Baptiste GAILLARD Newbie

      Hi, I have to retrieve a UIComponent using rich:findComponent().

      To begin I've tested that with a simple sample I've found on the net:

      <h:inputText id="myInput">
       <a:support event="onkeyup" reRender="outtext"/>
      </h:inputText>
      <h:outputText id="outtext" value="#{rich:findComponent('myInput').value}" />
      


      But this return an exception which is the following:

      com.sun.facelets.tag.TagAttributeException: /uima/modalPanels.xhtml @187,101 value="#{rich:findComponent('myInput').value}" Function 'rich:findComponent' not found
      at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
      at com.sun.facelets.tag.jsf.ValueHolderRule$DynamicValueExpressionMetadata.applyMetadata(ValueHolderRule.java:101)
      at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
      at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
      at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:144)
      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.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.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.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.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64)
      at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131)
      at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:310)
      at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:280)
      at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
      at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
      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.CompositionHandler.apply(CompositionHandler.java:113)
      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 org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
      at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
      at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.inv
      15:23:59,640 ERROR [STDERR] oke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.el.ELException: Function 'rich:findComponent' not found
      at org.jboss.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:176)
      at org.jboss.el.parser.SimpleNode.accept(SimpleNode.java:129)
      at org.jboss.el.parser.SimpleNode.accept(SimpleNode.java:132)
      at org.jboss.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:138)
      at org.jboss.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:152)
      at org.jboss.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:195)
      at org.jboss.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
      at org.jboss.seam.el.SeamExpressionFactory.createValueExpression(SeamExpressionFactory.java:98)
      at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
      ... 99 more


      Also I've found a similar issue reported in the richafaces JIRA : https://jira.jboss.org/jira/browse/RF-3851

      As this issue is marked as resolved I tried to test the same code with the last richfaces snapshot version of october. But same exception occurs.

      I'm using JBossAS 4.2.2.GA/4.2.3.GA, facelets, JSF1.2 and Seam 2.0.1.GA.

      So, do you know what could be the problem ?

      Thanks,