/** * Calculates the current viewId - we can't get it from the ViewRoot if it's not available. * * @param context The {@link FacesContext}. * @return The current viewId. */ public static String calculateViewId(FacesContext context) { Map<String, Object> requestMap = context.getExternalContext().getRequestMap(); String viewId = (String) requestMap.get("javax.servlet.include.path_info"); if (viewId == null) { viewId = context.getExternalContext().getRequestPathInfo(); } if (viewId == null) { viewId = (String) requestMap.get("javax.servlet.include.servlet_path"); } if (viewId == null) { viewId = context.getExternalContext().getRequestServletPath(); } return viewId; }
@Override public String getRequestPathInfo() { return wrapped.getRequestPathInfo(); }
/** * {@inheritDoc} */ public String getRequestPathInfo() { return wrapped.getRequestPathInfo(); }
/** * {@inheritDoc} */ public String getRequestPathInfo() { return wrapped.getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
private static String getFullPath(ExternalContext externalContext) { String path = externalContext.getRequestServletPath(); String pathInfo = externalContext.getRequestPathInfo(); if (null != pathInfo) { path = path + pathInfo; } return path; }
private String getScopeViewKey(ExternalContext extCtx) { String scopeIdKey = null; String pathInfo = extCtx.getRequestPathInfo(); String servletPath = extCtx.getRequestServletPath(); if (pathInfo == null) scopeIdKey = servletPath; else if (servletPath == null) scopeIdKey = pathInfo; else scopeIdKey = servletPath + pathInfo; return scopeIdKey; }
@Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ @Override public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestPathInfo} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestPathInfo() */ public String getRequestPathInfo() { return getWrapped().getRequestPathInfo(); }
/** * with rewriting, the filter chain might not have access to the post-rewrite request information. * we'll save some of the information that we may need. */ private static void saveRequestPath(ExternalContext externalContext) { Map<String, Object> map = externalContext.getRequestMap(); map.put("org.jboss.seam.web.requestServletPath", externalContext.getRequestServletPath()); map.put("org.jboss.seam.web.requestContextPath", externalContext.getRequestContextPath()); map.put("org.jboss.seam.web.requestPathInfo", externalContext.getRequestPathInfo()); }
private static String getResourcePath(FacesContext facesContext) { ExternalContext externalContext = facesContext.getExternalContext(); String path = externalContext.getRequestServletPath(); if (null == path) { path = externalContext.getRequestPathInfo(); } return (externalContext.getRequestContextPath() + path); } }
private static Resource createResource(FacesContext context) { if (Hacks.isPrimeFacesDynamicResourceRequest(context)) { return null; } String pathInfo = context.getExternalContext().getRequestPathInfo(); String resourceName = (pathInfo != null) ? pathInfo.substring(1) : ""; if (resourceName.isEmpty()) { return null; } String libraryName = context.getExternalContext().getRequestParameterMap().get("ln"); return context.getApplication().getResourceHandler().createResource(resourceName, libraryName); }
private static Resource createResource(FacesContext context) { if (Hacks.isPrimeFacesDynamicResourceRequest(context)) { return null; } String pathInfo = context.getExternalContext().getRequestPathInfo(); String resourceName = (pathInfo != null) ? pathInfo.substring(1) : ""; if (resourceName.isEmpty()) { return null; } String libraryName = context.getExternalContext().getRequestParameterMap().get("ln"); return context.getApplication().getResourceHandler().createResource(resourceName, libraryName); }
@Override public String getActionURL(FacesContext context, String viewId) { if (SpringFacesContext.getCurrentInstance() != null) { String actionViewId = (String) context.getAttributes().get(ACTION_ATTRIBUTE); if (actionViewId != null && actionViewId.equals(viewId)) { ExternalContext externalContext = context.getExternalContext(); return externalContext.getRequestContextPath() + externalContext.getRequestServletPath() + externalContext.getRequestPathInfo(); } } return super.getActionURL(context, viewId); }