webuijsf
Tag alarmStatus


Use the webuijsf:alarmStatus tag to display alarm information as hyperlinks. This tag is typically specified as part of the webuijsf:masthead tag's statusArea facet. The webuijsf:alarmStatus tag produces alarm information identical to the webuijsf:masthead tag's alarmCounts attribute. See the webuijsf:masthead documentation for more information about the statusArea facet.

The statusArea facet overrides the masthead's status area attributes. The webuijsf:alarmStatus tag enables you to include the alarm counts in the status area, along with your custom components. The webuijsf:jobStatus, webuijsf:timeStamp, and webuijsf:notificationPhrase tags enable you to include the other standard status area components as well.

Note that when you use the webuijsf:masthead attributes, spacing between the components is handled automatically. When you use the webuijsf:alarmStatus, webuijsf:jobStatus, webuijsf:timeStamp, and webuijsf:notificationPhrase tags in the statusArea facet, you may have to add code to handle the spacing between the components, as demonstrated in the example below.


Note that the AlarmStatus component is deprecated. Look at the examples to see how the equivalent of webuijsf:alarmStatus can be created in the masthead.

HTML Elements and Layout

The rendered HTML page includes a <span> element that contains the label for the alarm count. The label text is "Current Alarms:" by default. Immediately following the <span> element are four image hyperlinks that show the number of alarms for each severity. You can determine how the links respond when clicked by specifying attributes such as url, action, or actionListener. The links can be used to show the user more information about the alarms.

Configuring the webuijsf:alarmStatus tag

Use the text attribute to specify a title or label for the alarmStatus component. The default text is "Current Alarms:".

The immediate attribute should be set to true when this component is used in the masthead.

By default, all four alarm icons and counts are displayed. You can prevent any alarm type from being displayed by setting the following attributes to false:

You can specify the number of each type of alarm by using the attributes:

The order in which you specify the attributes does not matter because the alarms are always displayed in the order of severity: down, critical, major, minor. If the count of an alarm type is 0, a dimmed version of the icon is displayed.

You can also specify key identifiers for alternative theme image files to use for the icons. See the Theme Identifiers section.

The image-related attributes such as align, border and vspace apply to all the alarm images. The link-related attributes such as type, url, and action apply to all the alarm count links.

If you want to customize a particular alarm count icon count, you can use facets to replace any of the icons. See Facets for more information.

Facets

The webuijsf:alarmStatus tag supports the following facets.

alarmLabel Specifies a custom component to use for the label. This facet overrides the static text label that is rendered by default, and also overrides the text attribute. This facet might be used to create a hyperlink label, instead of static text.
criticalAlarms Specifies a custom component for the icon and count for critical alarms. Overrides criticalAlarms and numCriticalAlarms attributes.
downAlarms Specifies a custom component for the icon and count for down alarms. Overrides downAlarms and numDownAlarms attributes.
majorAlarms Specifies a custom component for the icon and count for major alarms. Overrides majorAlarms and numMajorAlarms attributes.
minorAlarms Specifies a custom component for the icon and count for minor alarms. Overrides minorAlarms and numMinorAlarms attributes.

For example, to replace the down alarms icon, use the following facet in the webuijsf:alarmStatus tag:

<f:facet name="downAlarms">
  <h:panelGroup id="downAlarmsPanel">
    <webuijsf:imageHyperlink id="downAlarmsLink" styleClass="#{themeStyles.MASTHEAD_ALARM_LINK}"
    icon="ALARM_DOWN_MEDIUM" text=" 3" url="downAlarms.jsp" />
    <f:verbatim>&nbsp;&nbsp;&nbsp;</f:verbatim>
  </h:panelGroup>
</f:facet>

Note that you can use the theme style class MstAlmLnk to apply appropriate spacing for links you create with facets.

Theme Identifiers

The theme provides the following alarm icon key identifiers.

 ALARM_CRITICAL_SMALL
 ALARM_CRITICAL_MEDIUM
 ALARM_MAJOR_SMALL
 ALARM_MAJOR_MEDIUM
 ALARM_MINOR_SMALL
 ALARM_MINOR_MEDIUM
 ALARM_DOWN_SMALL
 ALARM_DOWN_MEDIUM
 ALARM_MASTHEAD_CRITICAL_MEDIUM
 ALARM_MASTHEAD_CRITICAL_DIMMED
 ALARM_MASTHEAD_DOWN_MEDIUM
 ALARM_MASTHEAD_DOWN_DIMMED
 ALARM_MASTHEAD_MAJOR_MEDIUM
 ALARM_MASTHEAD_MAJOR_DIMMED
 ALARM_MASTHEAD_MINOR_MEDIUM
 ALARM_MASTHEAD_MINOR_DIMMED
 

These identifiers can be specified with the criticalIcon, majorIcon, minorIcon, downIcon attributes to vary the appearance of the icons.

Client-Side JavaScript Functions

None.

Code Examples

Example 1: Display Alarm Status Information As Part of the Masthead StatusArea facet

This example shows the webuijsf:alarmStatus tag with attributes set to indicate the numbers of each type of alarm. The example shows literal values for these attributes, but you can set them to a JavaServer Faces EL expression that resolves to a backing bean property. The f:verbatim tags are used to add style selectors that are defined in the theme style sheet.

<webuijsf:masthead id="Masthead" productImageURL="../images/webconsole.png"
         productImageDescription="Java Web Console" userInfo="user_name" 
         serverInfo="server_name">
      <f:facet name="statusArea">
        <webuijsf:panelGroup id="statusPanel" separator="">
          <webuijsf:markup tag="div" styleClass="#{themeStyles.MASTHEAD_STATUS_DIV}">
            <webuijsf:notificationPhrase text="Important info goes here" />
            <webuijsf:image icon="DOT" border="0" width="20" height="1" />
            <webuijsf:jobStatus numJobs="1" />
          </webuijsf:markup>
          <webuijsf:markup tag="div" styleClass="#{themeStyles.MASTHEAD_TIME_DIV}">
            <webuijsf:timeStamp />
          </webuijsf:markup>
          <webuijsf:markup tag="div" styleClass="#{themeStyles.MASTHEAD_ALARM_DIV}">
            <webuijsf:alarmStatus numDownAlarms="0" numCriticalAlarms="1" numMajorAlarms="2" numMinorAlarms="3" />
          </webuijsf:markup>
        </webuijsf:panelGroup>
      </f:facet>
 </webuijsf:masthead>
 

Example 2: Create the Equivalent of webuijsf:alarmStatus tag


 <f:facet name="currentAlarmsInfo">  
  <webuijsf:panelGroup id="alarmStatus">

      <webuijsf:staticText id="labelstatus" text="Current Info :" styleClass="#{themeStyles.MASTHEAD_TEXT}"/>
      <webuijsf:panelGroup id="downAlarmsPanel">
        <webuijsf:imageHyperlink id="downAlarmsLink" 
                           icon="ALARM_MASTHEAD_DOWN_DIMMED" text="0" disabled="true" >                        
          <f:param name="severity" value="down" />
          </webuijsf:imageHyperlink>
        <f:verbatimk>&nbsp;&nbsp;</f:verbatim>
      </webuijsf:panelGroup>

      <webuijsf:panelGroup id="criticalAlarmsPanel">
        <webuijsf:imageHyperlink id="criticalAlarmsLink" styleClass="#{themeStyles.MASTHEAD_ALARM_LINK}" 
                           icon="ALARM_MASTHEAD_CRITICAL_MEDIUM" text="1"  actionExpression="#{MastheadBean.alarmClicked}">
          <f:param name="severity" value="critical"/>
        </webuijsf:imageHyperlink>
     <f:verbatim>&nbsp;&nbsp;</f:verbatim>
      </webuijsf:panelGroup>                        

      <webuijsf:panelGroup id="majorAlarmsPanel">
        <webuijsf:imageHyperlink id="majorAlarmsLink" styleClass="#{themeStyles.MASTHEAD_ALARM_LINK}" 
                           icon="ALARM_MASTHEAD_MAJOR_MEDIUM" text="2" actionExpression="#{MastheadBean.alarmClicked}">
          <f:param name="severity" value="major"/>
        </webuijsf:imageHyperlink>
      <f:verbatim>&nbsp;&nbsp;</f:verbatim>
      </webuijsf:panelGroup>

      <webuijsf:panelGroup id="minorAlarmsPanel">
        <webuijsf:imageHyperlink id="minorAlarmsLink" styleClass="#{themeStyles.MASTHEAD_ALARM_LINK}" 
                           icon="ALARM_MASTHEAD_MINOR_MEDIUM" text="3" actionExpression="#{MastheadBean.alarmClicked}">
          <f:param name="severity" value="minor"/>
        </webuijsf:imageHyperlink>
        <f:verbatim>&nbsp;&nbsp;</f:verbatim>
      </webuijsf:panelGroup>
  </webuijsf:panelGroup>
</f:facet>              
               


Tag Information
Tag Classcom.sun.webui.jsf.component.AlarmStatusTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
bindingfalsefalsejava.lang.String A ValueExpression that resolves to the UIComponent that corresponds to this tag. This attribute allows the Java bean that contains the UIComponent to manipulate the UIComponent, its properties, and its children.
numMajorAlarmsfalsefalsejava.lang.String

The number of major alarms, can be displayed next to the appropriate icon.

valuefalsefalsejava.lang.String The current value of this component.
onDblClickfalsefalsejava.lang.String Scripting code that is executed when a mouse double-click occurs over this component.
majorIconfalsefalsejava.lang.String

The key identifier for the theme image to use for the major alarms icon.

numDownAlarmsfalsefalsejava.lang.String

The number of down alarms, to display next to the appropriate icon.

criticalAlarmsfalsefalsejava.lang.String

Specifies if the critical alarm count should be displayed. Is false to prevent display of critical alarm count and icon.

minorIconfalsefalsejava.lang.String

The key identifier for the theme image to use for the minor alarms icon.

numCriticalAlarmsfalsefalsejava.lang.String

The number of critical alarms, to display next to the appropriate icon.

styleClassfalsefalsejava.lang.String

CSS style class or classes to be applied to the outermost HTML element when this component is rendered.

majorAlarmsfalsefalsejava.lang.String

Specify if the major alarm count should be displayed. Set to false to prevent display of minor alarm count and icon.

minorAlarmsfalsefalsejava.lang.String

Specifies if the minor alarm count should be displayed. Is false to prevent display of minor alarm count and icon.

criticalIconfalsefalsejava.lang.String

The key identifier for the theme image to use for the critical alarms icon.

visiblefalsefalsejava.lang.String

Indicates whether the component should be viewable by the user in the rendered HTML page. If 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 AlarmStatus component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

stylefalsefalsejava.lang.String

CSS style or styles to be applied to the outermost HTML element when this component is rendered.

downAlarmsfalsefalsejava.lang.String

Specifies if the down alarm count should be displayed. Is false to prevent display of down alarm count and icon.

numMinorAlarmsfalsefalsejava.lang.String

The number of minor alarms that can be displayed next to the appropriate icon.

downIconfalsefalsejava.lang.String

The key identifier for the theme image to use for the down alarms icon.

imageURLfalsefalsejava.lang.String

Absolute or relative URL to the image to be rendered.

widthfalsefalsejava.lang.String

Image width override. When specified, the width and height attributes tell user agents to override the natural image or object size in favor of these values.

onKeyPressfalsefalsejava.lang.String

Scripting code executed when the user presses and releases a key while the component has focus.

targetfalsefalsejava.lang.String

The resource at the specified URL is displayed in the frame that is specified with the target attribute. Values such as "_blank" that are valid for the target attribute of a HTML anchor element are also valid for this attribute in this component

onFocusfalsefalsejava.lang.String

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.

renderedfalsefalsejava.lang.String Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.
urlLangfalsefalsejava.lang.String

The language code of the resource designated by this hyperlink.

idfalsetruejava.lang.StringNo Description
onKeyUpfalsefalsejava.lang.String

Scripting code executed when the user releases a key while the component has focus.

onMouseUpfalsefalsejava.lang.String

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.

heightfalsefalsejava.lang.String

When specified, the width and height attributes tell the client browser to override the natural image or object size in favor of these values, specified in pixels. Some browsers might not support this behavior.

actionListenerExpressionfalsefalsejava.lang.String Use the actionListenerExpression attribute to cause the component to fire an event. The value must be an EL expression and it must evaluate to the name of a public method that takes an ActionEvent parameter and returns void.
alignfalsefalsejava.lang.String

Specifies the position of the image with respect to its context. Valid values are: bottom (the default); middle; top; left; right.

vspacefalsefalsejava.lang.String

Specifies the amount of white space in pixels to be inserted above and below the image. The default value is not specified but is generally a small, non-zero size.

borderfalsefalsejava.lang.String

Specifies the width of the img border in pixels. The default value for this attribute depends on the client browser

urlfalsefalsejava.lang.String

Absolute, relative, or context relative (starting with "/") URL to the resource selected by this hyperlink. If the url attribute is specified, clicking this hyperlink sends the browser to the new location. If the action attribute is specified, the form is submitted. If both are specified, the url attribute takes precedence.

onClickfalsefalsejava.lang.String

Scripting code executed when a mouse click occurs over this component. If the component submits the form (by using the action attribute), the script that you use with the onClick attribute should not return from the function. When the action attribute is used, the component handles the return with a script that is appended to the anchor element's onclick property. When you supply an onClick attribute, this return script is appended after your script in the anchor's onclick. It is ok to return from your script to abort the submit process if necessary.

onBlurfalsefalsejava.lang.String

Scripting code executed when this element loses focus.

onMouseDownfalsefalsejava.lang.String

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.

toolTipfalsefalsejava.lang.String

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 HTML element.

typefalsefalsejava.lang.String

The MIME content type of the resource specified by this component.

actionExpressionfalsefalsejava.lang.String MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a either a String or a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.
disabledfalsefalsejava.lang.String

Flag indicating that clicking of this component by the user is not currently permitted.

onMouseOutfalsefalsejava.lang.String

Scripting code executed when a mouse out movement occurs over this component.

altfalsefalsejava.lang.String

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.

onMouseOverfalsefalsejava.lang.String

Scripting code executed when the user moves the mouse pointer into the boundary of this component.

htmlTemplatefalsefalsejava.lang.String Alternative HTML template to be used by this component.
onMouseMovefalsefalsejava.lang.String

Scripting code executed when the user moves the mouse pointer while over the component.

textfalsefalsejava.lang.String

The text to be displayed for the hyperlink.

immediatefalsefalsejava.lang.String Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
hspacefalsefalsejava.lang.String

Specifies the amount of white space in pixels to be inserted to the left and right of the image. The default value is not specified but is generally a small, non-zero size.

onKeyDownfalsefalsejava.lang.String

Scripting code executed when the user presses down on a key while the component has focus.

tabIndexfalsefalsejava.lang.String

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.


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.