org.primefaces.extensions.util
Class ComponentUtils

java.lang.Object
  extended by org.primefaces.util.ComponentUtils
      extended by org.primefaces.extensions.util.ComponentUtils

public class ComponentUtils
extends org.primefaces.util.ComponentUtils

Component utils for this project.

Since:
0.2
Version:
$Revision$
Author:
Oleg Varaksin / last modified by $Author$

Method Summary
static void addComponentResource(javax.faces.context.FacesContext context, java.lang.String name)
           
static void addComponentResource(javax.faces.context.FacesContext context, java.lang.String name, java.lang.String library, java.lang.String target)
           
static java.lang.String escapeComponentId(java.lang.String id)
           
static char[] escapeHtmlTextInJson(char[] text)
           
static java.lang.String escapeHtmlTextInJson(java.lang.String text)
           
static java.lang.String escapeSelector(java.lang.String value)
          NOTE: COPIED FROM TOBAGO.
static char[] escapeText(char[] text)
          Duplicate code from json-simple project under apache license http://code.google.com/p/json-simple/source/browse/trunk/src/org/json/simple/JSONValue.java
static java.lang.String escapeText(java.lang.String text)
          Duplicate code from json-simple project under apache license http://code.google.com/p/json-simple/source/browse/trunk/src/org/json/simple/JSONValue.java
static java.util.List<javax.faces.component.UIComponent> findComponents(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source, java.lang.String list)
           
static java.lang.String findTarget(javax.faces.context.FacesContext context, Attachable attachable)
           
static java.lang.String findTarget(javax.faces.context.FacesContext context, Attachable attachable, javax.faces.component.behavior.ClientBehaviorContext cbContext)
           
static java.lang.Object getConvertedSubmittedValue(javax.faces.context.FacesContext fc, javax.faces.component.EditableValueHolder evh)
           
static javax.faces.convert.Converter getConverter(javax.faces.context.FacesContext fc, javax.faces.component.UIComponent component)
           
static javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext fc, javax.faces.component.UIComponent component)
           
static boolean isAjaxifiedComponent(javax.faces.component.UIComponent component)
           
static java.util.Locale resolveLocale(java.lang.Object locale)
          Gets a Locale instance by the value of the component attribute "locale" which can be String or Locale or null.
static java.util.TimeZone resolveTimeZone(java.lang.Object timeZone)
          Gets a TimeZone instance by the value of the component attribute "timeZone" which can be String or TimeZone or null.
 
Methods inherited from class org.primefaces.util.ComponentUtils
considerEmptyStringAsNull, createSelectItems, decorateAttribute, escapeJQueryId, findClientIds, findComponent, findComponentClientId, findParentForm, findParentNamingContainer, findParentUniqueIdVendor, getConverter, getValueToRender, getWidgetVar, isBeansValidationAvailable, isLiteralText, isPartialSubmitEnabled, isRTL, isValueBlank, toLocale, validateEmptyFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

escapeComponentId

public static java.lang.String escapeComponentId(java.lang.String id)

findComponents

public static java.util.List<javax.faces.component.UIComponent> findComponents(javax.faces.context.FacesContext context,
                                                                               javax.faces.component.UIComponent source,
                                                                               java.lang.String list)

findTarget

public static java.lang.String findTarget(javax.faces.context.FacesContext context,
                                          Attachable attachable)

findTarget

public static java.lang.String findTarget(javax.faces.context.FacesContext context,
                                          Attachable attachable,
                                          javax.faces.component.behavior.ClientBehaviorContext cbContext)

addComponentResource

public static void addComponentResource(javax.faces.context.FacesContext context,
                                        java.lang.String name)

addComponentResource

public static void addComponentResource(javax.faces.context.FacesContext context,
                                        java.lang.String name,
                                        java.lang.String library,
                                        java.lang.String target)

escapeText

public static java.lang.String escapeText(java.lang.String text)
Duplicate code from json-simple project under apache license http://code.google.com/p/json-simple/source/browse/trunk/src/org/json/simple/JSONValue.java

Parameters:
text - original text as string
Returns:
String escaped text as string to be used as JSON value

escapeText

public static char[] escapeText(char[] text)
Duplicate code from json-simple project under apache license http://code.google.com/p/json-simple/source/browse/trunk/src/org/json/simple/JSONValue.java

Parameters:
text - original text as char[]
Returns:
String escaped text as char[] to be used as JSON value

escapeHtmlTextInJson

public static java.lang.String escapeHtmlTextInJson(java.lang.String text)

escapeHtmlTextInJson

public static char[] escapeHtmlTextInJson(char[] text)

getConvertedSubmittedValue

public static java.lang.Object getConvertedSubmittedValue(javax.faces.context.FacesContext fc,
                                                          javax.faces.component.EditableValueHolder evh)

getRenderer

public static javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext fc,
                                                      javax.faces.component.UIComponent component)

getConverter

public static javax.faces.convert.Converter getConverter(javax.faces.context.FacesContext fc,
                                                         javax.faces.component.UIComponent component)

isAjaxifiedComponent

public static boolean isAjaxifiedComponent(javax.faces.component.UIComponent component)

escapeSelector

public static java.lang.String escapeSelector(java.lang.String value)
NOTE: COPIED FROM TOBAGO.

Puts two backslashes before #;&,.+*~':"!^$[]()=>|/ to escape them. Two are needed, because of JavaScript string literals. Puts three backslashes before a \ itself, to escape it.

Parameters:
value - DOCUMENT_ME
Returns:
DOCUMENT_ME

resolveLocale

public static java.util.Locale resolveLocale(java.lang.Object locale)
Gets a Locale instance by the value of the component attribute "locale" which can be String or Locale or null.

Parameters:
locale - given locale
Returns:
resolved Locale

resolveTimeZone

public static java.util.TimeZone resolveTimeZone(java.lang.Object timeZone)
Gets a TimeZone instance by the value of the component attribute "timeZone" which can be String or TimeZone or null.

Parameters:
timeZone - given time zone
Returns:
resolved TimeZone


Copyright © 2011-2013. All Rights Reserved.