Skip to main content

Notification Component (pre-version 6.0)

Zuora

Notification Component (pre-version 6.0)

This article describes the Notification component in the Zuora CPQ package prior to version 6.0. It includes a description, syntax, a list of attributes, and a sample code.

Notification Component

The Notification component is a UI component that displays a success or failure message. It is designed to replace <apex:pageMessages/> or <apex:messages/> in custom Visualforce pages. It works well with Zuora CPQ applications and provides a consistent, customizable look and feel.

The component displays a title and a message body against a background color. The background color of green (success) or red (failure), as well as the title and body, are determined at runtime based on the success or failure value of the operation.

As of the Zuora CPQ version 6.0, this component was redesigned to use an option object similar to the Property, List, and Lookup components. For information about the newly updated Notification component, refer to Notification Component (version 6.0+).

Syntax

Notification param1="value1" param2="value2"...

Notification Component Attributes

This table lists the component's attributes. You can pre-configure the text values or pass them in dynamically.

 Attribute Type  Required  Default Value  Description
id String Yes n/a An identifier that allows the component to be referenced by other components in the page.
rendered Boolean true n/a Specifies whether the component is rendered on the page
 successTitle String  No  Label.Confirmation The title for the Success message
 failureTitle     String  No  Label.Error_Page_Submission The title for the Failure message
 successBody String  No  n/a The static message body upon success.  Use this attribute only if you do not want to add messages to the page context dynamically.  
 failureBody String  No  n/a The static message body upon failure. Use this attribute only if you do not want to add messages to the page context dynamically.

Sample Code

<zqu:Notification successTitle="{!$Label.CONFIRMATION}" failureTitle="{!$Label.ERROR_PAGE_SUBMISSION}"/>

You do not have to pass the actual error messages into the Notification component.  You can use the standard ApexPages.addMessage() to add the Confirmation or Error messages into the page context in your Apex code.  The Notification component is able to render all the messages in the Page context inside of the message box.  For example:

ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM, Label.SENDTOZBILLING_SUCCESS));