See Also | Tutorials
You see the Properties window for a Message component
when you select the component on a page that you are editing in the Visual Designer.
This component has the following properties.
General
- id. Type: String
The name of the Message component in the page bean and the JSP file.
Appearance
- showDetail. Type: boolean
Indicates if the detail portion of the message should be displayed. This property is false (unselected) by default.
- showSummary. Type: boolean
Indicates if the summary portion of the message should be displayed. This property is true (selected) by default.
- style. Type: String
Cascading Style Sheet rules (CSS level 2) to be applied to the component. You can enter values directly or click the ellipsis (...) button to use the Style Editor.
- Note: This property overrides any settings in the theme or the project CSS file for this component. If a style specified in this property does not appear to take effect, it is because an area of the component is obscured by a child component that has different style settings.
For a list of CSS2 style attributes, see the web page at
http://www.w3.org/TR/REC-CSS2/propidx.html
- styleClass. Type: String
A space-separated list of CSS2 style classes to be applied when the component is rendered. The style classes must be defined in the project's style sheet or in the theme's CSS file. If you click the ellipsis button (...), you see a list of all styles you can add to this property. For information on adding CSS classes and rules to the project's cascading style sheet, see CSS Editor.
- Note: See the note above under the
style property description for an explanation of why a class added to this property might appear to have no effect on the component.
- Note: If you add a CSS style class from the current theme to your project CSS file and you redefine the style class, the change affects all components that use this style class. However, you can add your own style classes to the project CSS file that redefine the default style classes, and then when you add them to this property, the changes affect only this instance of this component.
The defaulttheme CSS style classes for this component are:
css_master.css
.MsgFldSumTxt {color:#C00;font-weight:bold}
.MsgFldTxt {color:#C00}
.MsgGrpTbl
{border-left:solid 1px #C00;
border-right:solid 1px #C00;
border-bottom:solid 1px #C00;
border-top:none}
.MsgGrpTbl td
{background-color:#FAEDED;
padding: 4px 10px 4px 10px}
.MsgGrpTblTtl
{color:#000;background-color:#FAEDED;
border-top:solid 1px #C00;
border-left:solid 1px #C00;
border-right:solid 1px #C00;
text-align:left;
font-weight:bold;
padding:8px 10px 0px;
margin-top:15px;
font-size:14px}
.MsgGrpDiv ul
{color:#C00;
list-style-type:square;
padding:0px 10px 0px 18px;
margin:6px 0px}
.MsgGrpSumTxt {color:#000}
.MsgGrpTxt
{color:#333;display:block;
padding-bottom:3px}
.MsgGrpDiv {margin:0px}
.MsgGrpSumTxt
{display:block;font-weight:normal;
padding-bottom:2px}
.MsgInfo {color: black;}
.MsgWarn {color: orange;font-weight: bold;}
.MsgError {color: red;font-weight: bold;}
.MsgFatal
{color: red;font-style: italic;
font-weight: bold;}
.MsgGrpInfo {color: black;}
.MsgGrpWarn {color: orange;font-weight: bold;}
.MsgGrpError {color: red;font-weight: bold;}
.MsgGrpFatal
{color: red;font-style: italic;
font-weight: bold;}
css_ie55up.css
/* ADDITIONAL CSS FOR IE5.5+ SUPPORT */
.MsgGrpTbl {margin-top:15px}
.MsgGrpTbl td {padding: 4px 10px 10px 10px}
.MsgGrpTblTtl {margin-top:0px}
.MsgGrpDiv ul {padding:5px 3px 10px 18px;margin:0px}
.MsgGrpDiv ul li {padding:3px;margin-bottom:-12px}
.MsgGrpSumTxt {padding-bottom:1px}
Behavior
- for. Type: String
The component for which the message component displays messages. To set this property, you can hold down the Ctrl-Shift keys and drag the message component to the component for which it is to display messages. Alternatively, you can click the drop-down list next to the property and choose a component.
- visible. Type: boolean
Indicates whether or not the component can be seen by the user on the rendered HTML page. This property is selected by default. If you deselect this property, the component's HTML code is rendered on the page, but the component is not visible in the browser because it is hidden by a style setting. It is usually not necessary to use this property with a Message component because the component is visible only if there is a message to display, such as when an error occurs.
- Note: If you need to completely hide the component, for example, because it contains sensitive information that certain users should not see, deselect the
rendered property.
Advanced
- rendered. Type: boolean
If selected, the component is to be rendered and processed on any subsequent page submission. If not selected, the component doesn't appear on the page at all, not even as a hidden component.
You can bind this property to a JavaBeans property that determines when the component does get rendered. To bind this property, click the ellipsis button (...) to the right of the property and choose Use Binding in the dialog box.
- See Also
- Message Component
- Working With Components
- Component Tasks: Quick Reference
- Message Component
- Tutorials
-
Delving Into Components Tutorial
- About Stylesheets and Component Layout
- Understanding Scope and Managed Beans
- Customizing Standard Validator Messages Tutorial