|
spring-web | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.web.util.TagUtils
public abstract class TagUtils
Utility class for tag library related code, exposing functionality
such as translating Strings to web scopes.
page will be transformed to
PageContext.PAGE_SCOPE
request will be transformed to
PageContext.REQUEST_SCOPE
session will be transformed to
PageContext.SESSION_SCOPE
application will be transformed to
PageContext.APPLICATION_SCOPE
| Field Summary | |
|---|---|
static java.lang.String |
SCOPE_APPLICATION
Constant identifying the application scope |
static java.lang.String |
SCOPE_PAGE
Constant identifying the page scope |
static java.lang.String |
SCOPE_REQUEST
Constant identifying the request scope |
static java.lang.String |
SCOPE_SESSION
Constant identifying the session scope |
| Constructor Summary | |
|---|---|
TagUtils()
|
|
| Method Summary | |
|---|---|
static void |
assertHasAncestorOfType(javax.servlet.jsp.tagext.Tag tag,
java.lang.Class ancestorTagClass,
java.lang.String tagName,
java.lang.String ancestorTagName)
Determine whether the supplied Tag has any ancestor tag
of the supplied type, throwing an IllegalStateException
if not. |
static int |
getScope(java.lang.String scope)
Determines the scope for a given input String. |
static boolean |
hasAncestorOfType(javax.servlet.jsp.tagext.Tag tag,
java.lang.Class ancestorTagClass)
Determine whether the supplied Tag has any ancestor tag
of the supplied type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SCOPE_PAGE
public static final java.lang.String SCOPE_REQUEST
public static final java.lang.String SCOPE_SESSION
public static final java.lang.String SCOPE_APPLICATION
| Constructor Detail |
|---|
public TagUtils()
| Method Detail |
|---|
public static int getScope(java.lang.String scope)
String.
If the String does not match 'request', 'session',
'page' or 'application', the method will return PageContext.PAGE_SCOPE.
scope - the String to inspect
PageContext.PAGE_SCOPE if no scope matched
java.lang.IllegalArgumentException - if the supplied scope is null
public static boolean hasAncestorOfType(javax.servlet.jsp.tagext.Tag tag,
java.lang.Class ancestorTagClass)
Tag has any ancestor tag
of the supplied type.
tag - the tag whose ancestors are to be checkedancestorTagClass - the ancestor Class being searched for
true if the supplied Tag has any ancestor tag
of the supplied type
java.lang.IllegalArgumentException - if either of the supplied arguments is null;
or if the supplied ancestorTagClass is not type-assignable to
the Tag class
public static void assertHasAncestorOfType(javax.servlet.jsp.tagext.Tag tag,
java.lang.Class ancestorTagClass,
java.lang.String tagName,
java.lang.String ancestorTagName)
Tag has any ancestor tag
of the supplied type, throwing an IllegalStateException
if not.
tag - the tag whose ancestors are to be checkedancestorTagClass - the ancestor Class being searched fortagName - the name of the tag; for example 'option'ancestorTagName - the name of the ancestor tag; for example 'select'
java.lang.IllegalStateException - if the supplied tag does not
have a tag of the supplied parentTagClass as an ancestor
java.lang.IllegalArgumentException - if any of the supplied arguments is null,
or in the case of the String-typed arguments, is composed wholly
of whitespace; or if the supplied ancestorTagClass is not
type-assignable to the Tag classhasAncestorOfType(javax.servlet.jsp.tagext.Tag, Class)
|
spring-web | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||