java.lang.Object
com.aoapps.taglib.AttributeUtils
- Author:
- AO Industries, Inc.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
appendWidthStyle
(String width, Appendable out) Appends a width style, while automatically appending "px" to any non-zero integer.static String
getWidthStyle
(String width) Gets a width style, while automatically appending "px" to any non-zero integer.static JspTagException
newDynamicAttributeFailedException
(String uri, String localName, Object value, List<String> expectedPatterns) Creates the exception for dynamic attribute failed.static <T> T
requireAttributeParent
(String fromTagName, JspTag from, String attribute, Class<? extends T> clazz) Finds the attribute parent tag of the provided class (or subclass).static <T> T
resolveValue
(Object value, Class<T> type, ELContext elContext) Deprecated.static <T> T
resolveValue
(ValueExpression expression, Class<T> type, ELContext elContext) Deprecated.Please useElUtils.resolveValue(javax.el.ValueExpression, java.lang.Class, javax.el.ELContext)
directly.
-
Field Details
-
RESOURCES
-
-
Method Details
-
requireAttributeParent
public static <T> T requireAttributeParent(String fromTagName, JspTag from, String attribute, Class<? extends T> clazz) throws NeedAttributeParentException Finds the attribute parent tag of the provided class (or subclass).- Returns:
- the parent tag
- Throws:
NeedAttributeParentException
- if parent not found- See Also:
-
resolveValue
@Deprecated public static <T> T resolveValue(ValueExpression expression, Class<T> type, ELContext elContext) Deprecated.Please useElUtils.resolveValue(javax.el.ValueExpression, java.lang.Class, javax.el.ELContext)
directly.Evaluates an expression then casts to the provided type. -
resolveValue
Deprecated.Please useElUtils.resolveValue(java.lang.Object, java.lang.Class, javax.el.ELContext)
directly.Casts or evaluates an expression then casts to the provided type. -
appendWidthStyle
Appends a width style, while automatically appending "px" to any non-zero integer. Encoding for XML attribute context is performed.- Returns:
true
when printed the style- Throws:
IOException
-
getWidthStyle
Gets a width style, while automatically appending "px" to any non-zero integer. No encoding is performed.- Returns:
- The style or
null
when none
-
newDynamicAttributeFailedException
public static JspTagException newDynamicAttributeFailedException(String uri, String localName, Object value, List<String> expectedPatterns) Creates the exception for dynamic attribute failed. Does not throw it.
-
ElUtils.resolveValue(java.lang.Object, java.lang.Class, javax.el.ELContext)
directly.