@Override public String encodePartialActionURL(String url) { return wrapped.encodePartialActionURL(url); }
@Override public String encodePartialActionURL(String url) { return delegate.encodePartialActionURL(url); }
/** * @since 2.0 */ public String encodePartialActionURL(String url) { // TODO: IMPLEMENT IMPL ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get(); if (ctx == null) { throw new UnsupportedOperationException(); } return ctx.encodePartialActionURL(url); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
return defaultExternalContext.encodePartialActionURL(url);
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
return defaultExternalContext.encodePartialActionURL(url);
return defaultExternalContext.encodePartialActionURL(url);
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
return defaultExternalContext.encodePartialActionURL(url);
return defaultExternalContext.encodePartialActionURL(url);
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
@Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#encodePartialActionURL(String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#encodePartialActionURL(String) */ @Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
@Override public String encodePartialActionURL(String url) { return getWrapped().encodePartialActionURL(url); }
protected String getEncodedURL(FacesContext facesContext, String type, String baseUrl, Map parameters) { if (type != null) { type = type.toLowerCase(); ExternalContext externalContext = facesContext.getExternalContext(); ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); if (type.equals("action")) { String viewUrl = viewHandler.getActionURL(facesContext, baseUrl); return externalContext.encodeActionURL(viewUrl); } else if (type.equals("partialaction")) { String viewUrl = viewHandler.getActionURL(facesContext, baseUrl); return externalContext.encodePartialActionURL(viewUrl); } else if (type.equals("bookmarkable")) { String viewUrl = viewHandler.getBookmarkableURL(facesContext, baseUrl, parameters, false); return externalContext.encodeBookmarkableURL(viewUrl, parameters); } else if (type.equals("redirect")) { String viewUrl = viewHandler.getRedirectURL(facesContext, baseUrl, parameters, false); return externalContext.encodeRedirectURL(viewUrl, parameters); } else if (type.equals("resource")) { if (baseUrl.contains(ResourceHandler.RESOURCE_IDENTIFIER)) { return baseUrl; } else { String viewUrl = viewHandler.getResourceURL(facesContext, baseUrl); return externalContext.encodeResourceURL(viewUrl); } } } return baseUrl; // default, no encoding }
@Override public void buildView(FacesContext facesContext, UIViewRoot uiViewRoot) throws IOException { super.buildView(facesContext, uiViewRoot); UIComponent coreForm = findCoreFormRecurse(uiViewRoot); if (coreForm != null) { // Since the JSF-1.2-based TCK does not have h:head tags in any of the JSPs, need to add one dynamically so // that the jsf.js script resource can be rendered. This is necessary so that Trinidad Partial Page // Rendering (PPR) will work properly. HtmlHead htmlHead = new HtmlHead(); uiViewRoot.getChildren().add(htmlHead); // Add the "jsf.js" script resource to the h:head component. UIOutput uiOutput = new UIOutput(); uiOutput.setRendererType("javax.faces.resource.Script"); uiOutput.getAttributes().put("name", "jsf.js"); uiOutput.getAttributes().put("library", "javax.faces"); uiViewRoot.addComponentResource(facesContext, uiOutput, "head"); // Due to a bug in the Trinidad tr:form renderer, need to add the javax.faces.encodedURL hidden field // dynamically. See: https://issues.apache.org/jira/browse/TRINIDAD-2284 String viewId = uiViewRoot.getViewId(); String actionURL = facesContext.getApplication().getViewHandler().getActionURL(facesContext, viewId); ExternalContext externalContext = facesContext.getExternalContext(); String encodedPartialActionURL = externalContext.encodePartialActionURL(actionURL); EncodedURLHiddenField encodedURLHiddenField = new EncodedURLHiddenField(); encodedURLHiddenField.setValue(encodedPartialActionURL); coreForm.getChildren().add(encodedURLHiddenField); } }