Package javax.portlet

Examples of javax.portlet.ActionResponse


  @SuppressWarnings("unchecked")
  private void saveStack(ActionInvocation invocation) {
    Map session = invocation.getInvocationContext().getSession();
    session.put(STACK_FROM_EVENT_PHASE, invocation.getStack());
    ActionResponse actionResponse = (ActionResponse) invocation.getInvocationContext().get(RESPONSE);
    actionResponse.setRenderParameter(EVENT_ACTION, "true");
  }
View Full Code Here


            Thread.currentThread().setContextClassLoader(paClassLoader);

            if (method == ContainerConstants.METHOD_ACTION)
            {
                ActionRequest actionRequest = (ActionRequest) portletRequest;
                ActionResponse actionResponse = (ActionResponse) portletResponse;

                portletInstance.processAction(actionRequest, actionResponse);
            }
            else if (method == ContainerConstants.METHOD_RENDER)
            {
View Full Code Here

  @SuppressWarnings("unchecked")
  private void saveStack(ActionInvocation invocation) {
    Map session = invocation.getInvocationContext().getSession();
    session.put(STACK_FROM_EVENT_PHASE, invocation.getStack());
    ActionResponse actionResponse = (ActionResponse) invocation.getInvocationContext().get(RESPONSE);
    actionResponse.setRenderParameter(EVENT_ACTION, "true");
  }
View Full Code Here

   * @param finalLocation
   * @param invocation
   */
  protected void executeActionResult(String finalLocation, ActionInvocation invocation) throws Exception {
    LOG.debug("Executing result in Event phase");
    ActionResponse res = PortletActionContext.getActionResponse();
    Map sessionMap = invocation.getInvocationContext().getSession();
    LOG.debug("Setting event render parameter: " + finalLocation);
    if (finalLocation.indexOf('?') != -1) {
      convertQueryParamsToRenderParams(res, finalLocation.substring(finalLocation.indexOf('?') + 1));
      finalLocation = finalLocation.substring(0, finalLocation.indexOf('?'));
    }
    if (finalLocation.endsWith(".action")) {
      // View is rendered with a view action...luckily...
      finalLocation = finalLocation.substring(0, finalLocation.lastIndexOf("."));
      res.setRenderParameter(ACTION_PARAM, finalLocation);
    } else {
      // View is rendered outside an action...uh oh...
            String namespace = invocation.getProxy().getNamespace();
            if ( namespace != null && namespace.length() > 0 && !namespace.endsWith("/")) {
                namespace += "/";
               
            }
            res.setRenderParameter(ACTION_PARAM, namespace + "renderDirect");
      sessionMap.put(RENDER_DIRECT_LOCATION, finalLocation);
    }
    if(portletMode != null) {
      res.setPortletMode(portletMode);
      res.setRenderParameter(PortletActionConstants.MODE_PARAM, portletMode.toString());
    }
    else {
      res.setRenderParameter(PortletActionConstants.MODE_PARAM, PortletActionContext.getRequest().getPortletMode()
          .toString());
    }
  }
View Full Code Here

            actionRequest =
            PortletObjectAccess.getActionRequest(portletWindow,
                                                 servletRequest,
                                                 servletResponse);

            ActionResponse actionResponse = PortletObjectAccess.getActionResponse(portletWindow,
                                                                                  servletRequest,
                                                                                  servletResponse);
            invoker = PortletInvokerAccess.getPortletInvoker(portletWindow.getPortletEntity().getPortletDefinition());

            _actionResponse = (InternalActionResponse)actionResponse;
View Full Code Here

        _request.getSession(true).setAttribute(
                PortletConstants.PORTLET_EXCEPTION_MARKUP_ATTRIBUTE,
                markup);

        ActionResponse response = _globals.getActionResponse();

        response.setRenderParameter(ServiceConstants.SERVICE, PortletConstants.EXCEPTION_SERVICE);
    }
View Full Code Here

            boolean saveAccountInput = uiAccountInput.save(service, true);
            if (saveAccountInput == false)
                return;
            uiForm.getChild(UIUserProfileInputSet.class).save(service, userName, true);
            uiForm.reset();
            ActionResponse actResponse = event.getRequestContext().getResponse();
            actResponse.setEvent(new QName("NewAccountAdded"), null);
        }
View Full Code Here

            UIPopupWindow uiPopup = uiForm.getParent();
            uiPopup.setShow(false);
            UIComponent opener = uiPopup.getParent();

            ActionResponse response = event.getRequestContext().getResponse();
            response.setEvent(new QName("NavigationChange"), null);

            WebuiRequestContext pcontext = event.getRequestContext();
            pcontext.addUIComponentToUpdateByAjax(opener);
        }
View Full Code Here

                        UIPortal uiPortal = Util.getUIPortal();
                        uiPortal.clearUIPage(pageRef);
                    }

                    // Update UserToolbarDashboardPortlet
                    ActionResponse actResponse = event.getRequestContext().getResponse();
                    actResponse.setEvent(new QName("NavigationChange"), userNode.getName());
                    return;
                }
            }
        }
View Full Code Here

            }

            if (method == ContainerConstants.METHOD_ACTION)
            {
                ActionRequest actionRequest = (ActionRequest) request.getAttribute(ContainerConstants.PORTLET_REQUEST);
                ActionResponse actionResponse = (ActionResponse) request.getAttribute(ContainerConstants.PORTLET_RESPONSE);
                // inject the current request into the actionRequest handler (o.a.j.engine.servlet.ServletRequestImpl)
                ((HttpServletRequestWrapper)((HttpServletRequestWrapper)actionRequest).getRequest()).setRequest(request);

                portlet.processAction(actionRequest, actionResponse);
            }
View Full Code Here

TOP

Related Classes of javax.portlet.ActionResponse

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.