public boolean isMappingId(final String action) { PrettyUrlMapping mapping = getMappingById(action); return mapping instanceof PrettyUrlMapping; }
public String buildMappedUrl(final UIComponent component) { 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(FacesContext.getCurrentInstance()) + ">"); } PrettyContext prettyContext = PrettyContext.getCurrentInstance(); PrettyConfig prettyConfig = prettyContext.getConfig(); PrettyUrlMapping urlMapping = prettyConfig.getMappingById(mappingId); return buildMappedUrl(urlMapping, extractParameters(component)); }
PrettyUrlMapping mapping = config.getMappingById(action); if (mapping != null)
urlMapping = getConfig().getMappingById(viewId); viewId = urlMapping.getViewId(); calculatedUri = new MappingUrlBuilder().getURL(urlMapping);