@Override public <T extends PortletURL & ActionURL> T createActionURL() throws IllegalStateException { return ((MimeResponse)response).createActionURL(); }
@Override public ActionURL createActionURL(Copy option) throws IllegalStateException { return ((MimeResponse)response).createActionURL(option); }
/** * Creates a new action URL. * * Creating an action URL is only supported when processing a suitable * request (render or resource request, including normal Vaadin UIDL * processing) and will return null if not processing a suitable request. * * @param action * the action parameter (javax.portlet.action parameter value in * JSR-286) * @return action URL or null if called outside a MimeRequest (outside a * UIDL request or similar) */ public PortletURL generateActionURL(String action) { PortletURL url = null; PortletResponse response = getCurrentResponse(); if (response instanceof MimeResponse) { url = ((MimeResponse) response).createActionURL(); url.setParameter("javax.portlet.action", action); } else { return null; } return url; }
PortletURL actionURL = mimeResponse.createActionURL();
public PortletURL createActionURL() { return getResponse().createActionURL(); }
public PortletURL createActionURL() { return getResponse().createActionURL(); }
@Override protected PortletURL getPortletURL(MimeResponse mimeResponse, UIComponent uiComponent) { PortletURL actionURL = mimeResponse.createActionURL(); ActionURL actionURLComponent = (ActionURL) uiComponent; String name = actionURLComponent.getName(); if (name != null) { actionURL.setParameter(ActionRequest.ACTION_NAME, name); } return actionURL; } }
/** * Generates a render or action URL depending on the use of the PortletUrl specific features of this class. * @see org.displaytag.util.Href#getBaseUrl() */ @Override public String getBaseUrl() { if (this.isAction()) { return this.renderResponse.createActionURL().toString(); } else { return this.renderResponse.createRenderURL().toString(); } }
@Override protected PortletURL getPortletURL(MimeResponse mimeResponse, UIComponent uiComponent) { PortletURL actionURL = mimeResponse.createActionURL(); ActionURL actionURLComponent = (ActionURL) uiComponent; String name = actionURLComponent.getName(); if (name != null) { actionURL.setParameter(ActionRequest.ACTION_NAME, name); } return actionURL; } }
protected PortletURL createActionURL(String fromURL) throws MalformedURLException { try { logger.debug("createActionURL fromURL=[" + fromURL + "]"); BridgeContext bridgeContext = BridgeContext.getCurrentInstance(); MimeResponse mimeResponse = (MimeResponse) bridgeContext.getPortletResponse(); PortletURL actionURL = mimeResponse.createActionURL(); copyParameters(fromURL, actionURL); return actionURL; } catch (ClassCastException e) { throw new MalformedURLException(e.getMessage()); } }
protected PortletURL createActionURL(String fromURL) throws MalformedURLException { try { logger.debug("createActionURL fromURL=[" + fromURL + "]"); BridgeContext bridgeContext = BridgeContext.getCurrentInstance(); MimeResponse mimeResponse = (MimeResponse) bridgeContext.getPortletResponse(); PortletURL actionURL = mimeResponse.createActionURL(); copyParameters(fromURL, actionURL); return actionURL; } catch (ClassCastException e) { throw new MalformedURLException(e.getMessage()); } }
@Override public LiferayActionURL getLiferayActionURL(BridgeContext bridgeContext, MimeResponse mimeResponse, String responseNamespace) { LiferayURLGenerator liferayURLGenerator = (LiferayURLGenerator) bridgeContext.getAttributes().get( ACTION_URL_GENERATOR); if (liferayURLGenerator == null) { PortletURL actionURL = mimeResponse.createActionURL(); liferayURLGenerator = new LiferayURLGeneratorActionImpl(actionURL.toString(), actionURL.getPortletMode(), responseNamespace, actionURL.getWindowState()); bridgeContext.getAttributes().put(ACTION_URL_GENERATOR, liferayURLGenerator); } return new LiferayActionURLImpl(liferayURLGenerator); }
@Override public LiferayActionURL getLiferayActionURL(BridgeContext bridgeContext, MimeResponse mimeResponse, String responseNamespace) { LiferayURLGenerator liferayURLGenerator = (LiferayURLGenerator) bridgeContext.getAttributes().get( ACTION_URL_GENERATOR); if (liferayURLGenerator == null) { PortletURL actionURL = mimeResponse.createActionURL(); liferayURLGenerator = new LiferayURLGeneratorActionImpl(actionURL.toString(), actionURL.getPortletMode(), responseNamespace, actionURL.getWindowState()); bridgeContext.getAttributes().put(ACTION_URL_GENERATOR, liferayURLGenerator); } return new LiferayActionURLImpl(liferayURLGenerator); }
@Override public int doStartTag() throws JspException { Object obj = pageContext.getRequest().getAttribute(Constants.PORTLET_RESPONSE); if ((obj == null) || !(obj instanceof MimeResponse)) { throw new JspException("Could not obtain MimeResponse to create the URL."); } MimeResponse resp = (MimeResponse) obj; ActionURL aurl = null; if (isCopyCurrentRenderParameters() == true) { aurl = resp.createActionURL(Copy.ALL); } else { aurl = resp.createActionURL(Copy.NONE); } rparams = aurl.getRenderParameters(); aparams = aurl.getActionParameters(); setUrl(aurl); handlePMandWS(); handleDefaultEscapeXML(); handleSecureFlag(); return EVAL_BODY_INCLUDE; }
PortletURL actionUrl = ((MimeResponse) response).createActionURL(); actionUrl.setParameter(GenericReverseProxyPortlet.REMOTE_URI_PARAM_NAME, rewrittenURI.toString()); return actionUrl.toString();
if (mimeResponse != null) PortletURL url = mimeResponse.createActionURL(); url.setParameter(wicketUrlPortletParameter, path.toString()); path = saveLastEncodedUrl(url.toString(), path.toString());
private Url encodeActionUrl(Url url, boolean forceActionUrl) { if ((!forceActionUrl) && (ThreadPortletContext.isResourceRequest())) { return encodeResourceUrl(url); } if (url != null) { String qualifiedPath = getQualifiedPath(url.toString()); PortletResponse portletResponse = ThreadPortletContext.getPortletResponse(); if ((portletResponse != null) && (portletResponse instanceof MimeResponse)) { try { PortletURL portletUrl = ((MimeResponse) portletResponse).createActionURL(); portletUrl.setParameter(WicketPortlet.WICKET_URL_PORTLET_PARAMETER, qualifiedPath); qualifiedPath = portletUrl.toString(); } catch (Exception e) { throw new RuntimeException(e); } } url = parseUrl(qualifiedPath); } return markAsPortletUrl(url); }
@Override public LiferayActionURL getLiferayActionURL(PortletRequest portletRequest, MimeResponse mimeResponse, boolean friendlyURLMapperEnabled) { if (friendlyURLMapperEnabled) { PortletURL actionURL = mimeResponse.createActionURL(); return new LiferayActionURLFriendlyImpl(actionURL, mimeResponse.getNamespace(), mimeResponse.getCharacterEncoding()); } else { LiferayURLGenerator liferayURLGenerator = (LiferayURLGenerator) portletRequest.getAttribute( ACTION_URL_GENERATOR); if (liferayURLGenerator == null) { PortletURL actionURL = mimeResponse.createActionURL(); liferayURLGenerator = new LiferayURLGeneratorActionImpl(actionURL, mimeResponse.getNamespace(), mimeResponse.getCharacterEncoding()); portletRequest.setAttribute(ACTION_URL_GENERATOR, liferayURLGenerator); } return new LiferayActionURLImpl(liferayURLGenerator); } }
url = mimeResponse.createActionURL(); url.setParameter(HstContainerPortlet.HST_PATH_PARAM_NAME, path.toString()); } else if (resourceWindowReferenceNamespace != null) {
PortletURL actionUrl = response.createActionURL(); actionUrl.setParameter(ActionRequest.ACTION_NAME, "deleteComment"); String url = actionUrl.toString();