java.lang.Object
com.aoapps.taglib.PropertyUtils
Resolves objects from scope, name, and property values.
- Author:
- AO Industries, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
findObject
(ScopeEE.Page.Attribute<T> attribute, JspContext jspContext, String scope, String property, boolean beanRequired, boolean valueRequired) Gets the object given its scope, name, and optional property.static Object
findObject
(PageContext pageContext, String scope, String name, String property, boolean beanRequired, boolean valueRequired) Gets the object given its scope, name, and optional property.static <T> void
setAttribute
(ScopeEE.Page.Attribute<T> attribute, JspContext jspContext, String scope, T value) Sets an attribute in the provided textual scope.static void
setAttribute
(PageContext pageContext, String scope, String name, Object value) Sets an attribute in the provided textual scope.
-
Method Details
-
setAttribute
public static <T> void setAttribute(ScopeEE.Page.Attribute<T> attribute, JspContext jspContext, String scope, T value) throws LocalizedIllegalArgumentException Sets an attribute in the provided textual scope.- Throws:
LocalizedIllegalArgumentException
- See Also:
-
setAttribute
public static void setAttribute(PageContext pageContext, String scope, String name, Object value) throws LocalizedIllegalArgumentException Sets an attribute in the provided textual scope.- Throws:
LocalizedIllegalArgumentException
- See Also:
-
findObject
public static <T> T findObject(ScopeEE.Page.Attribute<T> attribute, JspContext jspContext, String scope, String property, boolean beanRequired, boolean valueRequired) throws JspTagException Gets the object given its scope, name, and optional property.- Parameters:
scope
- SeeScopeEE.Page.getScopeId(java.lang.String)
beanRequired
- whentrue
, this method will not returnnull
, instead it will throw aJspTagException
with an appropriate localized message.valueRequired
- whentrue
, this method will not returnnull
, instead it will throw aJspTagException
with an appropriate localized message.- Returns:
- the resolved
Object
ornull
if not found. - Throws:
JspTagException
-
findObject
public static Object findObject(PageContext pageContext, String scope, String name, String property, boolean beanRequired, boolean valueRequired) throws JspTagException Gets the object given its scope, name, and optional property.- Parameters:
scope
- SeeScopeEE.Page.getScopeId(java.lang.String)
beanRequired
- whentrue
, this method will not returnnull
, instead it will throw aJspTagException
with an appropriate localized message.valueRequired
- whentrue
, this method will not returnnull
, instead it will throw aJspTagException
with an appropriate localized message.- Returns:
- the resolved
Object
ornull
if not found. - Throws:
JspTagException
-