/** * <p> * Escapes the characters in a {@code String} using XML entities only if the * passed boolean is {@code true}. * * @param str * the {@code String} to escape. * @return a new escaped {@code String} if {@code shouldEscape} is set to * {@code true}, an unchanged {@code String} otherwise. */ public static String escape(boolean shouldEscape, String src) { if (shouldEscape) { return escape(src); } return src; }
/** * <p> * Escapes the characters in a {@code String} using XML entities only if the * passed boolean is {@code true}. * * @param str * the {@code String} to escape. * @return a new escaped {@code String} if {@code shouldEscape} is set to * {@code true}, an unchanged {@code String} otherwise. */ public static String escape(boolean shouldEscape, String src) { if (shouldEscape) { return escape(src); } return src; }
rowId.append(StringUtils.escape(this.escapeXml, this.rowIdPrefix)); try { Object propertyValue = PropertyUtils.getNestedProperty(this.currentObject, StringUtils.escape(this.escapeXml, this.rowIdBase)); rowId.append(propertyValue != null ? propertyValue : ""); rowId.append(StringUtils.escape(this.escapeXml, this.rowIdSuffix));
rowId.append(StringUtils.escape(this.escapeXml, this.rowIdPrefix)); try { Object propertyValue = PropertyUtils.getNestedProperty(this.currentObject, StringUtils.escape(this.escapeXml, this.rowIdBase)); rowId.append(propertyValue != null ? propertyValue : ""); rowId.append(StringUtils.escape(this.escapeXml, this.rowIdSuffix));
return StringUtils.escape(propertyValue.toString());
return StringUtils.escape(propertyValue.toString());
conf.setLabel(StringUtils.escape(this.escapeXml, this.label.trim()));
conf.setLabel(StringUtils.escape(this.escapeXml, this.label.trim()));
String columnTitle = StringUtils.escape(this.escapeXml, this.title); if (parent.getTable().getTableConfiguration().getMessageResolver() != null) { columnTitle = parent.getTable().getTableConfiguration().getMessageResolver().getResource(this.titleKey, StringUtils.escape(this.escapeXml, this.property), this.pageContext);
String columnTitle = StringUtils.escape(this.escapeXml, this.title); if (parent.getTable().getTableConfiguration().getMessageResolver() != null) { columnTitle = parent.getTable().getTableConfiguration().getMessageResolver().getResource(this.titleKey, StringUtils.escape(this.escapeXml, this.property), this.pageContext);
@Override public int doEndTag() throws JspException { TableTag parent = (TableTag) findAncestorWithClass(this, TableTag.class); // The tag is evaluated only once, at the first iteration if (parent.isFirstIteration()) { ExtraHtml extraHtml = new ExtraHtml(); extraHtml.setUid(this.uid); extraHtml.setContainer( StringUtils.isNotBlank(this.container) ? StringUtils.escape(this.escapeXml, this.container) : "div"); extraHtml.setCssStyle(this.cssStyle); extraHtml.setCssClass(this.cssClass); if (getBodyContent() != null) { extraHtml.setContent(getBodyContent().getString().replaceAll("[\n\r]", "").trim()); } parent.getTable().getTableConfiguration().addExtraHtmlSnippet(extraHtml); parent.getTable().getTableConfiguration().registerExtension(new ExtraHtmlFeature()); } return EVAL_PAGE; }
@Override public int doEndTag() throws JspException { TableTag parent = (TableTag) findAncestorWithClass(this, TableTag.class); // The tag is evaluated only once, at the first iteration if (parent.isFirstIteration()) { ExtraHtml extraHtml = new ExtraHtml(); extraHtml.setUid(this.uid); extraHtml.setContainer( StringUtils.isNotBlank(this.container) ? StringUtils.escape(this.escapeXml, this.container) : "div"); extraHtml.setCssStyle(this.cssStyle); extraHtml.setCssClass(this.cssClass); if (getBodyContent() != null) { extraHtml.setContent(getBodyContent().getString().replaceAll("[\n\r]", "").trim()); } parent.getTable().getTableConfiguration().addExtraHtmlSnippet(extraHtml); parent.getTable().getTableConfiguration().registerExtension(new ExtraHtmlFeature()); } return EVAL_PAGE; }
@Override public int doEndTag() throws JspException { TableTag parent = (TableTag) findAncestorWithClass(this, TableTag.class); // The tag is evaluated only once, at the first iteration if (parent.isFirstIteration()) { HtmlCaption caption = new HtmlCaption(); caption.setId(this.id); caption.addCssClass(this.cssClass); caption.addCssStyle(this.cssStyle); caption.setTitle(StringUtils.escape(this.escapeXml, this.title)); caption.addContent(getBodyContent().getString()); parent.getTable().setCaption(caption); } return EVAL_PAGE; }
@Override public int doEndTag() throws JspException { TableTag parent = (TableTag) findAncestorWithClass(this, TableTag.class); // The tag is evaluated only once, at the first iteration if (parent.isFirstIteration()) { HtmlCaption caption = new HtmlCaption(); caption.setId(this.id); caption.addCssClass(this.cssClass); caption.addCssStyle(this.cssStyle); caption.setTitle(StringUtils.escape(this.escapeXml, this.title)); caption.addContent(getBodyContent().getString()); parent.getTable().setCaption(caption); } return EVAL_PAGE; }