|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
com.sun.webui.jsf.component.WebuiOutput
com.sun.webui.jsf.component.Alert
public class Alert
The Alert component is used to render an inline alert message.
Field Summary | |
---|---|
static java.lang.String |
ALERT_IMAGE_FACET
Facet name for alert image |
static java.lang.String |
ALERT_LINK_FACET
Facet name for the alert link |
Fields inherited from class javax.faces.component.UIOutput |
---|
COMPONENT_FAMILY, COMPONENT_TYPE |
Fields inherited from interface javax.faces.component.NamingContainer |
---|
SEPARATOR_CHAR |
Constructor Summary | |
---|---|
Alert()
Default Constructor. |
Method Summary | |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Return zero if the severity of o1 equals o2 ,
negative 1 if the severity o1 is less than o2 ,
positive 1 if the severity o1 is greater than
o2 . |
boolean |
equals(java.lang.Object o)
Override equals() returns false if object is not an instance of Alarm. |
javax.faces.component.UIComponent |
getAlertIcon()
Return a component that implements an alert image. |
javax.faces.component.UIComponent |
getAlertLink()
Return a component that implements an alert link. |
java.lang.String |
getAlt()
Alternative textual description of the image rendered by this component. |
javax.faces.convert.Converter |
getConverter()
|
static java.util.List<com.sun.webui.jsf.model.Indicator> |
getDefaultIndicators()
Returns a cloned list of the default indicators that can be modified without affecting the default list. |
java.lang.String |
getDetail()
Optional detailed message text for the Alert that can include more information about the alert and instructions for what to do about the alert. |
java.lang.String |
getFamily()
Return the family for this component. |
java.lang.String |
getHtmlTemplate()
Get alternative HTML template to be used by this component. |
java.util.List<com.sun.webui.jsf.model.Indicator> |
getIndicators()
Return a List of Indicators supported
by this Alert . |
javax.el.MethodExpression |
getLinkActionExpression()
The linkActionExpression attribute is used to specify the action to take when the embedded hyperlink component is activated by the user. |
java.lang.String |
getLinkTarget()
The window (target) in which to load the link that is specified with linkText. |
java.lang.String |
getLinkText()
The text for an optional link that is appended to the detail message. |
java.lang.String |
getLinkToolTip()
Sets the value of the title attribute for the HTML element. |
java.lang.String |
getLinkURL()
Absolute, relative, or context relative (starting with "/") URL to the resource to navigate to when the link that is specified with linkText is selected. |
java.lang.String |
getRendererType()
|
java.lang.String |
getStyle()
CSS style or styles to be applied to the outermost HTML element when this component is rendered. |
java.lang.String |
getStyleClass()
CSS style class or classes to be applied to the outermost HTML element when this component is rendered. |
java.lang.String |
getSummary()
Summary message text for the alert. |
int |
getTabIndex()
Position of this element in the tabbing order of the current document. |
java.lang.String |
getType()
The type or category of alert. |
java.lang.Object |
getValue()
|
boolean |
isVisible()
Indicates whether the component should be viewable by the user in the rendered HTML page. |
void |
restoreState(javax.faces.context.FacesContext _context,
java.lang.Object _state)
Restore the state of this component. |
java.lang.Object |
saveState(javax.faces.context.FacesContext _context)
Save the state of this component. |
void |
setAlt(java.lang.String alt)
Alternative textual description of the image rendered by this component. |
void |
setDetail(java.lang.String detail)
Optional detailed message text for the Alert that can include more information about the alert and instructions for what to do about the alert. |
void |
setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component. |
void |
setIndicators(java.util.List<com.sun.webui.jsf.model.Indicator> indicators)
Set the list of indicators supported by this alert. |
void |
setLinkActionExpression(javax.el.MethodExpression linkActionExpression)
The linkActionExpression attribute is used to specify the action to take when the embedded hyperlink component is activated by the user. |
void |
setLinkTarget(java.lang.String linkTarget)
The window (target) in which to load the link that is specified with linkText. |
void |
setLinkText(java.lang.String linkText)
The text for an optional link that is appended to the detail message. |
void |
setLinkToolTip(java.lang.String linkToolTip)
Sets the value of the title attribute for the HTML element. |
void |
setLinkURL(java.lang.String linkURL)
Absolute, relative, or context relative (starting with "/") URL to the resource to navigate to when the link that is specified with linkText is selected. |
void |
setStyle(java.lang.String style)
CSS style or styles to be applied to the outermost HTML element when this component is rendered. |
void |
setStyleClass(java.lang.String styleClass)
CSS style class or classes to be applied to the outermost HTML element when this component is rendered. |
void |
setSummary(java.lang.String summary)
Summary message text for the alert. |
void |
setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. |
void |
setType(java.lang.String type)
The type or category of alert. |
void |
setVisible(boolean visible)
Indicates whether the component should be viewable by the user in the rendered HTML page. |
Methods inherited from class com.sun.webui.jsf.component.WebuiOutput |
---|
processDecodes, processUpdates, processValidators, setConverter, setId, setRendered |
Methods inherited from class javax.faces.component.UIOutput |
---|
getLocalValue, setValue |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getContainerClientId |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ALERT_IMAGE_FACET
public static final java.lang.String ALERT_LINK_FACET
Constructor Detail |
---|
public Alert()
Method Detail |
---|
public java.lang.String getFamily()
Return the family for this component.
getFamily
in class javax.faces.component.UIOutput
public java.lang.String getRendererType()
getRendererType
in class javax.faces.component.UIComponentBase
public static java.util.List<com.sun.webui.jsf.model.Indicator> getDefaultIndicators()
Typically this method is called by an application that
wants to add a an application defined Indicator
or replace a default Indicator
. An application
first call
List
and them add and/or replace an Indicator
.
list.add(appMostSevere); // Add an application indicator
To replace an indicator it must removed first. An indicator
is equal to another indicator if their "type" attributes are the
equal. If appOkIndicator
has type = "ok" this call will
remove the default "ok" indicator.
list.remove(appOkIndicator);// remove default
After the default indicator is removed add the replacement.
list.add(appOkIndicator); // add the replacement
In order for the Alarm component to utilize the modified list
the application can have a value expression for the
indicators
property in which the application returns the
modified list, or calls the setIndicators(list)
method to assign the modified list.
public java.lang.String getHtmlTemplate()
public void setHtmlTemplate(java.lang.String htmlTemplate)
public javax.faces.component.UIComponent getAlertIcon()
alertImage
is found
that component is returned.
If a facet is not found an Icon
component instance is returned with the id
alertImage
. The Icon
instance is
intialized with the values from
getType()
if a valid type, else
ThemeImages.ALERT_ERROR_LARGE
getAlt()
if not null
If a facet is not defined then the returned Icon
component is created every time this method is called.
public javax.faces.component.UIComponent getAlertLink()
alertLink
is found
that component is returned.
If a facet is not defined and getLinkText()
returns non null, an IconHyperlink
component instance is created with the id
alertLink
and initialized with the values from:
getLinkTarget()
getLinkText()
getLinkToolTip()
getLinkURL()
getLinkAction()
ThemeImages.HREF_LINK
getLinkText()
returns null, null is returned.
If a facet is not defined and if a IconHyperlink
component is created, it is reinitialized every time this method
is called.
public javax.faces.convert.Converter getConverter()
getConverter
in interface javax.faces.component.ValueHolder
getConverter
in class javax.faces.component.UIOutput
public java.lang.Object getValue()
getValue
in interface javax.faces.component.ValueHolder
getValue
in class javax.faces.component.UIOutput
public java.lang.String getAlt()
Alternative textual description of the image rendered by this component. The alt text can be used by screen readers and in tool tips, and when image display is turned off in the web browser.
public void setAlt(java.lang.String alt)
Alternative textual description of the image rendered by this component. The alt text can be used by screen readers and in tool tips, and when image display is turned off in the web browser.
getAlt()
public java.lang.String getDetail()
Optional detailed message text for the Alert that can include more information about the alert and instructions for what to do about the alert.
public void setDetail(java.lang.String detail)
Optional detailed message text for the Alert that can include more information about the alert and instructions for what to do about the alert.
getDetail()
public javax.el.MethodExpression getLinkActionExpression()
The linkActionExpression attribute is used to specify the action to take when the
embedded hyperlink component is activated by the user. The value of the
linkActionExpression attribute must be one of the following:
(faces-config.xml)
.
java.io.Serializable
interface or javax.faces.component.StateHolder
interface.
public void setLinkActionExpression(javax.el.MethodExpression linkActionExpression)
The linkActionExpression attribute is used to specify the action to take when the
embedded hyperlink component is activated by the user. The value of the
linkActionExpression attribute must be one of the following:
(faces-config.xml)
.
java.io.Serializable
interface or javax.faces.component.StateHolder
interface.
getLinkActionExpression()
public java.lang.String getLinkTarget()
The window (target) in which to load the link that is specified with linkText.
public void setLinkTarget(java.lang.String linkTarget)
The window (target) in which to load the link that is specified with linkText.
getLinkTarget()
public java.lang.String getLinkText()
The text for an optional link that is appended to the detail message.
public void setLinkText(java.lang.String linkText)
The text for an optional link that is appended to the detail message.
getLinkText()
public java.lang.String getLinkToolTip()
Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the link that is specified with linkText.
public void setLinkToolTip(java.lang.String linkToolTip)
Sets the value of the title attribute for the HTML element. The specified text will display as a tooltip if the mouse cursor hovers over the link that is specified with linkText.
getLinkToolTip()
public java.lang.String getLinkURL()
Absolute, relative, or context relative (starting with "/") URL to the resource to navigate to when the link that is specified with linkText is selected.
public void setLinkURL(java.lang.String linkURL)
Absolute, relative, or context relative (starting with "/") URL to the resource to navigate to when the link that is specified with linkText is selected.
getLinkURL()
public java.lang.String getStyle()
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
public void setStyle(java.lang.String style)
CSS style or styles to be applied to the outermost HTML element when this component is rendered.
getStyle()
public java.lang.String getStyleClass()
CSS style class or classes to be applied to the outermost HTML element when this component is rendered.
public void setStyleClass(java.lang.String styleClass)
CSS style class or classes to be applied to the outermost HTML element when this component is rendered.
getStyleClass()
public java.lang.String getSummary()
Summary message text for the alert. This brief message is prominently displayed next to the icon.
public void setSummary(java.lang.String summary)
Summary message text for the alert. This brief message is prominently displayed next to the icon.
getSummary()
public int getTabIndex()
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
public void setTabIndex(int tabIndex)
Position of this element in the tabbing order of the current document. Tabbing order determines the sequence in which elements receive focus when the tab key is pressed. The value must be an integer between 0 and 32767.
getTabIndex()
public java.lang.String getType()
The type or category of alert. This attribute can be set to "information", "success", "warning", "error" or any custom defined type specified for Indicator. The selection determines which icon is rendered for the alert.
public void setType(java.lang.String type)
The type or category of alert. This attribute can be set to "information", "success", "warning", "error" or any custom defined type specified for Indicator. The selection determines which icon is rendered for the alert.
getType()
public boolean isVisible()
Indicates whether the component should be viewable by the user in the rendered HTML page. If this setting is false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, this setting is true, so HTML for the component HTML is included and visible to the user. If the Alert component is not visible, it can still be processed on subsequent form submissions because the HTML is present.
public void setVisible(boolean visible)
Indicates whether the component should be viewable by the user in the rendered HTML page. If this setting is false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default,this setting is true, so HTML for the component HTML is included and visible to the user. If the Alert component is not visible, it can still be processed on subsequent form submissions because the HTML is present.
isVisible()
public java.util.List<com.sun.webui.jsf.model.Indicator> getIndicators()
List
of Indicators
supported
by this Alert
. If indicators
has not been
set explicitly by the application and if there is no value
expression, a list of default alert indicators obtained by
calling Alert.getDefaultIndicators()
is
returned. If the application modifies this list, it must call
setIndicators
or add a value expression that resolves
to the modified list in order to persist the change, otherwise
this method will continue to return a list of default
alert indicators.
public void setIndicators(java.util.List<com.sun.webui.jsf.model.Indicator> indicators)
public void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
Restore the state of this component.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIOutput
public java.lang.Object saveState(javax.faces.context.FacesContext _context)
Save the state of this component.
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIOutput
public int compare(java.lang.Object o1, java.lang.Object o2)
o1
equals o2
,
negative 1 if the severity o1
is less than o2
,
positive 1 if the severity o1
is greater than
o2
.
compare
in interface java.util.Comparator
public boolean equals(java.lang.Object o)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |