ccrz.cc_bean_Message
Represents an error message or other text string to pass from the server and show on a
storefront page.
Compatibility
This reference applies to:
Release | Managed Package Version | API Version |
---|---|---|
B2B Commerce for Visualforce Winter ’21 | 4.13 | 12 |
B2B Commerce for Visualforce Spring ’20 | 4.12 | 11 |
B2B Commerce for Visualforce Summer ’19 | 4.11 | 10 |
B2B Commerce for Visualforce Spring ’19 | 4.10 | 9 |
B2B Commerce for Visualforce Summer ’18 | 4.9 | 8 |
Properties
This class defines the following Apex global properties. For more information about Apex properties and accessors, see Apex Properties.
- classToAppend {get; set;}
- String that specifies an HTML class name to add to the element where the message displays, such as an error section in a specific component. Make sure to specify this value when you create subscriber code that return ccrz.cc_bean_Message objects.
- displayClass {get; set;}
- String that specifies an extra HTML class name to add to the element where the message displays. This class name overrides the default class name returned for the message's severity value, if specified.
- labelId {get; set;}
- String that specifies the ID of an optional page label record that contains the message text to show, instead of referencing the ccrz.cc_bean_Message object's message field.
- message {get; set;}
- String that specifies the message to show.
- messageId {get; set;}
- String that specifies an optional ID for the message instance. This value isn't required to be unique.
- refersTo {get; set;}
- ID of a record that the message applies to. The managed package doesn't reference this field in any default messages, but is available if you want to reference a specific record in your message.
- severity {get; set;}
-
ccrz.cc_bean_Message.MessageSeverity that
specifies the importance of the message, which applies a default HTML class (which
activates corresponding default CSS) to the element where the message displays.
The following enumerated values are available:
- SUCCESS
- INFO
- WARN
- ERROR
- CRITICAL
- type {get; set;}
-
ccrz.cc_bean_Message.MessageType that
specifies how the storefront handles the message. The following enumerated values
are available:
Value Usage ALERT (default) Show the message in a JavaScript alert window. STANDARD Show the message in the <div class="default_page_message"/> HTML element, which renders on storefront pages. CUSTOM Show the message in an HTML element whose class attribute value you specify with the displayClass field. This type applies to most use cases for messages in custom subscriber code, and requires that you write front-end code to target a specific element.
Constructors
This class defines the following constructors:
- ccrz.cc_bean_Message
- Default constructor that doesn't take any parameters and creates an empty message
with the following field values by default:
Field Value type STANDARD severity INFO - ccrz.cc_bean_Message(String message)
- Constructor that takes a message and sets the following field values by
default:
Field Value type STANDARD severity INFO - ccrz.cc_bean_Message(String message, ccrz.cc_bean_Message.MessageSeverity severity)
- Constructor that takes a message and severity, and sets type to STANDARD by default.
- ccrz.cc_bean_Message(String message, ccrz.cc_bean_Message.MessageType type)
- Constructor that takes a message and type, and sets severity to INFO by default.
Methods
This class doesn't define any methods.