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> TfindObject(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 ObjectfindObject(PageContext pageContext, String scope, String name, String property, boolean beanRequired, boolean valueRequired) Gets the object given its scope, name, and optional property.static <T> voidsetAttribute(ScopeEE.Page.Attribute<T> attribute, JspContext jspContext, String scope, T value) Sets an attribute in the provided textual scope.static voidsetAttribute(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 aJspTagExceptionwith an appropriate localized message.valueRequired- whentrue, this method will not returnnull, instead it will throw aJspTagExceptionwith an appropriate localized message.- Returns:
- the resolved
Objectornullif 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 aJspTagExceptionwith an appropriate localized message.valueRequired- whentrue, this method will not returnnull, instead it will throw aJspTagExceptionwith an appropriate localized message.- Returns:
- the resolved
Objectornullif not found. - Throws:
JspTagException
-
