java.lang.Object
com.aoapps.taglib.AttributeUtils
- Author:
- AO Industries, Inc.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanappendWidthStyle(String width, Appendable out) Appends a width style, while automatically appending "px" to any non-zero integer.static StringgetWidthStyle(String width) Gets a width style, while automatically appending "px" to any non-zero integer.static JspTagExceptionnewDynamicAttributeFailedException(String uri, String localName, Object value, List<String> expectedPatterns) Creates the exception for dynamic attribute failed.static <T> TrequireAttributeParent(String fromTagName, JspTag from, String attribute, Class<? extends T> clazz) Finds the attribute parent tag of the provided class (or subclass).static <T> TresolveValue(ValueExpression expression, Class<T> type, ELContext elContext) Deprecated.static <T> TresolveValue(Object value, Class<T> type, ELContext elContext) Deprecated.Please useElUtils.resolveValue(java.lang.Object, java.lang.Class, jakarta.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.Evaluates an expression then casts to the provided type. -
resolveValue
Deprecated.Please useElUtils.resolveValue(java.lang.Object, java.lang.Class, jakarta.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:
truewhen 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
nullwhen 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(jakarta.el.ValueExpression, java.lang.Class, jakarta.el.ELContext)directly.