Modifier and Type | Method and Description |
---|---|
static boolean |
getBoolean(FaceletContext context,
TagAttribute tagAttribute)
Returns the boolean value of the given tag attribute.
|
static Object |
getObject(FaceletContext context,
TagAttribute tagAttribute)
Returns the Object value of the given tag attribute
|
static <T> T |
getObject(FaceletContext context,
TagAttribute tagAttribute,
Class<?> type)
Returns the typed Object value of the given tag attribute
|
static String |
getString(FaceletContext context,
TagAttribute tagAttribute)
Returns the String value of the given tag attribute.
|
static String |
getStringLiteral(TagAttribute tagAttribute,
String name)
Returns the String literal of the given tag attribute.
|
static ValueExpression |
getValueExpression(FaceletContext context,
TagAttribute tagAttribute,
Class<?> type)
Returns the value of the given tag attribute as a value expression, so it can be carried around and evaluated at
a later moment in the lifecycle without needing the Facelet context.
|
public static String getString(FaceletContext context, TagAttribute tagAttribute)
context
- The involved Facelet context.tagAttribute
- The tag attribute to retrieve the value from.public static String getStringLiteral(TagAttribute tagAttribute, String name)
tagAttribute
- The tag attribute to retrieve the value from.name
- The tag attribute name; this is only used in exception message.IllegalArgumentException
- When the attribute is not a literal.public static boolean getBoolean(FaceletContext context, TagAttribute tagAttribute)
context
- The involved Facelet context.tagAttribute
- The tag attribute to retrieve the value from.public static Object getObject(FaceletContext context, TagAttribute tagAttribute)
context
- The involved Facelet context.tagAttribute
- The tag attribute to retrieve the value from.public static <T> T getObject(FaceletContext context, TagAttribute tagAttribute, Class<?> type)
T
- The expected return type.context
- The involved Facelet context.tagAttribute
- The tag attribute to retrieve the value from.type
- The expected type of the Object value.ClassCastException
- When T
is of wrong type.public static ValueExpression getValueExpression(FaceletContext context, TagAttribute tagAttribute, Class<?> type)
context
- The involved Facelet context.tagAttribute
- The tag attribute to extract the value expression from.type
- The expected type of the value behind the value expression.Copyright © 2012–2020 OmniFaces. All rights reserved.