/** * @see javax.portlet.PortletRequest#getPortletMode() */ public PortletMode getPortletMode() { return request.getPortletMode(); }
public PortletMode getPortletMode() { return request.getPortletMode(); }
@Override public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { log.debug("WingS-Portlet-Bridge: start with processAction()"); // store the parameters PortletSession portletSession = request.getPortletSession(); Map parameters = request.getParameterMap(); String portletMode = request.getPortletMode().toString(); portletSession.setAttribute(portletMode + ':' + Const.SESSION_ATTR_PARAMETERS, parameters, PortletSession.PORTLET_SCOPE); log.debug("WingS-Portlet-Bridge: stored parameters in sesseion under " + portletMode + ':' + Const.SESSION_ATTR_PARAMETERS); log.debug("WingS-Portlet-Bridge: ended processAction()"); }
/** * @see javax.portlet.GenericPortlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse) */ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { if (log.isLoggable(Level.FINE)) { log.fine("Process action request for portlet " + getPortletName()); } String defaultViewId = getDefaultViewIdMap().get(request.getPortletMode().toString()); String nonFacesTargetPath = getNonFacesTargetPath(request, response); if (null == defaultViewId || null != nonFacesTargetPath) { throw new PortletException("Non-faces Action requests to the GenericFacesPortlet are not supported"); } try { getFacesBridge(request, response).doFacesRequest(request, response); } catch (BridgeException e) { throw new PortletException("Error process faces request", e); } }
@Override public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { actionFoo = request.getParameterValues("foo"); actionPortletMode = request.getPortletMode(); actionWindowState = request.getWindowState(); }
@Override public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { actionFoo = request.getParameterValues("foo"); actionPortletMode = request.getPortletMode(); actionWindowState = request.getWindowState(); }
/** * Process comment action. * * @param request action request * @param response action response * @throws PortletException * @throws IOException */ protected void processCommentAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { // Action name String action = request.getParameter(ActionRequest.ACTION_NAME); // Comment identifier String id = request.getParameter("id"); // Comment content String content = request.getParameter("content"); if (PortletMode.VIEW.equals(request.getPortletMode())) { if ("addComment".equals(action)) { // Add comment action this.addCommentAction(request, response, content, null); } else if ("replyComment".equals(action)) { // Reply comment action this.addCommentAction(request, response, content, id); } else if ("deleteComment".equals(action)) { // Delete comment this.deleteCommentAction(request, response, id); } } }
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException if (request.getPortletMode() == PortletMode.EDIT)
protected void processActionResponseState(String wicketURL, String wicketFilterPath, String wicketFilterQuery, ActionRequest request, ActionResponse response, WicketResponseState responseState) throws PortletException, IOException { if (responseState.getRedirectLocation() != null) { wicketURL = fixWicketUrl(responseState.getRedirectLocation(), wicketFilterPath, wicketFilterQuery); if (wicketURL.startsWith(wicketFilterPath)) { response.setRenderParameter((String)request .getAttribute(WicketPortlet.WICKET_URL_PORTLET_PARAMETER_ATTR) + request.getPortletMode().toString(), wicketURL); } else { response.sendRedirect(responseState.getRedirectLocation()); } } } }
public void processAction (ActionRequest request, ActionResponse response) throws PortletException, IOException { String mode = request.getParameter("mode"); PortletMode currentMode = ( mode != null ) ? new PortletMode(mode) : request.getPortletMode(); if ( PortletMode.VIEW.equals(currentMode) ) { processViewAction(request,response); } else if ( PortletMode.EDIT.equals(currentMode) ) { processEditAction(request,response); } else if ( PortletMode.HELP.equals(currentMode) ) { processHelpAction(request,response); } }
webContentParams.remove(WebContentRewriter.ACTION_PARAMETER_METHOD); if (webContentURL == null || actionRequest.getPortletMode() == PortletMode.EDIT)
webContentParams.remove(WebContentRewriter.ACTION_PARAMETER_METHOD); if (webContentURL == null || actionRequest.getPortletMode() == PortletMode.EDIT)
protected void proxyProcessAction(ActionRequest request, ActionResponse response) throws PortletException, IOException, Exception PortletMode mode = request.getPortletMode();
public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException { WindowState windowState = actionRequest.getWindowState(); if (!windowState.equals(WindowState.MINIMIZED) && actionRequest.getPortletMode().equals(CONFIG_PORTLET_MODE)) { handleConfigForm(actionRequest, actionResponse); } else { XWikiContext context = null; try { // Initialize the XWiki Context which is the main object used to pass information across // classes/methods. It's also wrapping the request, response, and all container objects // in general. context = initializeXWikiContext(actionRequest, actionResponse); // From this line forward all information can be found in the XWiki Context. doView(context); } catch (XWikiException e) { throw new PortletException("Failed to initalize XWiki Context", e); } finally { if (context != null) { cleanupComponents(); } } } }
protected void processActionResponseState(ActionRequest request, ActionResponse response, String hstDispUrl, HstPortletResponseState portletResponseState) throws PortletException, IOException { PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher(hstDispUrl); if (dispatcher != null) { dispatch(dispatcher, request, response, true); // write out Cookies to ActionResponse portletResponseState.flush(); String redirectLocationUrl = portletResponseState.getRedirectLocation(); if (redirectLocationUrl != null) { if (portletResponseState.isRenderRedirect()) { response.setRenderParameter(HST_PATH_PARAM_NAME + request.getPortletMode().toString(), redirectLocationUrl); } else { response.sendRedirect(redirectLocationUrl); } } } else { throw new PortletException("HST URL Dispatcher is not found: " + hstDispUrl); } }
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException if (request.getPortletMode() == PortletMode.EDIT)
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException if (request.getPortletMode() == PortletMode.EDIT)
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException if (request.getPortletMode() == PortletMode.EDIT)
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException if (request.getPortletMode() == PortletMode.EDIT)
bridgeRequestScope.setPortletMode(actionRequest.getPortletMode());