Which three statements are true regarding event handling in the Salesforce B2B Commerce managed package? (3 answers)
Which three statements are true regarding event handling in the Salesforce B2B Commerce managed package? (3 answers)
A . Salesforce B2B Commerce relies on a series of Javascript click listener events.
B . Writing directly to your own custom Backbone JS Views and Models automatically integrates that data into the Salesforce B2B Commerce Backbone Views and Models.
C . Salesforce B2B Commerce relies on a central event channel for communication across various Salesforce B2B Commerce Backbone Views and Models called CCRZ.pubSub.
D . CCRZ.pubSub defines the following three functions which can be used for event handling: trigger, on, and once.
E . CCRZ.pubSub extends the Backbone.Events JavaScript object.
Answer: C,D,E
Explanation:
Three statements that are true regarding event handling in the Salesforce B2B Commerce managed package are:
Salesforce B2B Commerce relies on a central event channel for communication across various Salesforce B2B Commerce Backbone Views and Models called CCRZ.pubSub. This object allows different components to publish or subscribe to events without being coupled with each other.
For example, CCRZ.pubSub.trigger(‘cartChange’) will publish an event named cartChange that can be subscribed by any component that needs to react to it.
CCRZ.pubSub defines the following three functions which can be used for event handling: trigger, on, and once. The trigger function is used to publish an event with a name and optional arguments. The on function is used to subscribe to an event with a name and a callback function. The once function is similar to on, but it will only execute the callback function once for each event.
CCRZ.pubSub extends the Backbone.Events JavaScript object. This object provides methods for managing events in Backbone.js, which is a JavaScript framework that provides models, views, collections, and events for building single-page applications. CCRZ.pubSub inherits all the methods and properties of Backbone.Events and adds some custom ones.
Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Events, PubSub Class
Latest B2B Commerce Developer Dumps Valid Version with 79 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund