org.richfaces.renderkit
Class RenderKitUtils
java.lang.Object
org.richfaces.renderkit.RenderKitUtils
public final class RenderKitUtils
- extends java.lang.Object
- Author:
- Nick Belaevski
Method Summary |
static void |
addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
RenderKitUtils.Attributes attributes,
RenderKitUtils.ScriptHashVariableWrapper wrapper)
|
static void |
addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value)
|
static void |
addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue)
|
static void |
addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue,
RenderKitUtils.ScriptHashVariableWrapper wrapper)
Puts value into map under specified key if the value is not empty and not default. |
static RenderKitUtils.Attributes |
attributes()
|
static RenderKitUtils.Attributes |
attributes(java.lang.Enum<?>... attrs)
|
static RenderKitUtils.Attributes |
attributes(java.lang.String... attrs)
|
static java.lang.String |
decodeBehaviors(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
static java.lang.Object |
getAttributeAndBehaviorsValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentAttribute componentAttribute)
|
static java.lang.String |
getBehaviorSourceId(javax.faces.context.FacesContext facesContext)
|
static java.lang.Object |
getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent... components)
|
static java.lang.Object |
getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent component)
|
static java.lang.Object |
getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent componentA,
javax.faces.component.UIComponent componentB)
|
static java.lang.String |
getResourcePath(javax.faces.context.FacesContext context,
java.lang.String library,
java.lang.String resourceName)
|
static java.lang.String |
getResourceURL(java.lang.String url,
javax.faces.context.FacesContext context)
|
static java.lang.String |
prefixAttributeName(java.lang.String attributeName,
boolean isXhtmlMode)
|
static java.lang.String |
prefixAttributeName(java.lang.String attributeName,
javax.faces.context.ResponseWriter responseWriter)
|
static void |
renderAttribute(javax.faces.context.FacesContext facesContext,
java.lang.String attributeName,
java.lang.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,
java.util.Collection<ComponentAttribute> attributes)
|
static void |
renderPassThroughAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,ComponentAttribute> knownAttributesMap)
|
static void |
renderPassThroughAttributesOptimized(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,ComponentAttribute> knownAttributesMap)
|
static boolean |
shouldRenderAttribute(java.lang.Object attributeValue)
|
static java.lang.String |
toScriptArgs(java.lang.Object... objects)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shouldRenderAttribute
public static boolean shouldRenderAttribute(java.lang.Object attributeValue)
prefixAttributeName
public static java.lang.String prefixAttributeName(java.lang.String attributeName,
boolean isXhtmlMode)
prefixAttributeName
public static java.lang.String prefixAttributeName(java.lang.String attributeName,
javax.faces.context.ResponseWriter responseWriter)
renderAttribute
public static void renderAttribute(javax.faces.context.FacesContext facesContext,
java.lang.String attributeName,
java.lang.Object attributeValue)
throws java.io.IOException
- Throws:
java.io.IOException
getAttributeAndBehaviorsValue
public static java.lang.Object getAttributeAndBehaviorsValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentAttribute componentAttribute)
renderAttributeAndBehaviors
public static void renderAttributeAndBehaviors(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
ComponentAttribute componentAttribute)
throws java.io.IOException
- Throws:
java.io.IOException
renderPassThroughAttributesOptimized
public static void renderPassThroughAttributesOptimized(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,ComponentAttribute> knownAttributesMap)
throws java.io.IOException
- Throws:
java.io.IOException
renderPassThroughAttributes
public static void renderPassThroughAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,ComponentAttribute> knownAttributesMap)
throws java.io.IOException
- Throws:
java.io.IOException
renderPassThroughAttributes
public static void renderPassThroughAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Collection<ComponentAttribute> attributes)
throws java.io.IOException
- Throws:
java.io.IOException
decodeBehaviors
public static java.lang.String decodeBehaviors(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
attributes
public static RenderKitUtils.Attributes attributes()
attributes
public static RenderKitUtils.Attributes attributes(java.lang.Enum<?>... attrs)
attributes
public static RenderKitUtils.Attributes attributes(java.lang.String... attrs)
addToScriptHash
public static void addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value)
addToScriptHash
public static void addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue)
addToScriptHash
public static void addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
java.lang.String name,
java.lang.Object value,
java.lang.Object defaultValue,
RenderKitUtils.ScriptHashVariableWrapper wrapper)
- Puts value into map under specified key if the value is not empty and not default. Performs optional value wrapping.
- Parameters:
hash
- name
- value
- defaultValue
- wrapper
- - Since:
- 3.3.2
addToScriptHash
public static void addToScriptHash(java.util.Map<java.lang.String,java.lang.Object> hash,
javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
RenderKitUtils.Attributes attributes,
RenderKitUtils.ScriptHashVariableWrapper wrapper)
toScriptArgs
public static java.lang.String toScriptArgs(java.lang.Object... objects)
getResourcePath
public static java.lang.String getResourcePath(javax.faces.context.FacesContext context,
java.lang.String library,
java.lang.String resourceName)
getResourceURL
public static java.lang.String getResourceURL(java.lang.String url,
javax.faces.context.FacesContext context)
getFirstNonEmptyAttribute
public static java.lang.Object getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent component)
getFirstNonEmptyAttribute
public static java.lang.Object getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent componentA,
javax.faces.component.UIComponent componentB)
getFirstNonEmptyAttribute
public static java.lang.Object getFirstNonEmptyAttribute(java.lang.String attributeName,
javax.faces.component.UIComponent... components)
getBehaviorSourceId
public static java.lang.String getBehaviorSourceId(javax.faces.context.FacesContext facesContext)
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.