|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.gui.util.FacesComponentUtility
public abstract class FacesComponentUtility
A set of utility methods for working with JSF UIComponents.
| Field Summary | |
|---|---|
static String |
NO_STYLE_CLASS
|
| Constructor Summary | |
|---|---|
FacesComponentUtility()
|
|
| Method Summary | ||
|---|---|---|
static javax.faces.component.html.HtmlPanelGroup |
addBlockPanel(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
|
|
static javax.faces.component.UIOutput |
addButton(javax.faces.component.UIComponent parent,
String label,
String styleClass)
|
|
static javax.faces.component.html.HtmlColumn |
addColumn(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
CharSequence headerText,
String headerStyle)
|
|
static javax.faces.component.html.HtmlCommandButton |
addCommandButton(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String value,
String styleClass)
|
|
static javax.faces.component.html.HtmlCommandLink |
addCommandLink(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
|
|
static javax.faces.component.html.HtmlDataTable |
addDataTable(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
|
|
static javax.faces.component.html.HtmlForm |
addForm(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
|
|
static javax.faces.component.html.HtmlGraphicImage |
addGraphicImage(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String url,
String alt)
|
|
static javax.faces.component.html.HtmlPanelGroup |
addInlinePanel(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
|
|
static javax.faces.component.UIOutput |
addJavaScript(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
CharSequence src,
CharSequence script)
|
|
static javax.faces.component.html.HtmlOutputLabel |
addLabel(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
javax.faces.component.UIInput associatedInput,
String value,
String styleClass)
|
|
static javax.faces.component.html.HtmlMessage |
addMessage(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String associatedComponentId,
String styleClass)
|
|
static javax.faces.component.html.HtmlOutputLink |
addOutputLink(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String value)
|
|
static javax.faces.component.html.HtmlOutputText |
addOutputText(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
CharSequence value,
String styleClass)
|
|
static javax.faces.component.html.HtmlPanelGrid |
addPanelGrid(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
int columns,
String styleClass)
|
|
static javax.faces.component.UIParameter |
addParameter(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String name,
String value)
|
|
static org.richfaces.component.html.HtmlSeparator |
addSeparator(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
|
|
static org.richfaces.component.html.HtmlSimpleTogglePanel |
addSimpleTogglePanel(javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String label)
|
|
static javax.faces.component.html.HtmlOutputText |
addVerbatimText(javax.faces.component.UIComponent parent,
CharSequence html)
|
|
static javax.faces.component.html.HtmlPanelGroup |
createBlockPanel(FacesComponentIdFactory idFactory,
String styleClass)
|
|
static
|
createComponent(Class<T> componentClass)
Creates a UIComponent of the specified type. |
|
static
|
createComponent(Class<T> componentClass,
FacesComponentIdFactory idFactory)
Creates a UIComponent of the specified type. |
|
static javax.faces.component.html.HtmlOutputText |
createOutputText(FacesComponentIdFactory idFactory,
CharSequence value,
String styleClass)
|
|
static void |
detachComponent(javax.faces.component.UIComponent component)
Removes the specified component from its parent if it has one. |
|
static
|
getAncestorOfType(javax.faces.component.UIComponent component,
Class<T> componentClass)
|
|
static
|
getDescendantsOfType(javax.faces.component.UIComponent component,
Class<T> componentClass)
|
|
static javax.faces.component.UIForm |
getEnclosingForm(javax.faces.component.UIComponent component)
Returns the enclosing UIForm component, if any, from the specified component's ancestry. |
|
static String |
getExpressionAttribute(javax.faces.component.UIComponent component,
String attribName)
|
|
static
|
getExpressionAttribute(javax.faces.component.UIComponent component,
String attribName,
Class<T> expectedType)
|
|
static Map<String,String> |
getParameters(javax.faces.component.UIComponent component)
|
|
static boolean |
isDisabled(javax.faces.component.UIComponent component)
Gets the value of the "disabled" attribute on the specified component, or false if the component does
not expose the attribute. |
|
static boolean |
isOverride(javax.faces.component.UIComponent component)
|
|
static boolean |
isReadonly(javax.faces.component.UIComponent component)
Gets the value of the "readonly" attribute on the specified component, or false if the component does
not expose the attribute. |
|
static boolean |
isUnset(javax.faces.component.UIComponent component)
Gets the value of the "unset" attribute on the specified component, or false if the component does
not expose the attribute. |
|
static void |
setDisabled(javax.faces.component.UIComponent component,
boolean disabled)
Sets the "disabled" attribute on the specified component to the provided value. |
|
static void |
setOverride(javax.faces.component.UIInput input,
boolean override)
|
|
static void |
setReadonly(javax.faces.component.UIInput input,
boolean readonly)
Sets the "readonly" attribute on the specified component to the provided value. |
|
static void |
setUnset(javax.faces.component.UIInput input,
boolean unset)
Sets the "unset" attribute on the specified component to the provided value. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_STYLE_CLASS
| Constructor Detail |
|---|
public FacesComponentUtility()
| Method Detail |
|---|
@NotNull
public static javax.faces.component.html.HtmlPanelGroup createBlockPanel(FacesComponentIdFactory idFactory,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlPanelGroup addBlockPanel(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlPanelGroup addInlinePanel(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
@NotNull
public static org.richfaces.component.html.HtmlSimpleTogglePanel addSimpleTogglePanel(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String label)
@NotNull
public static org.richfaces.component.html.HtmlSeparator addSeparator(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
@NotNull
public static javax.faces.component.html.HtmlOutputText addOutputText(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
CharSequence value,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlOutputText createOutputText(FacesComponentIdFactory idFactory,
CharSequence value,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlColumn addColumn(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
CharSequence headerText,
String headerStyle)
@NotNull
public static javax.faces.component.html.HtmlOutputText addVerbatimText(@NotNull
javax.faces.component.UIComponent parent,
CharSequence html)
@NotNull
public static javax.faces.component.UIOutput addButton(javax.faces.component.UIComponent parent,
String label,
String styleClass)
@NotNull
public static javax.faces.component.UIOutput addJavaScript(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
@Nullable
CharSequence src,
@Nullable
CharSequence script)
@NotNull
public static <T extends javax.faces.component.UIComponent> List<T> getDescendantsOfType(javax.faces.component.UIComponent component,
Class<T> componentClass)
public static <T extends javax.faces.component.UIComponent> T getAncestorOfType(javax.faces.component.UIComponent component,
Class<T> componentClass)
@NotNull
public static javax.faces.component.html.HtmlOutputLabel addLabel(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
javax.faces.component.UIInput associatedInput,
String value,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlGraphicImage addGraphicImage(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String url,
String alt)
@NotNull
public static javax.faces.component.html.HtmlOutputLink addOutputLink(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String value)
@NotNull
public static javax.faces.component.UIParameter addParameter(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String name,
String value)
@NotNull
public static javax.faces.component.html.HtmlForm addForm(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
@NotNull
public static javax.faces.component.html.HtmlCommandButton addCommandButton(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String value,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlCommandLink addCommandLink(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory)
@NotNull
public static javax.faces.component.html.HtmlMessage addMessage(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String associatedComponentId,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlPanelGrid addPanelGrid(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
int columns,
String styleClass)
@NotNull
public static javax.faces.component.html.HtmlDataTable addDataTable(@NotNull
javax.faces.component.UIComponent parent,
FacesComponentIdFactory idFactory,
String styleClass)
@Nullable
public static String getExpressionAttribute(@NotNull
javax.faces.component.UIComponent component,
@NotNull
String attribName)
@Nullable
public static <T> T getExpressionAttribute(@NotNull
javax.faces.component.UIComponent component,
@NotNull
String attribName,
@NotNull
Class<T> expectedType)
@NotNull
public static Map<String,String> getParameters(@NotNull
javax.faces.component.UIComponent component)
public static <T extends javax.faces.component.UIComponent> T createComponent(Class<T> componentClass)
UIComponent of the specified type.
componentClass - the type of UIComponent to create
UIComponent of the specified type
public static <T extends javax.faces.component.UIComponent> T createComponent(Class<T> componentClass,
@Nullable
FacesComponentIdFactory idFactory)
UIComponent of the specified type.
componentClass - the type of UIComponent to createidFactory - a factory to use to create a unique id for the new component
UIComponent of the specified type
public static void setDisabled(javax.faces.component.UIComponent component,
boolean disabled)
component - a componentdisabled - the new value for the "disabled" attributepublic static boolean isDisabled(javax.faces.component.UIComponent component)
false if the component does
not expose the attribute.
component - a component
false if the component
does not expose the attribute
public static void setReadonly(javax.faces.component.UIInput input,
boolean readonly)
input - an input componentreadonly - the new value for the "readonly" attributepublic static boolean isReadonly(javax.faces.component.UIComponent component)
false if the component does
not expose the attribute.
component - a component
false if the component
does not expose the attribute
public static void setUnset(javax.faces.component.UIInput input,
boolean unset)
input - an input componentunset - the new value for the "unset" attributepublic static boolean isUnset(javax.faces.component.UIComponent component)
false if the component does
not expose the attribute.
component - a component
false if the component does
not expose the attribute
public static void setOverride(javax.faces.component.UIInput input,
boolean override)
public static boolean isOverride(javax.faces.component.UIComponent component)
public static void detachComponent(javax.faces.component.UIComponent component)
component - a JSF component
@Nullable
public static javax.faces.component.UIForm getEnclosingForm(javax.faces.component.UIComponent component)
throws IllegalArgumentException
component - the component
IllegalArgumentException - if more than one UIForm is found in the component's ancestry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||