/** * Return a unique ID for the bound name within the current PageContext. */ @Override @Nullable protected String autogenerateId() throws JspException { String id = super.autogenerateId(); return (id != null ? TagIdGenerator.nextId(id, this.pageContext) : null); }
/** * Appends a counter to a specified id, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return null; }
/** * Appends a counter to a specified id as well, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return autogenerateId(); }
/** * Return a unique ID for the bound name within the current PageContext. */ @Override @Nullable protected String autogenerateId() throws JspException { String id = super.autogenerateId(); return (id != null ? TagIdGenerator.nextId(id, this.pageContext) : null); }
/** * Appends a counter to a specified id, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return null; }
private void assertNextId() { PageContext pageContext = new MockPageContext(); assertEquals("foo1", TagIdGenerator.nextId("foo", pageContext)); assertEquals("foo2", TagIdGenerator.nextId("foo", pageContext)); assertEquals("foo3", TagIdGenerator.nextId("foo", pageContext)); assertEquals("foo4", TagIdGenerator.nextId("foo", pageContext)); assertEquals("bar1", TagIdGenerator.nextId("bar", pageContext)); }
/** * Appends a counter to a specified id as well, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return autogenerateId(); }
/** * Appends a counter to a specified id, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return null; }
/** * Return a unique ID for the bound name within the current PageContext. */ @Override protected String autogenerateId() throws JspException { return TagIdGenerator.nextId(super.autogenerateId(), this.pageContext); }
/** * Appends a counter to a specified id as well, * since we're dealing with multiple HTML elements. */ @Override protected String resolveId() throws JspException { Object id = evaluate("id", getId()); if (id != null) { String idString = id.toString(); return (StringUtils.hasText(idString) ? TagIdGenerator.nextId(idString, this.pageContext) : null); } return autogenerateId(); }