/** * For internal use by the framework only - API subject to change. */ public void firePortletActionRequest(UI uI, ActionRequest request, ActionResponse response) { String key = request.getParameter(ActionRequest.ACTION_NAME); if (eventActionDestinationMap.containsKey(key)) { // this action request is only to send queued portlet events response.setEvent(eventActionDestinationMap.get(key), eventActionValueMap.get(key)); // cleanup eventActionDestinationMap.remove(key); eventActionValueMap.remove(key); } else if (sharedParameterActionNameMap.containsKey(key)) { // this action request is only to set shared render parameters response.setRenderParameter(sharedParameterActionNameMap.get(key), sharedParameterActionValueMap.get(key)); // cleanup sharedParameterActionNameMap.remove(key); sharedParameterActionValueMap.remove(key); } else { // normal action request, notify listeners for (PortletListener l : new ArrayList<>(portletListeners)) { l.handleActionRequest(request, response, uI); } } }
/** * The default behavior of this method is to call * <code>setRenderParameter(key, value)</code> on the wrapped response object. */ public void setRenderParameter(String key, String value) { response.setRenderParameter(key, value); }
public void processAction(ActionRequest request, ActionResponse response) throws IOException, PortletException { String destinationName = request.getParameter(DESTINATION_NAME); String destinationType = request.getParameter(DESTINATION_TYPE); response.setRenderParameter("destinationName", destinationName); response.setRenderParameter("destinationType", destinationType); response.setRenderParameter("processAction", "statistics"); }
public void setRenderParameters(ActionResponse actionResponse) { actionResponse.setRenderParameter("physicalName", physicalName); actionResponse.setRenderParameter("adminObjType", type.name()); actionResponse.setRenderParameter("resourceAdapterModuleName", resourceAdapterModuleAbName.toString()); } }
/** * If request is an {@link javax.portlet.ActionRequest ActionRequest}, * get handler mapping parameter and add it to the ActionResponse. */ @Override public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) { String mappingParameter = request.getParameter(this.parameterName); if (mappingParameter != null) { response.setRenderParameter(parameterName, mappingParameter); } return true; }
public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String id = request.getParameter("id"); response.setRenderParameter("id", id); return VIEW_KEYSTORE+BEFORE_ACTION; } }
public String actionAfterView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String id = request.getParameter("id"); String alias = request.getParameter("alias"); response.setRenderParameter("id", id); response.setRenderParameter("alias", alias); return CERTIFICATE_DETAILS+BEFORE_ACTION; } }
public void processAction(ActionRequest req, ActionResponse res) throws PortletException, PortletSecurityException, IOException { Map<String, String[]> params = req.getParameterMap(); for (Map.Entry<String, String[]> param : params.entrySet()) { String name = param.getKey(); if (name.equals("scriptUrl") || name.startsWith("arg.")) { res.setRenderParameter(name, param.getValue()); } } }
public void processAction(ActionRequest req, ActionResponse res) throws PortletException, PortletSecurityException, IOException { Map<String, String[]> params = req.getParameterMap(); for (Map.Entry<String, String[]> param : params.entrySet()) { String name = param.getKey(); if (name.equals("scriptUrl") || name.startsWith("arg.")) { res.setRenderParameter(name, param.getValue()); } } }
public static void setRenderParameter(String arg0, String arg1) { ActionResponse actionResponse = getActionResponse(); if (actionResponse == null) { throw new IllegalStateException( "The response is not ActionResponse."); } actionResponse.setRenderParameter(arg0, arg1); }
public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String id = request.getParameter("id"); String alias = request.getParameter("alias"); response.setRenderParameter("id", id); response.setRenderParameter("alias", alias); return getMode(); }
public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String keystore = request.getParameter("keystore"); if(keystore != null) { response.setRenderParameter("keystore", keystore); } // else we hope this is after a failure and the actionAfterView took care of it below! return getMode(); }
public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String keystore = request.getParameter("keystore"); if(keystore != null) { response.setRenderParameter("keystore", keystore); } // else we hope this is after a failure and the actionAfterView took care of it below! return getMode(); }
@Override public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String messageId = request.getParameter(MESSAGE_ID); response.setRenderParameter(MESSAGE_ID, messageId); return getMode(); }
public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String[] params = {"caCN", "caOU", "caO", "caL", "caST", "caC", "alias", "keyAlgorithm", "keySize", "algorithm", "validFrom", "validTo", "sNo", "password"}; for(int i = 0; i < params.length; ++i) { String value = request.getParameter(params[i]); if(value != null) response.setRenderParameter(params[i], value); } return getMode(); }
public String actionBeforeView(ActionRequest request, ActionResponse response, MultiPageModel model) throws PortletException, IOException { String[] params = {"subject", "publickey", "algorithm", "validFrom", "validTo", "sNo", "pkcs10certreq", "requestId"}; for(int i = 0; i < params.length; ++i) { String value = request.getParameter(params[i]); if(value != null) response.setRenderParameter(params[i], value); } return getMode(); }
/** * Removes a given <code>InvitePreferences</code> instance. * * @param request request * @param response response */ @ActionMapping(params = { "action=remove" }) public void confirmRemovePreferences(ActionRequest request, ActionResponse response) { Long id = Long.parseLong(request.getParameter("preferencesId")); invitePreferencesService.remove(id); response.setRenderParameter("message", "Borttagen!"); }
protected void handleNull() throws Exception { if (responseInstruction.getFlowExecutionContext().isActive()) { // flow execution is still active // set the flow execution key render parameter to support browser refresh response.setRenderParameter(argumentHandler.getFlowExecutionKeyArgumentName(), responseInstruction .getFlowExecutionKey()); } // make response instruction available for rendering during the render phase of this portlet request exposeToRenderPhase(responseInstruction, request); } }.handle(responseInstruction);
public void showById(ActionRequest actionRequest, ActionResponse actionResponse) throws IOException, PortletException { PortletPreferences prefs = actionRequest.getPreferences(); String id = actionRequest.getParameter("id"); if(id != null) { prefs.setValue("id", id); prefs.store(); } String mvcPath = actionRequest.getParameter("mvcPath"); // this would tell the render method to show the required JSP actionResponse.setRenderParameter("mvcPath", mvcPath); }
@Override public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { response.setRenderParameter("foo", "foo_value"); response.setPortletMode(PortletMode.EDIT); response.setWindowState(WindowState.MAXIMIZED); }