Administrators can update properties for multiple buyers using the Edit Multiple Users pages. This is useful if you want to set a profile property of multiple users with the same value. For example, you could set the purchase limit for 20 users to $5000. Using the Edit Multiple Users features, you could do that with a single form submission.

We used the atg/userprofiling/MultiUserUpdateFormHandler component for group updates in Motorprise. This component requires the repository IDs of the users whose profiles are being updated. They are set in the repositoryids property.

For more information on the MultiUserUpdateFormHandler, see the API.

Profile properties are updated using the MultiUserUpdateFormHandler.value dictionary. The values in this dictionary are applied to all the users whose user IDs are included in the repositoryIds property. For example, to update orderPriceLimit for all the users whose repository IDs are set in MultiUserUpdateFormHandler.repositoryIds, the following format can be used: MultiUserUpdateFormHandler.value.orderPriceLimit.

For arrays, sets, lists, and maps of other items, we set them by using an ID to refer to an item that already exists. We do this by setting the special sub-property called repositoryIds of the property. For example, to set the roles of the user, which is a map, we use input tags like this:

<dsp:input type="checkbox" bean="MultiProfileUpdateFormHandler.
  value.roles.repositoryIds" value="r001"/>

The update operation is called using a submit button that submits to MultiProfileUpdateFormHandler.update.

The code below demonstrates how to set the OrderPriceLimit property and the roles of users whose user IDs are Id001 and Id002:

<%@ taglib uri="http://www.atg.com/dsp.tld" prefix="dsp" %>
<dsp:page>

<dsp:form action="xxx" method="post">
   <dsp:input bean="MultiUserUpdateFormHandler.repositoryIds"
      type="checkbox" value="Id001"/>
   <dsp:input bean="MultiUserUpdateFormHandler.repositoryIds"
      type="checkbox" value="Id002"/>
   <dsp:input bean="MultiUserUpdateFormHandler.value.OrderPriceLimit" type="text"
      value=""/>
   <dsp:input bean="MultiUserUpdateFormHandler.value.roles.repositoryIds"
      name="Admin" type="checkbox" value="R001"/>
   <dsp:input bean="MultiUserUpdateFormHandler.value.roles.repositoryIds"
      name="Buyer" type="checkbox" value="R002"/>
   <dsp:input bean="MultiUserUpdateFormHandler.update" type="submit"
      value="submit"/>
</dsp:form>
</dsp:page>
 
loading table of contents...