1 Reply Latest reply on Dec 11, 2006 12:24 PM by Ed Kusnitz

    Popup window from portlet?

    Ed Kusnitz Newbie

      JBoss Portal Version 2.4.1
      Did you get Portal from CVS? or download it? download
      JBoss AS Version jboss-4.0.5.GA
      Database Vendor and Version Oracle 10g
      JDBC Connector and Version - N/A
      OS Platform Windows XP SP2
      JBoss Seam 1.1.CR2

      We have an application where we would like to do a popup window from our portlet. We are opening the wndow via javascript like this:

       var url = "/em/pages/em/feedbackPopup.xhtml?controlSetId=" + id;
       var winSettings = "center:yes;resizable:yes;dialogHeight:300px";
      
       window.open(url, null, winSettings);
      

      By using the relative address, we want to cirumvent the portlet and call our Seam page directly. However, when we do so, we get the following error:
      16:39:19,380 ERROR [STDERR] Dec 8, 2006 4:39:19 PM com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/pages/em/feedbackPopup.xhtml]
      java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade
       at com.sun.facelets.FaceletPortletViewHandler.createResponseWriter(FaceletPortletViewHandler.java:29)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:527)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       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.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       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.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      


      So we are in the FaceletViewHandler, which makes sense because it's the one we are using in our /em application for the portlet. I guess it's looking for a RenderResponse when we have a simple HttpServletResonse. But it prevents us from doing what we need to do. Is there a way of doing a simple popup from a portlet?
      Thanks in advance