Knowledge Center

Knowledge Center > Commerce > Zuora for Salesforce Development Resources > Zuora for Salesforce Component Library > Zuora for Salesforce Global Components > Notification Component (pre-version 6.0)

Notification Component (pre-version 6.0)

This article describes the Notification component in the Zuora for Salesforce 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 for Salesforce 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 for Salesforce 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+).

Here is an example of a success message:

Notification - success 01a.png

Here is an example of a failure message:

Notification - failure 01a.png

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));
Last modified
13:38, 2 May 2015

Tags

This page has no custom tags.

Classifications

(not set)