2 Replies Latest reply on May 16, 2008 3:39 PM by neilac333

    Navigating to New Page After Closing RF Modal Panel

    neilac333 Novice

      I am creating a RichFaces-Seam application, and I am using the modal panel on a particular page. I would like to be able to navigate to a new page immediately upon closing the modal panel. The problem is that there is no server side action for me to summon, so I don't know how to specify this in pages.xml.

      Here is the snippet from my facelet:

      <rich:modalPanel id="orderTypeModalPanel" minHeight="200" minWidth="450" height="200" width="500" zindex="2000">
       <f:facet name="header">
       <h:outputText value="Choose Order Type"/>
       </f:facet>
      
       <h:outputLabel for="orderTypes" value="Choose the order type for this order." />
       <h:selectOneRadio id="orderTypes" value="#{order.orderType}">
       <f:selectItems value="#{interfaceUtility.orderTypes}" />
       </h:selectOneRadio>
      
       <br/>
       <input type="button" jsfc="s:button" value="Done"
       onclick="#{rich:component('orderTypeModalPanel')}.hide()"/>
      </rich:modalPanel>


      The user will make the radio button selection, close out of the modal panel by hitting the Done button, and then, in theory, navigate immediately to a new page.

      How can I accomplish this?

      Thanks.

        • 1. Re: Navigating to New Page After Closing RF Modal Panel
          Sergey Smirnov Master

          first of, you need to have a h:form inside the modal panel as far as you have a form element inside it.

          I do not get you concern about the missing action. Why not just have: < h:commandButton .... action="next" / > ?

          • 2. Re: Navigating to New Page After Closing RF Modal Panel
            neilac333 Novice

            The modal panel is inside a <f:subview>.

            I seem to be having some issues with the transition to the next page. Here is my modal panel in originalPage.jspx:

            <rich:modalPanel id="orderTypeModalPanel" minHeight="270" minWidth="250" height="270" width="250"
            zindex="2000">
            <--JSF content -->
            <input type="button" jsfc="s:button" value="Done" view="/nextPage.jspx" propagation="join"
            onclick="#{rich:component('orderTypeModalPanel')}.hide()" id="hideButton"/>
            </rich:modalPanel>

            Then here is my pages.xml:

            <page view-id="/originalPage.jspx">
            <begin-conversation join="true"/>

            <page view-id="/nextPage.jspx">
            <begin-conversation join="true" />
            <-- navigations -->
            </page

            Then when I click the Done button on the modal panel, I get this exception:

            16 May 2008 15:28:16,999: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlPanelGroup
            16 May 2008 15:28:16,999: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component
            16 May 2008 15:28:17,099: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlCommandButton
            16 May 2008 15:28:17,099: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component
            16 May 2008 15:28:22,457: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlPanelGroup
            16 May 2008 15:28:22,457: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component
            16 May 2008 15:28:22,457: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlCommandButton
            16 May 2008 15:28:22,457: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component
            16 May 2008 15:28:28,055: WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
            16 May 2008 15:28:28,055: ERROR org.hibernate.util.JDBCExceptionReporter - weblogic.common.resourcepool.ResourceDisabledException: Pool myapp is disabled, cannot allocate resources to applications..
            16 May 2008 15:28:28,055: WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: null
            16 May 2008 15:28:28,055: ERROR org.hibernate.util.JDBCExceptionReporter - Cannot obtain connection: driverURL = jdbc:weblogic:pool:myapp, props = {EmulateTwoPhaseCommit=false, connectionPoolID=myapp, jdbcTxDataSource=true, LoggingLastResource=false, dataSourceName=myapp}
            16 May 2008 15:28:28,115: ERROR org.jboss.seam.jsf.SeamPhaseListener - uncaught exception
            java.lang.IllegalStateException: Could not start transaction
            at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:571)
            at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:307)
            at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
            at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            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.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:44)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
            at org.ajax4jsf.Filter.doFilter(Filter.java:175)
            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.servlet.SeamFilter.doFilter(SeamFilter.java:158)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
            at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
            at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:41)
            at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:81)
            at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:566)
            at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:307)
            at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
            at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            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.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:44)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
            at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
            at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:276)
            Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
            at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
            at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
            at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
            at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
            at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
            at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
            at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
            at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
            at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
            at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
            at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:81)
            at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:566)
            at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:307)
            at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
            at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            Caused by: weblogic.jdbc.extensions.PoolDisabledSQLException: weblogic.common.resourcepool.ResourceDisabledException: Pool myapp is disabled, cannot allocate resources to applications..
            at weblogic.jdbc.common.internal.JDBCUtil.wrapAndThrowResourceException(JDBCUtil.java:242)
            at weblogic.jdbc.pool.Driver.connect(Driver.java:161)
            at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:647)
            at weblogic.jdbc.jts.Driver.connect(Driver.java:137)
            at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
            at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
            at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
            at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
            at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
            at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
            at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
            at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
            at org.jboss.seam.transaction.EntityTransaction.begin(EntityTransaction.java:81)
            at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:566)
            at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:307)
            at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
            at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
            at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
            at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
            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.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)
            16 May 2008 15:28:33,012: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlPanelGroup
            16 May 2008 15:28:33,012: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component
            16 May 2008 15:28:33,012: DEBUG org.richfaces.component.UIComponentControl - Called setParent for AjaxSupport component with parent : javax.faces.component.html.HtmlCommandButton
            16 May 2008 15:28:33,012: DEBUG org.richfaces.component.UIComponentControl - Detect newly created component


            I assure you that the connection pool in Weblogic is just fine. This is something regarding how I am managing conversations from closing the modal panel to the next page.

            The interesting thing to note is that when I navigate to the Seam debug page immediately after, there are 2 conversations listed rather than just the one I have initiated.

            Any insight into what's going on here is appreciated.

            Thanks.