Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

setBehaviorOverride(overrideKey, overrideValue)

Updated on July 20, 2021

Sets or updates flags to override default behavior at runtime.

Note:
  • This API adds or updates the value of the provided override key. The values of the other existing override keys are not updated. For example, if the dynamicLoadComponents override has been set to false and you call setBehaviorOverride( “dynamicSetCookied”, false), the value of dynamicLoadComponents is left unchanged.
  • Currently, only the following override flags are supported:
    • The dynamicLoadComponents override flag has a default value of true. When set to true, the runtime will load all components that have not already been loaded when the content on the page in the single page application changes and indicates that one or more component types are required for that page. When set to false, the runtime will not attempt to load components dynamically, and assumes that all components will be loaded as part of the application’s initial load.
    • The dynamicSemanticUrl override flag has a default value of true. When set to true, a semantic URL for the single page application page is generated when needed. When set to false, the runtime will not attempt to update the application’s semantic URL dynamically. This can be useful when it would be inappropriate to have a change in the mashup page affect the URL of outer page that contains the mashup.
    • The dynamicSetCookie override flag has a default value of true. When set to true, the application establishes a cookie for the application that assists with access to the static content server. When set to false, the runtime will not attempt to set the application’s C11n cookie dynamically. This can be useful when we want to use or leverage the cookies of the application that contains the mashup.

Returns

Not applicable.

Parameters

NameTypeDescriptionRequired
overrideKeystringThe key value for the behavior override flag.
overrideValueanyThe desired value of the override key.

Usage example

In this example, the API sets the dynamicLoadComponents override to false. While this override is set to false, the application will not try to dynamically load any components that are marked as required for the single page application’s page. It is assumed that all components that may be encountered have already been loaded.

PCore.setBehaviorOverride( "dynamicLoadComponents": false );

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us