- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {}
String var = (String) urlBuffer.getAttributes().get("var"); String relative = (String) urlBuffer.getAttributes().get("relative");
String var = (String) urlBuffer.getAttributes().get("var"); String relative = (String) urlBuffer.getAttributes().get("relative");
String var = (String) urlBuffer.getAttributes().get("var"); String relative = (String) urlBuffer.getAttributes().get("relative");
@Override public void encodeBegin(final FacesContext context, final UIComponent component) throws IOException { super.encodeBegin(context, component); if (!component.isRendered()) { return; } UrlBuffer urlBuffer = (UrlBuffer) component; String var = (String) urlBuffer.getAttributes().get("var"); String mappingId = (String) component.getAttributes().get("mappingId"); if (mappingId == null) { throw new PrettyException("Mapping id was null when attempting to build URL for component: " + component.toString() + " <" + component.getClientId(context) + ">"); } PrettyContext prettyContext = PrettyContext.getCurrentInstance(context); PrettyConfig prettyConfig = prettyContext.getConfig(); UrlMapping urlMapping = prettyConfig.getMappingById(mappingId); String href = context.getExternalContext().getRequestContextPath() + urlBuilder.build(urlMapping, true, urlBuilder.extractParameters(component)); context.getExternalContext().getRequestMap().put(var, href); } }