Package javax.portlet

Examples of javax.portlet.RenderRequest


        Mock mockRequest = mock(RenderRequest.class);
        Mock mockResponse = mock(RenderResponse.class);
        Mock mockRd = mock(PortletRequestDispatcher.class);
        Mock mockPrep = mock(PortletRequestDispatcher.class);
       
        RenderRequest req = (RenderRequest)mockRequest.proxy();
        RenderResponse res = (RenderResponse)mockResponse.proxy();
        PortletRequestDispatcher rd = (PortletRequestDispatcher)mockRd.proxy();
        PortletConfig cfg = (PortletConfig)mockConfig.proxy();
        PortletContext ctx = (PortletContext)mockCtx.proxy();
        ActionInvocation inv = (ActionInvocation)mockInvocation.proxy();
View Full Code Here


        Mock mockRequest = mock(RenderRequest.class);
        Mock mockResponse = mock(RenderResponse.class);
        Mock mockRd = mock(PortletRequestDispatcher.class);
        Mock mockPrep = mock(PortletRequestDispatcher.class);
       
        RenderRequest req = (RenderRequest)mockRequest.proxy();
        RenderResponse res = (RenderResponse)mockResponse.proxy();
        PortletRequestDispatcher rd = (PortletRequestDispatcher)mockRd.proxy();
        PortletConfig cfg = (PortletConfig)mockConfig.proxy();
        PortletContext ctx = (PortletContext)mockCtx.proxy();
       
View Full Code Here

  //Object//
  public int hashCode() {
    return _req.hashCode();
  }
  public boolean equals(Object o) {
    RenderRequest val =
      o instanceof RenderRequest ? (RenderRequest)o:
      o instanceof RenderHttpServletRequest ? ((RenderHttpServletRequest)o)._req: null;
    return val != null && val.equals(_req);
  }
View Full Code Here

        log.debug("End init");
    }

    public void start(RenderFormEvent event) throws PortletException {
        log.debug("Entering start()");
        RenderRequest request = event.getRenderRequest();
        PortletSession session = request.getPortletSession();

        User user = getUser(request);
        CredentialInfo credInfo =
            (CredentialInfo)session.getAttribute(CRED_INFO);
        if (credInfo != null) {
View Full Code Here

    }


    public void start(RenderFormEvent event) throws PortletException {
        log.debug("Entering start");
        RenderRequest request = event.getRenderRequest();
        TextBean errorMessage = event.getTextBean(ERROR_MESSAGE);
        errorMessage.setStyle("error");
        errorMessage.setValue(null);

        User user = getUser(request);
View Full Code Here

        setNextState(request, "forward");
    }

    public void forward(RenderFormEvent event) throws PortletException {
        RenderRequest request = event.getRenderRequest();
        RenderResponse response = event.getRenderResponse();
        response.setProperty("BODY_ONLOAD",
            "document.forms['form-redirection'].submit();");
        setNextState(request, FORWARD_JSP);
    }
View Full Code Here

    if (logger.isDebugEnabled()) {
      logger.debug("Bound render request context to thread: " + request);
    }

    RenderRequest processedRequest = request;
    HandlerExecutionChain mappedHandler = null;
    int interceptorIndex = -1;

    try {
      ModelAndView mv = null;
View Full Code Here

      context = getFacesContext(request, response, lifecycle, redirectParams);
      ExternalContext extCtx = context.getExternalContext();

      // Use request from ExternalContext in case its been wrapped by an
      // extension
      RenderRequest extRequest = (RenderRequest) extCtx.getRequest();
          
      if (restoredScope)
      {
        // Because the Bridge is required to always save/restore the
        // VIEW_STATE
        // parameter -- always attempt a restore
        extRequest = restoreActionParams(context);
     

      // Ensure the ContentType is set before rendering
      if (extCtx.getResponseContentType() == null)
      {
        response.setContentType(extRequest.getResponseContentType());
      }

      // ensure that isPostback attribute set if VIEW_STATE param exists
      if (extCtx.getRequestParameterValuesMap().containsKey(ResponseStateManager.VIEW_STATE_PARAM))
      {
View Full Code Here

    ExternalContext ec = context.getExternalContext();
    // Note: only available/restored if this scope was restored.
    Map<String, String[]> m = (Map<String, String[]>) ec.getRequestMap().get(REQUEST_PARAMETERS);

    // ensures current request returned if nothing to restore/wrap
    RenderRequest wrapped = (RenderRequest) ec.getRequest();
    if (m != null && !m.isEmpty())
    {
      wrapped = new BridgeRenderRequestWrapper(wrapped, m);
      ec.setRequest(wrapped);
    }
View Full Code Here

          getFacesContextFactory().getFacesContext(mPortletConfig, request, response, lifecycle);
      ExternalContext extCtx = context.getExternalContext();

      // Use request from ExternalContext in case its been wrapped by an
      // extension
      RenderRequest extRequest = (RenderRequest) extCtx.getRequest();

      scopeId = extRequest.getParameter(REQUEST_SCOPE_ID_RENDER_PARAM);

      if (restoreBridgeRequestScopeData(context, scopeId))
      {
        // Because the Bridge is required to always save/restore the
        // VIEW_STATE
        // parameter -- always attempt a restore
        extRequest = restoreActionParams(context);

        // only restores if first render after action
        // afterwards not restored from Bridge request scope
        // rather its saved/restored by Faces.
        restoreFacesView(context, scopeId);
      }

      // Ensure the ContentType is set before rendering
      if (extCtx.getResponseContentType() == null)
      {
        response.setContentType(extRequest.getResponseContentType());
      }

      // ensure that isPostback attribute set if VIEW_STATE param exists
      if (extCtx.getRequestParameterValuesMap().containsKey(ResponseStateManager.VIEW_STATE_PARAM))
      {
View Full Code Here

TOP

Related Classes of javax.portlet.RenderRequest

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.