0 Replies Latest reply on May 26, 2008 4:50 PM by Uros Milivojevic

    Seam-Remoting & EL-functions in the Facelets taglib

    Uros Milivojevic Newbie

      Hi,


      I have xhtml page with el-functions (e.g ycFn:trim(path)).
      This works OK if page is rendered inside regular (synchronous) request.
      But when I try to render page inside seam-remote request there is problem with el-function.


      This is Exception:



      com.sun.facelets.tag.TagAttributeException: //D:/programi/eclipse/PROJEKTIe3.3/Branch_v1.6.6140/WebContent/WEB-INF/classes/../../promoOffersForResultPage.xhtml @36,103 rendered="#{ !empty pOffer.offerDetails[pOffer.rightPicturesLang].pictures                and pOffer.offerDetails[pOffer.rightPicturesLang].pictures[ 0 ].path != null               and ycFn:trim(pOffer.offerDetails[pOffer.rightPicturesLang].pictures[ 0 ].path) != ''}" Function 'ycFn:trim' not found
           at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:259)
           at com.sun.facelets.tag.jsf.ComponentRule$ValueBindingMetadata.applyMetadata(ComponentRule.java:90)
           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.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.apply(DefaultFacelet.java:95)
           at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:149)
           at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:112)
           at com.yc.isystem.presentation.frontEnd.ResultsPageBeanPromoOffers.getPromoOffersForAjaxRequest(ResultsPageBeanPromoOffers.java:48)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
           at com.yc.isystem.presentation.frontEnd.ResultsPageBeanPromoOffers_$$_javassist_0.getPromoOffersForAjaxRequest(ResultsPageBeanPromoOffers_$$_javassist_0.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.seam.remoting.Call.execute(Call.java:148)
           at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:87)
           at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:110)
           at org.jboss.seam.servlet.ResourceServlet.doGet(ResourceServlet.java:68)
           at org.jboss.seam.servlet.ResourceServlet.doPost(ResourceServlet.java:77)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at com.yc.isystem.presentation.filter.SeamRemotingSessionValidationFilter.doFilter(SeamRemotingSessionValidationFilter.java:34)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at com.yc.isystem.presentation.filter.PrepareFacesContextForSeamRemoting.doFilter(PrepareFacesContextForSeamRemoting.java:43)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:131)
           at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:77)
           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
           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(Thread.java:595)
      Caused by: javax.el.ELException: Function 'ycFn:trim' not found
           at com.sun.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:202)
           at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:149)
           at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:152)
           at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:152)
           at com.sun.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:167)
           at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:178)
           at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:221)
           at com.sun.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:81)
           at com.sun.facelets.tag.TagAttribute.getValueExpression(TagAttribute.java:256)
           ... 70 more



      Java render code:



      renderer.render( "../../promoOffersForResultPage.xhtml" );




      If I remove el-functions everything work again (e.g. instead of ycFn:trim(path) there is path).
      I use el-functions in facelets as described here: http://www.ibm.com/developerworks/web/library/j-facelets2.html (search for arc:getFieldLabel as example).


      Does someone knows how to load facelets el-functions with seam-remoting?


      Thanks,
      Uros.