See Also | Tutorials
You can drag an Alert component
from the Palette's Composite category to the Visual Designer to create an alert message that displays directly on the page. An alert message consists
of an icon depicting the type of alert (information, warning,
or error) and a summary message, plus an optional detail message.
- If the
summary property is not defined, the Alert component will not be displayed.
After dragging the button to the Visual Designer, you can:
- Begin typing the text of the summary message.
- Select the button and edit its properties in the Alert's Properties window. Some typical properties you might set are:
- id. The name of the component. In the JSP file, this name is the value of the component's id attribute. In the page bean, this property's value is the name of the Alert object.
- summary. The short text message indicating what the alert is about.
- detail. A longer text message providing more detail than the summary.
- type. The severity of the alert, which determines the icon that appears to the left of the summary. Choose an item from the property's drop-down list and you can see the icon change in the Visual Designer.
- Right-click the alert and choose one of several actions:
- Edit action Event Handler. Code the action event handler, the method that is called when the user clicks a hyperlink that was added to the detail section by setting the
urlText property in the Properties window. This method determines which page or resource to open based on specified conditions. The action method typically processes mouse clicks and returns a string indicating the name of a page navigation case (the page in your application to display next). The default name for the method is alert-id_action, where alert-id is the value of the Alert component's id property.
- Bind to Data. Dynamically set the summary text. The text comes from the object or data provider you specify, such as a column of a database table. For more information, see Bind to Data Dialog Box.
- Property Bindings. Opens a dialog box that enables you to bind properties of the component in addition to the
summary property to other objects or bean properties that update this component's properties automatically.
- Align. If you have multiple components selected, you can specify how they align with one another. If only the current component is selected, you can choose whether the component aligns with (snaps to) the background grid when you move it around.
- Preview in Browser. See how the page renders in the default web browser for your system.
- See Also
- Binding Component Properties
- Working
With Components
- Component Tasks: Quick Reference
- Component Web Tutorials
- Data Source Web Tutorials
- About the Palette
- Tutorials
- Delving Into Components Tutorial