Why is the use of a standard Visualforce control such as apex:form discouraged in Salesforce B2B Commerce page includes and subscriber pages?

Why is the use of a standard Visualforce control such as apex:form discouraged in Salesforce B2B Commerce page includes and subscriber pages?
A . Visualforce "scopes" controls that are present on a page and scope of the control will be set to "ccrz"
B . Apex:form render DOM components slowly
C . The CCRZ Javascript object is not accessible within an apex:form control.
D . Javascript events are not supported within an apex:form control

Answer: C

Explanation:

The use of a standard Visualforce control such as apex:form is discouraged in Salesforce B2B Commerce page includes and subscriber pages because the CCRZ JavaScript object is not accessible within an apex:form control. The CCRZ JavaScript object is a global object that provides access to various B2B Commerce functions and properties, such as logging, utilities, events, and configuration. Using an apex:form control would prevent the developer from using the CCRZ JavaScript object and its features. Visualforce does not “scope” controls that are present on a page and scope of the control will be set to “ccrz”, as this is not a valid statement. Apex:form does not render DOM components slowly, as this is not a performance issue. JavaScript events are supported within an apex:form control, as this is not a limitation.

Salesforce Reference: B2B Commerce Developer Guide: CCRZ JavaScript Object, B2B Commerce Developer Guide: Page Includes

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments