Package org.gatein.pc.test.controller

Examples of org.gatein.pc.test.controller.PortletControllerContextImpl


      }
   }

   protected void _service(WebRequest req, WebResponse resp) throws Exception
   {
      PortletControllerContextImpl context = new PortletControllerContextImpl(req, resp, getServletContext());

      //
      PortletController controller = new PortletController();

      String type = req.getParameter(URLParameterConstants.TYPE);

      //
      if (URLParameterConstants.PORTLET_TYPE.equals(type))
      {
         ControllerRequestFactory factory = new ControllerRequestFactory(context.getPageNavigationalStateSerialization());
         ControllerRequest request = factory.decode(req);

         //
         ControllerResponse response = controller.process(context, request);

         //
         ControllerResponseRendererFactory rendererFactory = new ControllerResponseRendererFactory(
            true,
            true,
            context.getStateControllerContext(),
            request.getPageNavigationalState());

         //
         Renderer renderer = rendererFactory.getRenderer(response);

         //
         renderer.render(new RendererContextImpl(context));
      }
      else
      {

         PageRenderer renderer = new PageRenderer(new ResponseProperties(), context.getStateControllerContext().createPortletPageNavigationalState(false));

         //
         renderer.render(new RendererContextImpl(context));
      }
   }
View Full Code Here

TOP

Related Classes of org.gatein.pc.test.controller.PortletControllerContextImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.