0 Replies Latest reply on May 29, 2012 12:58 AM by Dmitry Shultz

    call action, rerender panel & pass parameters to rich:popup on show

    Dmitry Shultz Novice

      I need to perform 3 operations on link click (order is important):

       

      1. invoke action (bean.updatePopUpDimensions)

      2. rerender some area inside of popUp (popupOutputPanel)

      3. pass parameters (width, height) and show popup

       

      here is the code to showcase it:

       

      <a4j:commandLink action="#{bean.updatePopUpDimensions}" value="Show PopUp"

                           render="popupOutputPanel" >

              <rich:componentControl target="popup" operation="show" onbeforeoperation="">

                  <a4j:param noEscape="true" value="event" />

                  <rich:hashParam>

                      <f:param name="width" value="#{bean.width}" />

                      <f:param name="height" value="#{bean.height}" />

                  </rich:hashParam>

              </rich:componentControl>

      </a4j:commandLink>

       

      <rich:popupPanel id="popup" modal="true">

       

              <a4j:outputPanel id="popupOutputPanel">

                   some stuff to be updated  

              </a4j:outputPanel>

      </rich:popupPanel>

       

      The problem is that when i add  event="oncomplete" to the rich:componentControl in order to make sure popup show is called after first 2 operations completed the page rendering fails with following exception:

       

      at org.richfaces.taglib.ComponentControlHandler.processNextHandler(ComponentControlHandler.java:96) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at org.richfaces.taglib.ComponentControlHandler.processNestedTags(ComponentControlHandler.java:64) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at org.richfaces.taglib.ComponentControlHandler.apply(ComponentControlHandler.java:57) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:147) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:107) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:178) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:395) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:366) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:112) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.richfaces.view.facelets.html.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

                at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:195) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at org.jboss.seam.faces.view.SeamViewDeclarationLanguage.buildView(SeamViewDeclarationLanguage.java:81) [seam-faces-3.1.0.Final.jar:3.1.0.Final]

                at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.7-jbossorg-2.jar:]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core.jar:2012-04-29 10:45]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.1.1.Final.jar:3.1.1.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.1.1.Final.jar:3.1.1.Final]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_31]

       

      in RF 3 there was a way to pass parameters to the popup like this:

       

           Richfaces.showModalPanel('myModalPanel',{width:550, top:200};

       

      but looks like it is not supported in RF 4

       

      Is there anything else i can do to achive what is required?