PortletURL renderUrl = resourceResponse.createRenderURL(); renderUrl.setParameter("renderException", ex.toString()); resourceResponse.addProperty("Location", renderUrl.toString());
public static String getFormTagRenderFormStartElement(PageContext pageContext, String formStartElement, WindowState ws) { if ( PortletServlet.isPortletRequest(pageContext.getRequest())) { int actionURLStart = formStartElement.indexOf("action=") + 8; int actionURLEnd = formStartElement.indexOf('"', actionURLStart); String actionURL = formStartElement.substring(actionURLStart, actionURLEnd); final PortletURL portletURL = StrutsPortletURL.createActionURL(pageContext.getRequest(), actionURL); if (ws!=null) { try { portletURL.setWindowState(ws); } catch (WindowStateException e) { e.printStackTrace(); } } formStartElement = formStartElement.substring(0, actionURLStart) + portletURL.toString() + formStartElement.substring(actionURLEnd); } return formStartElement; }
public String createFlowExecutionUrl(String flowId, String flowExecutionKey, RenderResponse response) { PortletURL url = response.createActionURL(); url.setParameter(EXECUTION_ATTRIBUTE, flowExecutionKey); return url.toString(); } }
sb.append(myUrl.toString()); sb.append("&_20_struts_action=%2Fdocument_library%2Fview_file_entry&_20_fileEntryId="); sb.append(fileEntry.getFileEntryId());
/** * @return The action url. */ public static String setViewIdForUrl(FacesContext facesContext, String viewId) { RenderResponse response = (RenderResponse) facesContext.getExternalContext().getResponse(); PortletURL url = response.createActionURL(); url.setParameter(VIEW_ID, viewId); return url.toString(); }
setURL(portletURL.toString()); setTarget(null);