@Override public String getNamespace() { return response.getNamespace(); }
public RowChecker(PortletResponse portletResponse) { _portletResponse = portletResponse; _allRowIds = _portletResponse.getNamespace() + ALL_ROW_IDS; _formName = _portletResponse.getNamespace() + FORM_NAME; _rowIds = _portletResponse.getNamespace() + ROW_IDS; }
protected String getNamespacedValue(String value) { if (Validator.isNull(value)) { return StringPool.BLANK; } if (!value.startsWith(_portletResponse.getNamespace())) { value = _portletResponse.getNamespace() + value; } return value; }
protected String getPath( PortletRequest portletRequest, PortletResponse portletResponse) { String mvcPath = portletRequest.getParameter("mvcPath"); if (mvcPath == null) { mvcPath = (String)portletRequest.getAttribute( getMVCPathAttributeName(portletResponse.getNamespace())); } // Check deprecated parameter if (mvcPath == null) { mvcPath = portletRequest.getParameter("jspPage"); } return mvcPath; }
@Override protected JsonObject getApplicationParameters(BootstrapContext context) { JsonObject parameters = super.getApplicationParameters(context); VaadinPortletResponse response = (VaadinPortletResponse) context .getResponse(); VaadinPortletRequest request = (VaadinPortletRequest) context .getRequest(); MimeResponse portletResponse = (MimeResponse) response .getPortletResponse(); ResourceURL resourceURL = portletResponse.createResourceURL(); resourceURL.setResourceID("v-browserDetails"); parameters.put("browserDetailsUrl", resourceURL.toString()); String serviceUrlParameterName = ApplicationConstants.V_RESOURCE_PATH; // If we are running in Liferay then we need to prefix all parameters // with the portlet namespace if (request instanceof VaadinLiferayRequest) { serviceUrlParameterName = response.getPortletResponse() .getNamespace() + serviceUrlParameterName; } parameters.put(ApplicationConstants.SERVICE_URL_PARAMETER_NAME, serviceUrlParameterName); return parameters; }
/** * The default behavior of this method is to call * <code>getNamespace()</code> on the wrapped response object. */ public String getNamespace() { return response.getNamespace(); }
/** * Should be prefixed or appended to elements, such as JavaScript variables or function names, * to ensure they are unique in the context of the portal page. * * @see javax.portlet.PortletResponse#getNamespace * @see org.apache.wicket.RequestContext#getNamespace() * @return the portlet's namespace, typically the portlet window id. */ @Override public CharSequence getNamespace() { return portletResponse != null ? portletResponse.getNamespace() : ""; }
public String getNamespace() { return request.resp.getNamespace(); } }
public String getNamespace() { return request.resp.getNamespace(); } }
/** * @see ExternalContext#encodeNamespace(String) */ @Override public String encodeNamespace(String name) { if (name == null) { return portletResponse.getNamespace(); } else if (RICHFACES_DETECTED && (name.equals(ORG_RICHFACES_EXTENSION))) { // http://issues.liferay.com/browse/FACES-1416 return name; } else { return portletResponse.getNamespace() + name; } }
public String encodeNamespace(String s) { // Supposedly if this attribute is present we are running in Liferay if (getRequestMap().get("THEME_DISPLAY") == null) { return ((PortletResponse) mPortletResponse).getNamespace() + s; } else { // For liferay -- prefix with extra chars so they don't strip return LIFERAY_NAMESPACE_PREFIX_HACK + ((PortletResponse) mPortletResponse).getNamespace() + s; } }
/** * Producer method for the namespace. */ @Produces @Namespace @Named("namespace") public static String produceNamespace() { PortletArtifactProducer pap = producers.get(); assert pap != null; return pap.resp.getNamespace(); }
public static String getNamespace() { PortletResponse portletResponse = getPortletResponse(); return (portletResponse != null) ? portletResponse.getNamespace() : ""; }
public int doStartTag() throws JspException { PortletResponse portletResponse = (PortletResponse) pageContext.getRequest() .getAttribute(Constants.PORTLET_RESPONSE); String namespace = portletResponse.getNamespace(); JspWriter writer = pageContext.getOut(); try { writer.print(namespace); } catch (IOException ioe) { throw new JspException( "Unable to write namespace", ioe ); } return SKIP_BODY; } }
public int doStartTag() throws JspException { PortletResponse portletResponse = (PortletResponse) pageContext.getRequest() .getAttribute(Constants.PORTLET_RESPONSE); String namespace = portletResponse.getNamespace(); JspWriter writer = pageContext.getOut(); try { writer.print(namespace); } catch (IOException ioe) { throw new JspException( "Unable to write namespace", ioe ); } return SKIP_BODY; } }
public String getParameter(String name) { String value = null; Map<String, String[]> parameterMap = getParameterMap(); String[] values = parameterMap.get(name); if (values == null) { PortletResponse portletResponse = bridgeContext.getPortletResponse(); String responseNamespace = portletResponse.getNamespace(); values = parameterMap.get(responseNamespace + name); } if ((values != null) && (values.length > 0)) { value = values[0]; } return value; }
public String getParameter(String name) { String value = null; Map<String, String[]> parameterMap = getParameterMap(); String[] values = parameterMap.get(name); if (values == null) { PortletResponse portletResponse = bridgeContext.getPortletResponse(); String responseNamespace = portletResponse.getNamespace(); values = parameterMap.get(responseNamespace + name); } if ((values != null) && (values.length > 0)) { value = values[0]; } return value; }
public int doEndTag() throws JspException { try { PortletResponse resp = getPortletResponse(); String namespace = resp.getNamespace(); pageContext.getOut().print(namespace); } catch (IOException e) { } return EVAL_PAGE; } }
protected HstMutablePortletRequestContext createHstRequestContext(PortletRequest request, PortletResponse response) { HstMutablePortletRequestContext prc = null; if (HstServices.isAvailable()) { HstRequestContextComponent rcc = (HstRequestContextComponent)HstServices.getComponentManager().getComponent("org.hippoecm.hst.core.internal.HstRequestContextComponent"); prc = (HstMutablePortletRequestContext)rcc.create(true); prc.setContextNamespace(response.getNamespace()); prc.setPortletConfig(getPortletConfig()); prc.setPortletRequest(request); prc.setPortletResponse(response); request.setAttribute(ContainerConstants.HST_REQUEST_CONTEXT, prc); } return prc; }
protected HstMutablePortletRequestContext createHstRequestContext(PortletRequest request, PortletResponse response) { HstMutablePortletRequestContext prc = null; if (HstServices.isAvailable()) { HstRequestContextComponent rcc = (HstRequestContextComponent)HstServices.getComponentManager().getComponent("org.hippoecm.hst.core.internal.HstRequestContextComponent"); prc = (HstMutablePortletRequestContext)rcc.create(true); prc.setContextNamespace(response.getNamespace()); prc.setPortletConfig(getPortletConfig()); prc.setPortletRequest(request); prc.setPortletResponse(response); request.setAttribute(ContainerConstants.HST_REQUEST_CONTEXT, prc); } return prc; }