In Motorprise, we overrode the $scope of the MultiUserAddFormHandler and MultiUserUpdateFormHandler components from request to session to address our multi-page registration process in the Company Admin section of the store.

We wanted the information entered on various pages to be preserved throughout the entire process. Because this information is stored in the form handlers, we made them session-scoped

We chose to override the scope in the actual components because Motorprise is the only application that’s running. You could also configure your own instances of these components by copying the standard configurations and changing the scope to session in your versions.

If you change the scope in the original components, when you upgrade to a new version of Oracle ATG Web Commerce or install a patch that adds new properties to the form handlers or changes their default settings, you get the changes without having to do anything special.

However, if you have other applications running on the same server, and you override the scope in the original components, they will use session-scoped form handlers where they might expect request-scoped form handlers.

If you want to configure your own instances of these components, you must copy the standard configurations and change the scope to session in your versions.

To do this, you would copy the entire configuration of each default components to an application-specific path such as /atg/projects/B2BStore/userprofiling/MultiProfileFormHandler, change the scope of that component, and then use that component path in your JSPs.

You could set all of the property values using ^= to refer to the original component, like this:

trimProperties^=/atg/userprofiling/MultiProfileAddFormHandler.trimProperties

That way you don’t have to worry about exactly what the values are, you just have to make sure that you copy all of them into your component’s configuration. Using ^= copies a property value from one object to another. For more information on this command, see the ATG Platform Programming Guide.

However, when you create your own objects, you must remember to check the configurations when you install a new version or patch and update them to account for any properties that might be added to or removed from the original components.