public class ComponentUtils
extends java.lang.Object
| Constructor and Description |
|---|
ComponentUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<javax.faces.model.SelectItem> |
createSelectItems(javax.faces.component.UIComponent component) |
static void |
decorateAttribute(javax.faces.component.UIComponent component,
java.lang.String attribute,
java.lang.String value) |
static void |
enableOnElementUpdateNotify(javax.faces.context.ResponseWriter writer,
java.lang.String id) |
static java.lang.String |
encodeNameSpace(javax.faces.context.FacesContext fc,
java.lang.String id)
Environments like portlets need to namespace the components in order to uniquely identify them
on the page in case there are multiple instances of the same portlet or different portlets that use
the same ids.
|
static java.lang.String |
escapeJQueryId(java.lang.String id) |
static java.lang.String |
findClientIds(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String list) |
static javax.faces.component.UIComponent |
findComponent(javax.faces.component.UIComponent base,
java.lang.String id) |
static java.lang.String |
findComponentClientId(java.lang.String id) |
static javax.faces.component.UIComponent |
findParentForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
static java.lang.String |
getStringValueToRender(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
Algorithm works as follows;
- If it's an input component, submitted value is checked first since it'd be the value to be used in case validation errors
terminates jsf lifecycle
- Finally the value of the component is retrieved from backing bean and if there's a converter, converted value is returned
- If the component is not a value holder, toString of component is used to support Facelets UIInstructions.
|
static java.lang.String |
getStringValueToRender(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
java.lang.Object value)
Resolves the end text to render by using a specified value
|
static java.lang.String |
getWidgetVar(java.lang.String id) |
static boolean |
isLiteralText(javax.faces.component.UIComponent component) |
static java.lang.String |
resolveField(javax.el.ValueExpression expression)
Attempts to return the property accessed in a simple EL expression of the form
${someObject.property}.
|
public static java.lang.String getStringValueToRender(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component)
facesContext - FacesContext instancecomponent - UIComponent instance whose value will be returnedpublic static java.lang.String resolveField(javax.el.ValueExpression expression)
expression - An EL expression to parse the property from.public static java.lang.String getStringValueToRender(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
java.lang.Object value)
facesContext - FacesContext instancecomponent - UIComponent instance whose value will be returnedpublic static javax.faces.component.UIComponent findParentForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
public static void decorateAttribute(javax.faces.component.UIComponent component,
java.lang.String attribute,
java.lang.String value)
public static java.util.List<javax.faces.model.SelectItem> createSelectItems(javax.faces.component.UIComponent component)
public static java.lang.String escapeJQueryId(java.lang.String id)
public static java.lang.String findClientIds(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String list)
public static java.lang.String encodeNameSpace(javax.faces.context.FacesContext fc,
java.lang.String id)
fc - The current FacesContext instanceid - The id to encodepublic static java.lang.String findComponentClientId(java.lang.String id)
public static javax.faces.component.UIComponent findComponent(javax.faces.component.UIComponent base,
java.lang.String id)
public static java.lang.String getWidgetVar(java.lang.String id)
public static boolean isLiteralText(javax.faces.component.UIComponent component)
public static void enableOnElementUpdateNotify(javax.faces.context.ResponseWriter writer,
java.lang.String id)
throws java.io.IOException
java.io.IOExceptionCopyright 2014 ICEsoft Technologies Canada Corp., All Rights Reserved.