|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.myfaces.tobago.component.ComponentUtil
public class ComponentUtil
Field Summary | |
---|---|
static Class[] |
ACTION_ARGS
|
static Class[] |
ACTION_LISTENER_ARGS
|
static Class[] |
VALIDATOR_ARGS
|
static Class[] |
VALUE_CHANGE_LISTENER_ARGS
|
Method Summary | ||
---|---|---|
static void |
addOnloadCommands(UIComponent component,
String[] cmds)
|
|
static void |
addScripts(UIComponent component,
String[] scripts)
|
|
static void |
addStyles(UIComponent component,
String[] styles)
|
|
static boolean |
containsPopupActionListener(UICommand command)
|
|
static ActionListener |
createActionListener(String type)
|
|
static UIColumn |
createColumn(String label,
String sortable,
String align,
UIComponent child)
Deprecated. |
|
static UIColumn |
createColumn(String label,
String sortable,
String align,
UIComponent child,
String id)
|
|
static UIComponent |
createComponent(FacesContext facesContext,
String componentType,
String rendererType)
Deprecated. |
|
static UIComponent |
createComponent(FacesContext facesContext,
String componentType,
String rendererType,
String id)
|
|
static UIComponent |
createComponent(String componentType,
String rendererType)
Deprecated. |
|
static UIComponent |
createComponent(String componentType,
String rendererType,
String id)
|
|
static String |
createPickerId(FacesContext facesContext,
UIComponent component,
String postfix)
|
|
static UIColumn |
createTextColumn(String label,
String sortable,
String align,
String value)
Deprecated. |
|
static UIColumn |
createTextColumn(String label,
String sortable,
String align,
String value,
String id)
|
|
static UIMenuSelectOne |
createUIMenuSelectOneFacet(FacesContext facesContext,
UICommand command)
Deprecated. |
|
static UIMenuSelectOne |
createUIMenuSelectOneFacet(FacesContext facesContext,
UICommand command,
String id)
|
|
static UIComponent |
createUISelectBooleanFacet(FacesContext facesContext,
UICommand command)
Deprecated. |
|
static UIComponent |
createUISelectBooleanFacet(FacesContext facesContext,
UICommand command,
String id)
|
|
static ValueBinding |
createValueBinding(String value)
|
|
static String |
currentValue(UIComponent component)
|
|
static String |
findClientIdFor(UIComponent component,
FacesContext facesContext)
Looks for the attribute "for" in the component. |
|
static UIComponent |
findComponent(UIComponent from,
String relativeId)
colonCount == 0: fully relative colonCount == 1: absolute (still normal findComponent syntax) colonCount > 1: for each extra colon after 1, go up a naming container (to the view root, if naming containers run out) |
|
static
|
findDescendant(UIComponent component,
Class<T> type)
Searches the component tree beneath the component and return the first component matching the type. |
|
static UIComponent |
findFor(UIComponent component)
|
|
static UIForm |
findForm(UIComponent component)
|
|
static UIPage |
findPage(FacesContext facesContext)
|
|
static UIPage |
findPage(FacesContext context,
UIComponent component)
|
|
static UIPage |
findPage(UIComponent component)
|
|
static Object |
findParameter(UIComponent component,
String name)
|
|
static List<UIForm> |
findSubForms(UIComponent component)
Find all subforms of a component, and collects it. |
|
static Object |
getAttribute(UIComponent component,
String name)
|
|
static boolean |
getBooleanAttribute(UIComponent component,
String name)
|
|
static Character |
getCharacterAttribute(UIComponent component,
String name)
|
|
static Character |
getCharakterAttribute(UIComponent component,
String name)
Deprecated. please use the method getCharacterAttribute(javax.faces.component.UIComponent, String) |
|
static String |
getComponentId(FacesContext facesContext,
UIComponent component)
|
|
static Object |
getConvertedValue(FacesContext facesContext,
UIInput component,
String stringValue)
|
|
static String |
getFacesMessageAsString(FacesContext facesContext,
UIComponent component)
|
|
static UIGraphic |
getFirstGraphicChild(UIComponent component)
|
|
static UIOutput |
getFirstNonGraphicChild(UIComponent component)
|
|
static int |
getIntAttribute(UIComponent component,
String name)
|
|
static int |
getIntAttribute(UIComponent component,
String name,
int defaultValue)
|
|
static int |
getIntValue(ValueBinding valueBinding)
|
|
static List<SelectItem> |
getItemsToRender(UISelectMany component)
|
|
static List<SelectItem> |
getItemsToRender(UISelectOne component)
|
|
static String[] |
getMarkupBinding(FacesContext facesContext,
SupportsMarkup component)
|
|
static FacesMessage.Severity |
getMaximumSeverity(UIComponent component)
|
|
static LayoutableRendererBase |
getRenderer(FacesContext facesContext,
String family,
String rendererType)
|
|
static LayoutableRendererBase |
getRenderer(FacesContext facesContext,
UIComponent component)
|
|
static List<SelectItem> |
getSelectItems(UIComponent component)
|
|
static String |
getStringAttribute(UIComponent component,
String name)
|
|
static String |
getValueFromEl(String script)
|
|
static boolean |
hasErrorMessages(FacesContext context)
|
|
static boolean |
hasSelectedValue(List<SelectItem> items,
Object value)
|
|
static void |
invokeOnComponent(FacesContext facesContext,
String clientId,
UIComponent component,
Callback callback)
|
|
static boolean |
isError(UIComponent component)
|
|
static boolean |
isError(UIInput uiInput)
|
|
static boolean |
isFacetOf(UIComponent component,
UIComponent parent)
|
|
static boolean |
isHoverEnabled(UIComponent component)
|
|
static boolean |
isInActiveForm(UIComponent component)
|
|
static boolean |
isInPopup(UIComponent component)
|
|
static boolean |
isOutputOnly(UIComponent component)
|
|
static boolean |
mayUpdateModel(UIComponent component)
|
|
static boolean |
mayValidate(UIComponent component)
|
|
static UIComponent |
provideLabel(FacesContext facesContext,
UIComponent component)
|
|
static String |
removePx(String value)
|
|
static void |
resetPage(FacesContext context)
|
|
static void |
setAction(UICommand component,
String type,
String action)
|
|
static void |
setAction(UIComponent component,
String type,
String action)
Deprecated. please use the typesave method setAction(javax.faces.component.UICommand, String, String) |
|
static void |
setActionListener(ActionSource command,
String actionListener)
|
|
static void |
setBooleanProperty(UIComponent component,
String name,
String value)
|
|
static void |
setConverter(UIComponent component,
String converterId)
Deprecated. please use the typesave method setConverter(javax.faces.component.ValueHolder, String) |
|
static void |
setConverter(ValueHolder valueHolder,
String converterId)
|
|
static void |
setIntegerProperty(UIComponent component,
String name,
String value)
|
|
static void |
setIntegerSizeProperty(UIComponent component,
String name,
String value)
|
|
static void |
setMarkup(UIComponent markupComponent,
String markup)
|
|
static void |
setRenderedPartially(UICommand command,
String renderers)
|
|
static void |
setSortActionListener(UIData data,
String actionListener)
|
|
static void |
setStateChangeListener(UIData data,
String stateChangeListener)
|
|
static void |
setStringProperty(UIComponent component,
String name,
String value)
|
|
static void |
setStyleClasses(UIComponent component,
String styleClasses)
|
|
static void |
setSuggestMethodBinding(UIComponent component,
String suggestMethod)
Deprecated. please use the typesave method setSuggestMethodBinding(UIInput, String) |
|
static void |
setSuggestMethodBinding(UIInput component,
String suggestMethod)
|
|
static void |
setValidator(EditableValueHolder editableValueHolder,
String validator)
|
|
static void |
setValueBinding(UIComponent component,
String name,
String state)
|
|
static void |
setValueChangeListener(EditableValueHolder valueHolder,
String valueChangeListener)
|
|
static void |
setValueForValueBinding(String name,
Object value)
|
|
static String |
toString(UIComponent component,
int offset)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Class[] ACTION_ARGS
public static final Class[] ACTION_LISTENER_ARGS
public static final Class[] VALUE_CHANGE_LISTENER_ARGS
public static final Class[] VALIDATOR_ARGS
Method Detail |
---|
public static boolean hasErrorMessages(FacesContext context)
public static boolean containsPopupActionListener(UICommand command)
public static String getFacesMessageAsString(FacesContext facesContext, UIComponent component)
public static boolean isInPopup(UIComponent component)
public static void resetPage(FacesContext context)
public static UIPage findPage(FacesContext context, UIComponent component)
public static UIPage findPage(UIComponent component)
public static void addStyles(UIComponent component, String[] styles)
public static void addScripts(UIComponent component, String[] scripts)
public static void addOnloadCommands(UIComponent component, String[] cmds)
public static UIPage findPage(FacesContext facesContext)
public static UIForm findForm(UIComponent component)
public static List<UIForm> findSubForms(UIComponent component)
public static <T extends UIComponent> T findDescendant(UIComponent component, Class<T> type)
public static String findClientIdFor(UIComponent component, FacesContext facesContext)
public static UIComponent findFor(UIComponent component)
public static boolean isInActiveForm(UIComponent component)
public static FacesMessage.Severity getMaximumSeverity(UIComponent component)
public static boolean isError(UIInput uiInput)
public static boolean isError(UIComponent component)
public static boolean isOutputOnly(UIComponent component)
public static boolean mayValidate(UIComponent component)
public static boolean mayUpdateModel(UIComponent component)
public static boolean getBooleanAttribute(UIComponent component, String name)
public static void setRenderedPartially(UICommand command, String renderers)
public static void setStyleClasses(UIComponent component, String styleClasses)
public static void setMarkup(UIComponent markupComponent, String markup)
public static Object getAttribute(UIComponent component, String name)
public static String getStringAttribute(UIComponent component, String name)
public static int getIntAttribute(UIComponent component, String name)
public static int getIntAttribute(UIComponent component, String name, int defaultValue)
@Deprecated public static Character getCharakterAttribute(UIComponent component, String name)
getCharacterAttribute(javax.faces.component.UIComponent, String)
component
- name
- public static Character getCharacterAttribute(UIComponent component, String name)
public static boolean isFacetOf(UIComponent component, UIComponent parent)
public static LayoutableRendererBase getRenderer(FacesContext facesContext, UIComponent component)
public static LayoutableRendererBase getRenderer(FacesContext facesContext, String family, String rendererType)
public static String currentValue(UIComponent component)
public static List<SelectItem> getSelectItems(UIComponent component)
public static Object findParameter(UIComponent component, String name)
public static String toString(UIComponent component, int offset)
public static ActionListener createActionListener(String type) throws JspException
JspException
public static UIGraphic getFirstGraphicChild(UIComponent component)
public static boolean isHoverEnabled(UIComponent component)
public static UIOutput getFirstNonGraphicChild(UIComponent component)
public static void setIntegerSizeProperty(UIComponent component, String name, String value)
public static String removePx(String value)
public static void setIntegerProperty(UIComponent component, String name, String value)
public static void setBooleanProperty(UIComponent component, String name, String value)
public static void setStringProperty(UIComponent component, String name, String value)
public static void setValueForValueBinding(String name, Object value)
public static ValueBinding createValueBinding(String value)
public static String getValueFromEl(String script)
@Deprecated public static UIComponent createComponent(String componentType, String rendererType)
public static UIComponent createComponent(String componentType, String rendererType, String id)
@Deprecated public static UIComponent createComponent(FacesContext facesContext, String componentType, String rendererType)
public static UIComponent createComponent(FacesContext facesContext, String componentType, String rendererType, String id)
@Deprecated public static UIColumn createTextColumn(String label, String sortable, String align, String value)
public static UIColumn createTextColumn(String label, String sortable, String align, String value, String id)
@Deprecated public static UIColumn createColumn(String label, String sortable, String align, UIComponent child)
public static UIColumn createColumn(String label, String sortable, String align, UIComponent child, String id)
@Deprecated public static UIMenuSelectOne createUIMenuSelectOneFacet(FacesContext facesContext, UICommand command)
public static UIMenuSelectOne createUIMenuSelectOneFacet(FacesContext facesContext, UICommand command, String id)
public static boolean hasSelectedValue(List<SelectItem> items, Object value)
@Deprecated public static UIComponent createUISelectBooleanFacet(FacesContext facesContext, UICommand command)
public static UIComponent createUISelectBooleanFacet(FacesContext facesContext, UICommand command, String id)
public static int getIntValue(ValueBinding valueBinding)
public static String createPickerId(FacesContext facesContext, UIComponent component, String postfix)
public static String getComponentId(FacesContext facesContext, UIComponent component)
public static UIComponent provideLabel(FacesContext facesContext, UIComponent component)
public static List<SelectItem> getItemsToRender(UISelectOne component)
public static List<SelectItem> getItemsToRender(UISelectMany component)
public static void setValidator(EditableValueHolder editableValueHolder, String validator)
@Deprecated public static void setConverter(UIComponent component, String converterId)
setConverter(javax.faces.component.ValueHolder, String)
component
- converterId
- public static void setConverter(ValueHolder valueHolder, String converterId)
@Deprecated public static void setAction(UIComponent component, String type, String action)
setAction(javax.faces.component.UICommand, String, String)
component
- type
- action
- public static void setAction(UICommand component, String type, String action)
@Deprecated public static void setSuggestMethodBinding(UIComponent component, String suggestMethod)
setSuggestMethodBinding(UIInput, String)
component
- suggestMethod
- public static void setSuggestMethodBinding(UIInput component, String suggestMethod)
public static void setActionListener(ActionSource command, String actionListener)
public static void setValueChangeListener(EditableValueHolder valueHolder, String valueChangeListener)
public static void setSortActionListener(UIData data, String actionListener)
public static void setValueBinding(UIComponent component, String name, String state)
public static void setStateChangeListener(UIData data, String stateChangeListener)
public static String[] getMarkupBinding(FacesContext facesContext, SupportsMarkup component)
public static UIComponent findComponent(UIComponent from, String relativeId)
public static void invokeOnComponent(FacesContext facesContext, String clientId, UIComponent component, Callback callback)
public static Object getConvertedValue(FacesContext facesContext, UIInput component, String stringValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |