/** * The default behavior of this method is to call * <code>setRenderParameters(parameters)</code> on the wrapped response object. */ public void setRenderParameters(Map<String, String[]> parameters) { response.setRenderParameters(parameters); }
public void setRenderParameters(Map map) { if (response instanceof ActionResponse) ((ActionResponse)response).setRenderParameters(map); }
/** * Clear all the render parameters from the {@link javax.portlet.ActionResponse}. * This may not be called when the action will call * {@link ActionResponse#sendRedirect sendRedirect}. * @param response the current action response * @see ActionResponse#setRenderParameters */ public static void clearAllRenderParameters(ActionResponse response) { try { response.setRenderParameters(new HashMap<String, String[]>(0)); } catch (IllegalStateException ex) { // Ignore in case sendRedirect was already set. } }
/** * Clear all the render parameters from the {@link javax.portlet.ActionResponse}. * This may not be called when the action will call * {@link ActionResponse#sendRedirect sendRedirect}. * @param response the current action response * @see ActionResponse#setRenderParameters */ public static void clearAllRenderParameters(ActionResponse response) { try { response.setRenderParameters(new HashMap<String, String[]>(0)); } catch (IllegalStateException ex) { // Ignore in case sendRedirect was already set. } }
@Override public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException { //Add all the parameters to the actionResponse Attributes so we can get the back actionResponse.setRenderParameters(actionRequest.getParameterMap()); }
public static void setRenderParameters(Map arg0) { ActionResponse actionResponse = getActionResponse(); if (actionResponse == null) { throw new IllegalStateException( "The response is not ActionResponse."); } actionResponse.setRenderParameters(arg0); }
private void setNewPassword(@ModelAttribute PasswordFormBean passwordFormBean, BindingResult result, ActionResponse response, Model model, Map<String, String[]> renderParamters) { passwordStrengthValidator.validate(passwordFormBean, result); passwordMatchValidator.validate(passwordFormBean, result); if (result.hasErrors()) { model.addAttribute("errors", result); response.setRenderParameters(renderParamters); } else { try { callSetPassword(passwordFormBean); //If callSetPassword does not throw exception response.setRenderParameter("success", "true"); } catch (ActivateUserFailedException e) { // explicit response failure response.setRenderParameter("failure", "unknown.system.error"); response.setRenderParameter("failureArguments", e.getMessage()); } catch (MessageBusException e) { // timeout handleMessageBusException(e, response); } } }