/** * Autogenerate the '{@code id}' attribute value for this tag. * <p>The default implementation simply delegates to {@link #getName()}, * deleting invalid characters (such as "[" or "]"). */ @Nullable protected String autogenerateId() throws JspException { String name = getName(); return (name != null ? StringUtils.deleteAny(name, "[]") : null); }
/** * Autogenerate the '{@code id}' attribute value for this tag. * <p>The default implementation simply delegates to {@link #getName()}, * deleting invalid characters (such as "[" or "]"). */ @Nullable protected String autogenerateId() throws JspException { String name = getName(); return (name != null ? StringUtils.deleteAny(name, "[]") : null); }
/** * Writes the default set of attributes to the supplied {@link TagWriter}. * Further abstract sub-classes should override this method to add in * any additional default attributes but <strong>must</strong> remember * to call the {@code super} method. * <p>Concrete sub-classes should call this method when/if they want * to render default attributes. * @param tagWriter the {@link TagWriter} to which any attributes are to be written */ protected void writeDefaultAttributes(TagWriter tagWriter) throws JspException { writeOptionalAttribute(tagWriter, "id", resolveId()); writeOptionalAttribute(tagWriter, "name", getName()); }
/** * Writes the default set of attributes to the supplied {@link TagWriter}. * Further abstract sub-classes should override this method to add in * any additional default attributes but <strong>must</strong> remember * to call the {@code super} method. * <p>Concrete sub-classes should call this method when/if they want * to render default attributes. * @param tagWriter the {@link TagWriter} to which any attributes are to be written */ protected void writeDefaultAttributes(TagWriter tagWriter) throws JspException { writeOptionalAttribute(tagWriter, "id", resolveId()); writeOptionalAttribute(tagWriter, "name", getName()); }
/** * Autogenerate the '{@code id}' attribute value for this tag. * <p>The default implementation simply delegates to {@link #getName()}, * deleting invalid characters (such as "[" or "]"). */ protected String autogenerateId() throws JspException { return StringUtils.deleteAny(getName(), "[]"); }
/** * Writes the default set of attributes to the supplied {@link TagWriter}. * Further abstract sub-classes should override this method to add in * any additional default attributes but <strong>must</strong> remember * to call the {@code super} method. * <p>Concrete sub-classes should call this method when/if they want * to render default attributes. * @param tagWriter the {@link TagWriter} to which any attributes are to be written */ protected void writeDefaultAttributes(TagWriter tagWriter) throws JspException { writeOptionalAttribute(tagWriter, "id", resolveId()); writeOptionalAttribute(tagWriter, "name", getName()); }