15.4. <rich:notify>
The
<rich:notify> component serves for advanced user interaction, using notification boxes to give the user instant feedback on what's happening within the application. Each time this component is rendered, a floating notification box is displayed in the selected corner of the browser screen.
15.4.1. Basic usage
The
<rich:notify> has two message customization attributes: summary is short text summarizing the message, while detail configures the detailed body of the message. Both attributes have their counterparts in form of facets with the same names as the corresponding attributes.
15.4.2. Customizing notifications
A notification appears on the page each time it is rendered, either on full-page or ajax requests. The notification remains on the screen for 8 seconds and then disappears. Users can close the notification with the close button in the top-right corner of the notification.
Notification stacks can be used to create sequences. For customization of stacking see the
<rich:notifyStack> component.
There are several attributes that can change default behavior:
sticky: notifications does not disappear automatically, they needs to be closed explicitly with close button (this attribute can't be used together withnonblockingandstayTime)stayTime: configures how long notification stays on the screen before it disappears (in miliseconds)styleClass: defines the class customizing the notificationnonblocking: defines notifications which becomes partially transparent and user can click through. Non-blocking notifications don't have close button.nonblockingOpacity: defines opacity of nonblocking notifications when mouse hovers over notification (decimal number between 0 and 1)showShadow: defines whether shadow will be displayed under the notification
Note
Nonblocking notifications can be clicked through, but because they are using jQuery mechanism to bypass events, only jQuery event handlers are triggered. IThis means that standard links won't be triggered.
15.4.3. Reference data
component-type:org.richfaces.Notifycomponent-class:org.richfaces.component.UINotifycomponent-family:org.richfaces.Notifyrenderer-type:org.richfaces.NotifyRenderer
15.4.4. Style classes and skin parameters
Note that skinning is common for
<rich:notify>, <rich:notifyMessage> and <rich:notifyMessages>
Table 15.3. Style classes (selectors) and corresponding skin parameters
| Class (selector) | Skin Parameters | Mapped CSS properties |
|---|---|---|
| No skin parameters. | |
| headerBackgroundColor
|
background-color
|
headerTextColor
|
color
| |
| panelBorderColor
|
border-color
|
generalBackgroundColor
|
background-color
| |
panelTextColor
|
color
| |
| No skin parameters. | |
| No skin parameters. | |
| No skin parameters. | |
| No skin parameters. | |
| No skin parameters. | |