1 2 Previous Next 20 Replies Latest reply on Jul 7, 2009 8:54 AM by r0nan Go to original post
      • 15. Re: question about a4j:include and navigation rules
        satishbsc

        Hi Vidur,

        Can you please post your sample code?

        Thanks,
        Satish

        • 16. Re: question about a4j:include and navigation rules
          deibys

          Hello....

          I think I have a similar situation to the one posted here, please check my post
          ( http://jboss.com/index.html?module=bb&op=viewtopic&t=127591 ) and any hint is really appreciated, I am kind of stuck with this !!

          deibys



          • 17. Re: question about a4j:include and navigation rules
            freemarket

            Hi,

            I have implemented a solution based on the information posted by AlexSmirnov last year.

            Since the xhtml page included by this method already is within a a4j:form
            block, is there a requirement for further h:form blocks to instrument more ajax activities within the included page?

            Regards,
            Henry

            • 18. Re: question about a4j:include and navigation rules
              vikramchhetryy

              Hi All,
              I tried using code given by "alexsmirnov". I get following exception

              java.lang.NoClassDefFoundError: org/ajax4jsf/component/UIInclude at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getDeclaredMethods(Class.java:1763) at org.jboss.injection.InjectionUtil.processMethodAnnotations(InjectionUtil.java:96) at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:173) at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:358) at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:140) at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:292) at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:356) at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy33.start(Unknown Source) at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512) 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238) at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87) at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188) at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy34.start(Unknown Source) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy9.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:417) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766) 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) at org.jboss.Main.boot(Main.java:200) at org.jboss.Main$1.run(Main.java:508) at java.lang.Thread.run(Thread.java:595)


              In session bean

              private UIInclude include;
              // getter setters
              


              Can any one help me out on this?

              I am using jboss-seam-2.0.1.CR1, jboss-4.2.2.GA

              Any help would be appreciated.
              Thanks
              Vikram

              • 19. Re: question about a4j:include and navigation rules
                alexsmirnov

                Do you put navigateBean into a ejb module ?
                In this case, you have to put all JSF/Richfaces libraries into EAR level too, to avoid classloading problem.
                This is a not good architecture solution. Much better to place UI-related beans into a War.
                Also, pay attention to a 'transient' keywords at the UIComponent field. JCF components are not a serializable.

                • 20. Re: question about a4j:include and navigation rules
                  r0nan

                  Hello to everybody, my job is to make a wizard like user interface with not faces-config.xml. Instead of that we want to use Pageflow(jpdl). I was able to implement that also.
                  Althought if i want to use my "Next button" , the next page wont be included into the "a4j:include", instead of that it comes alive on a pure page.

                  jPDL

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <pageflow-definition
                   name="pageflow">
                  
                   <start-page name="Start" view-id="/view/pageflowExample/pstep1.xhtml" back="disabled">
                   <redirect></redirect>
                   <transition to="evaluateNote" name="next">
                   </transition>
                   </start-page>
                   <decision name="evaluateNote" expression="#{user.selected}">
                   <transition name="true" to="Step 2"/>
                   <transition name="false" to="Final Step"/>
                   </decision>
                   <page name="Step 2" view-id="/view/pageflowExample/pstep2.xhtml" back="disabled">
                   <redirect></redirect>
                   <transition to="Final Step" name="next"></transition>
                   </page>
                   <page name="Final Step" back="disabled" view-id="/view/pageflowExample/pFinalStep.xhtml">
                   <redirect></redirect>
                   <end-conversation></end-conversation>
                   </page>
                  </pageflow-definition>


                  Bean:

                  @Begin(join=true,pageflow="pageflow")
                   public String next(){
                   return "next";
                  }


                  Start page of the wizard:

                  <rich:panel styleClass="wizard" >
                   <f:facet name="header">
                   <h:outputText value="Using Page flow with Wizard behaviour" />
                   </f:facet>
                   <h:form>
                   <a4j:include id="wizard" viewId="/view/pageflowExample/pstep1.xhtml" />
                   </h:form>
                  </rich:panel>


                  pstep1.xhtml:

                  ....
                  
                   <a4j:support event="onClick"
                   action="#{user.onClick}" reRender="checkBox">
                   </a4j:support>
                  <h:selectBooleanCheckbox id="checkBox" value="#{user.selected}"></h:selectBooleanCheckbox>
                  <div class="navPanel" style="width:100%;">
                   <a4j:commandButton style="float:right" action="#{user.next}" value="Next >>"/>
                  </div>
                  ...
                  



                  I would be very pleased if anybody can help me.
                  Cheers.

                  1 2 Previous Next