org.springframework.web.servlet.tags.form
Class TagIdGenerator
java.lang.Object
org.springframework.web.servlet.tags.form.TagIdGenerator
final class TagIdGenerator
- extends Object
Utility class for generating 'id
' attributes values for JSP tags. Given the
name of a tag (the data bound path in most cases) returns a unique ID for that name within
the current PageContext
. Each request for an ID for a given name will append an
ever increasing counter to the name itself. For instance, given the name 'person.name
',
the first request will give 'person.name1
' and the second will give
'person.name1
'. This supports the common use case where a set of radio or check buttons
are generated for the same data field, with each button being a distinct tag instance.
- Since:
- 2.0
- Author:
- Rob Harrop
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nextId
public static String nextId(String name,
PageContext pageContext)
- Gets the next unique ID (withing the given
PageContext
) for the supplied name.
Copyright © 2002-2006 The Spring Framework.