/** * Discover if the given id is a {@link UrlMapping} id specified in the current configuration. * * @return True if the id is found, false if not. */ public boolean isMappingId(final String id) { UrlMapping mapping = getMappingById(id); return mapping instanceof UrlMapping; }
/** * Discover if the given id is a {@link UrlMapping} id specified in the current configuration. * * @return True if the id is found, false if not. */ public boolean isMappingId(final String id) { UrlMapping mapping = getMappingById(id); return mapping instanceof UrlMapping; }
/** * Discover if the given id is a {@link UrlMapping} id specified in the current configuration. * * @return True if the id is found, false if not. */ public boolean isMappingId(final String id) { UrlMapping mapping = getMappingById(id); return mapping instanceof UrlMapping; }
/** * Discover if the given id is a {@link UrlMapping} id specified in the current configuration. * * @return True if the id is found, false if not. */ public boolean isMappingId(final String id) { UrlMapping mapping = getMappingById(id); return mapping instanceof UrlMapping; }
UrlMapping urlMapping = prettyConfig.getMappingById(mappingId);
UrlMapping urlMapping = prettyConfig.getMappingById(mappingId);
UrlMapping urlMapping = prettyConfig.getMappingById(mappingId);
@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); } }
UrlMapping mapping = prettyContext.getConfig().getMappingById(mappingId.trim()); if (mapping == null)
UrlMapping mapping = prettyContext.getConfig().getMappingById(mappingId.trim()); if (mapping == null)
private void createAncestry(PrettyConfig config, UrlMapping m) { if (m.hasParent() && !seen.contains(m)) { UrlMapping parent = config.getMappingById(m.getParentId()); if (parent == null) { throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":" + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration."); } if (parent.hasParent()) { createAncestry(config, parent); } m.setPattern(parent.getPattern() + m.getPattern()); mergeValidators(parent, m); mergeActions(parent, m); mergeQueryParams(parent, m); seen.add(m); } }
private void createAncestry(PrettyConfig config, UrlMapping m) { if (m.hasParent() && !seen.contains(m)) { UrlMapping parent = config.getMappingById(m.getParentId()); if (parent == null) { throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":" + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration."); } if (parent.hasParent()) { createAncestry(config, parent); } m.setPattern(parent.getPattern() + m.getPattern()); mergeValidators(parent, m); mergeActions(parent, m); mergeQueryParams(parent, m); seen.add(m); } }
private void createAncestry(PrettyConfig config, UrlMapping m) { if (m.hasParent() && !seen.contains(m)) { UrlMapping parent = config.getMappingById(m.getParentId()); if (parent == null) { throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":" + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration."); } if (parent.hasParent()) { createAncestry(config, parent); } m.setPattern(parent.getPattern() + m.getPattern()); mergeValidators(parent, m); mergeActions(parent, m); mergeQueryParams(parent, m); seen.add(m); } }
private void createAncestry(PrettyConfig config, UrlMapping m) { if (m.hasParent() && !seen.contains(m)) { UrlMapping parent = config.getMappingById(m.getParentId()); if (parent == null) { throw new PrettyException("Error when building configuration for URL-mapping [" + m.getId() + ":" + m.getPattern() + "] - the requested parentId [" + m.getParentId() + "] does not exist in the configuration."); } if (parent.hasParent()) { createAncestry(config, parent); } m.setPattern(parent.getPattern() + m.getPattern()); mergeValidators(parent, m); mergeActions(parent, m); mergeQueryParams(parent, m); seen.add(m); } }
UrlMapping mapping = config.getMappingById(outcome); String viewId = mapping.getViewId(); if (mapping.isDynaView())
UrlMapping mapping = config.getMappingById(outcome); String viewId = mapping.getViewId(); if (mapping.isDynaView())
UrlMapping mapping = config.getMappingById(action); if (mapping != null)
UrlMapping mapping = config.getMappingById(action); if (mapping != null)
UrlMapping mapping = config.getMappingById(action); if (mapping != null)
urlMapping = context.getConfig().getMappingById(viewId); viewId = urlMapping.getViewId(); ExtractedValuesURLBuilder builder = new ExtractedValuesURLBuilder();