String existingPlaceholder = AssetRequestContext.get(pageContext.getRequest()).getJsPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new JspException(
String existingPlaceholder = AssetRequestContext.get(pageContext.getRequest()).getJsPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new JspException(
private void handlePlaceholder(String attributeValue, AssetRequestContext arc, String placeholder) { if (PLACEHOLDER_TYPE_JS.equalsIgnoreCase(attributeValue)) { String existingPlaceholder = arc.getJsPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new DandelionException( "The placeholder type \"" + PLACEHOLDER_TYPE_JS + "\" can be used only once in the same page"); } else { arc.setJsPlaceholder(placeholder); } } else if (PLACEHOLDER_TYPE_CSS.equalsIgnoreCase(attributeValue)) { String existingPlaceholder = arc.getCssPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new DandelionException( "The placeholder type \"" + PLACEHOLDER_TYPE_CSS + "\" can be used only once in the same page"); } else { arc.setCssPlaceholder(placeholder); } } else { throw new DandelionException("Only \"" + PLACEHOLDER_TYPE_JS + "\" and \"" + PLACEHOLDER_TYPE_CSS + "\" are allowed in the \"placeholder-*\" attributes"); } } }
private void handlePlaceholder(String attributeValue, AssetRequestContext arc, String placeholder) { if (PLACEHOLDER_TYPE_JS.equalsIgnoreCase(attributeValue)) { String existingPlaceholder = arc.getJsPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new DandelionException( "The placeholder type \"" + PLACEHOLDER_TYPE_JS + "\" can be used only once in the same page"); } else { arc.setJsPlaceholder(placeholder); } } else if (PLACEHOLDER_TYPE_CSS.equalsIgnoreCase(attributeValue)) { String existingPlaceholder = arc.getCssPlaceholder(); if (StringUtils.isNotBlank(existingPlaceholder)) { throw new DandelionException( "The placeholder type \"" + PLACEHOLDER_TYPE_CSS + "\" can be used only once in the same page"); } else { arc.setCssPlaceholder(placeholder); } } else { throw new DandelionException("Only \"" + PLACEHOLDER_TYPE_JS + "\" and \"" + PLACEHOLDER_TYPE_CSS + "\" are allowed in the \"placeholder-*\" attributes"); } } }
String jsPlaceholder = arc.getJsPlaceholder();
String jsPlaceholder = arc.getJsPlaceholder();