public final class RenderKitUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RenderKitUtils.Attributes |
static class |
RenderKitUtils.ScriptHashVariableWrapper
Wrapper class around object value used to transform values into particular JS objects
|
Modifier and Type | Method and Description |
---|---|
static void |
addToScriptHash(Map<String,Object> hash,
javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
RenderKitUtils.Attributes attributes,
RenderKitUtils.ScriptHashVariableWrapper wrapper) |
static void |
addToScriptHash(Map<String,Object> hash,
String name,
Object value) |
static void |
addToScriptHash(Map<String,Object> hash,
String name,
Object value,
Object defaultValue) |
static void |
addToScriptHash(Map<String,Object> hash,
String name,
Object value,
Object defaultValue,
RenderKitUtils.ScriptHashVariableWrapper wrapper)
Puts value into map under specified key if the value is not empty and not default.
|
static String[] |
asArray(Object object) |
static RenderKitUtils.Attributes |
attributes() |
static RenderKitUtils.Attributes |
attributes(Enum<?>... attrs) |
static RenderKitUtils.Attributes |
attributes(String... attrs) |
static String |
decodeBehaviors(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
static <T> T |
evaluateAttribute(String attribute,
javax.faces.component.UIComponent component,
javax.faces.context.FacesContext context)
Tries to evaluate an attribute as
ValueExpression . |
static Object |
getAttributeAndBehaviorsValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentAttribute componentAttribute) |
static String |
getBehaviorSourceId(javax.faces.context.FacesContext facesContext) |
static Object |
getFirstNonEmptyAttribute(String attributeName,
javax.faces.component.UIComponent... components) |
static Object |
getFirstNonEmptyAttribute(String attributeName,
javax.faces.component.UIComponent component) |
static Object |
getFirstNonEmptyAttribute(String attributeName,
javax.faces.component.UIComponent componentA,
javax.faces.component.UIComponent componentB) |
static String |
getResourcePath(javax.faces.context.FacesContext context,
String library,
String resourceName) |
static String |
getResourceURL(String url,
javax.faces.context.FacesContext context) |
static boolean |
hasFacet(javax.faces.component.UIComponent component,
String facetName) |
static String |
prefixAttributeName(String attributeName,
boolean isXhtmlMode) |
static String |
prefixAttributeName(String attributeName,
javax.faces.context.ResponseWriter responseWriter) |
static void |
renderAttribute(javax.faces.context.FacesContext facesContext,
String attributeName,
Object attributeValue) |
static void |
renderAttributeAndBehaviors(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentAttribute componentAttribute) |
static void |
renderPassThroughAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Collection<ComponentAttribute> attributes) |
static void |
renderPassThroughAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Map<String,ComponentAttribute> knownAttributesMap) |
static void |
renderPassThroughAttributesOptimized(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
Map<String,ComponentAttribute> knownAttributesMap) |
static boolean |
shouldRenderAttribute(Object attributeValue) |
static String |
toScriptArgs(Object... objects) |
public static boolean shouldRenderAttribute(Object attributeValue)
public static String prefixAttributeName(String attributeName, boolean isXhtmlMode)
public static String prefixAttributeName(String attributeName, javax.faces.context.ResponseWriter responseWriter)
public static void renderAttribute(javax.faces.context.FacesContext facesContext, String attributeName, Object attributeValue) throws IOException
IOException
public static Object getAttributeAndBehaviorsValue(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, ComponentAttribute componentAttribute)
public static void renderAttributeAndBehaviors(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, ComponentAttribute componentAttribute) throws IOException
IOException
public static void renderPassThroughAttributesOptimized(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Map<String,ComponentAttribute> knownAttributesMap) throws IOException
IOException
public static void renderPassThroughAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Map<String,ComponentAttribute> knownAttributesMap) throws IOException
IOException
public static void renderPassThroughAttributes(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Collection<ComponentAttribute> attributes) throws IOException
IOException
public static String decodeBehaviors(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public static RenderKitUtils.Attributes attributes()
public static RenderKitUtils.Attributes attributes(Enum<?>... attrs)
public static RenderKitUtils.Attributes attributes(String... attrs)
public static void addToScriptHash(Map<String,Object> hash, String name, Object value)
public static void addToScriptHash(Map<String,Object> hash, String name, Object value, Object defaultValue)
public static void addToScriptHash(Map<String,Object> hash, String name, Object value, Object defaultValue, RenderKitUtils.ScriptHashVariableWrapper wrapper)
hash
- name
- value
- defaultValue
- wrapper
- public static void addToScriptHash(Map<String,Object> hash, javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, RenderKitUtils.Attributes attributes, RenderKitUtils.ScriptHashVariableWrapper wrapper)
public static String getResourcePath(javax.faces.context.FacesContext context, String library, String resourceName)
public static String getResourceURL(String url, javax.faces.context.FacesContext context)
public static Object getFirstNonEmptyAttribute(String attributeName, javax.faces.component.UIComponent component)
public static Object getFirstNonEmptyAttribute(String attributeName, javax.faces.component.UIComponent componentA, javax.faces.component.UIComponent componentB)
public static Object getFirstNonEmptyAttribute(String attributeName, javax.faces.component.UIComponent... components)
public static String getBehaviorSourceId(javax.faces.context.FacesContext facesContext)
public static boolean hasFacet(javax.faces.component.UIComponent component, String facetName)
public static <T> T evaluateAttribute(String attribute, javax.faces.component.UIComponent component, javax.faces.context.FacesContext context)
ValueExpression
. If the attribute doesn't hold ValueExpression
or the
expression evaluates to null, the value of the attribute is returned.attribute
- the name of a component's attributecomponent
- the componentcontext
- the contextValueExpression
for a given attribute or the value of the attribute (in case the attribute
isn't ValueExpression
or it evaluates to null)Copyright © 2014 JBoss by Red Hat. All Rights Reserved.