|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.util.ComponentUtils
public final class ComponentUtils
Utility functions used by the Apache Trinidad components.
Method Summary | |
---|---|
static javax.faces.component.UIComponent |
findRelativeComponent(javax.faces.component.UIComponent from,
java.lang.String scopedId)
Find a component relative to another. |
static java.lang.String |
getScopedIdForComponent(javax.faces.component.UIComponent targetComponent,
javax.faces.component.UIComponent baseComponent)
Gets the scoped identifier for the target component. |
static boolean |
resolveBoolean(java.lang.Object value)
Utility method for component code that transforms Object->boolean. |
static boolean |
resolveBoolean(java.lang.Object value,
boolean defaultValue)
Utility method for component code that transforms Object->boolean. |
static char |
resolveCharacter(java.lang.Character value)
Utility method for component code that transforms Character->character. |
static char |
resolveCharacter(java.lang.Character value,
char defaultValue)
Utility method for component code that transforms Character->character. |
static java.util.Date |
resolveDate(java.lang.Object value)
Utility method for code that transforms Object->Date |
static java.util.Date |
resolveDate(java.lang.Object value,
java.util.Date defaultValue)
Utility method for code that transforms Object->Date |
static double |
resolveDouble(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a double. |
static double |
resolveDouble(java.lang.Object value,
double defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a double. |
static int |
resolveInteger(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int. |
static int |
resolveInteger(java.lang.Object value,
int defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int. |
static java.util.Locale |
resolveLocale(java.lang.Object value)
|
static java.util.Locale |
resolveLocale(java.lang.Object value,
java.util.Locale defaultValue)
|
static long |
resolveLong(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long. |
static long |
resolveLong(java.lang.Object value,
long defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long. |
static java.lang.Number |
resolveNumber(java.lang.Object value)
Utility method for component code that transforms Object->Number. |
static java.lang.Number |
resolveNumber(java.lang.Object value,
java.lang.Number defaultValue)
Utility method for component code that transforms Object->Number. |
static java.lang.Object |
resolveObject(java.lang.Object value,
java.lang.Object defaultValue)
Utility method for component code that resolves an Object, returning a default value if the value is null. |
static java.lang.String |
resolveString(java.lang.Object value)
Utility method for component code that transforms Object->String. |
static java.lang.String |
resolveString(java.lang.Object value,
java.lang.String defaultValue)
Utility method for component code that transforms Object->String. |
static java.lang.String[] |
resolveStringArray(java.lang.Object value)
Utility method for code that transforms Object->String[] |
static java.lang.String[] |
resolveStringArray(java.lang.Object value,
java.lang.String[] defaultValue)
Utility method for code that transforms Object->String[] |
static java.util.TimeZone |
resolveTimeZone(java.lang.Object value)
|
static java.util.TimeZone |
resolveTimeZone(java.lang.Object value,
java.util.TimeZone defaultValue)
|
static java.lang.Throwable |
unwrap(java.lang.Throwable t)
Gets the root cause of an exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Object resolveObject(java.lang.Object value, java.lang.Object defaultValue)
public static boolean resolveBoolean(java.lang.Object value, boolean defaultValue)
public static boolean resolveBoolean(java.lang.Object value)
public static int resolveInteger(java.lang.Object value)
public static int resolveInteger(java.lang.Object value, int defaultValue)
public static long resolveLong(java.lang.Object value)
public static long resolveLong(java.lang.Object value, long defaultValue)
public static double resolveDouble(java.lang.Object value)
public static double resolveDouble(java.lang.Object value, double defaultValue)
public static char resolveCharacter(java.lang.Character value)
public static char resolveCharacter(java.lang.Character value, char defaultValue)
public static java.lang.Number resolveNumber(java.lang.Object value)
public static java.lang.Number resolveNumber(java.lang.Object value, java.lang.Number defaultValue)
public static java.lang.String resolveString(java.lang.Object value)
public static java.lang.String resolveString(java.lang.Object value, java.lang.String defaultValue)
public static java.lang.String[] resolveStringArray(java.lang.Object value)
public static java.lang.String[] resolveStringArray(java.lang.Object value, java.lang.String[] defaultValue)
public static java.util.Date resolveDate(java.lang.Object value)
public static java.util.Date resolveDate(java.lang.Object value, java.util.Date defaultValue)
public static java.util.TimeZone resolveTimeZone(java.lang.Object value)
public static java.util.TimeZone resolveTimeZone(java.lang.Object value, java.util.TimeZone defaultValue)
public static java.util.Locale resolveLocale(java.lang.Object value)
public static java.util.Locale resolveLocale(java.lang.Object value, java.util.Locale defaultValue)
public static java.lang.Throwable unwrap(java.lang.Throwable t)
public static javax.faces.component.UIComponent findRelativeComponent(javax.faces.component.UIComponent from, java.lang.String scopedId)
The relative ID must account for NamingContainers. If the component is already inside of a naming container, you can use a single colon to start the search from the root, or multiple colons to move up through the NamingContainers - "::" will pop out of the current naming container, ":::" will pop out of two naming containers, etc.
from
- the component to search relative toscopedId
- the relative id path from the 'from' component to the
component to find
RenderUtils.getRelativeId(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
,
UIComponent.findComponent(java.lang.String)
public static java.lang.String getScopedIdForComponent(javax.faces.component.UIComponent targetComponent, javax.faces.component.UIComponent baseComponent)
targetComponent
- The component for which the scoped id needs to be
determined.baseComponent
- The component relative to which the scoped id for the
targetComponent needs to be determined.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |