Setting values for multiple profiles is similar to setting values for a single profile. Input fields on a registration page are used to set the form handler’s value Dictionary, where data is stored pending a form submit operation such as create or update. On form submission, all values in the dictionary are written to the selected user profiles as a single transaction.

For detailed information about setting profile values, see Setting Profile Values earlier in this chapter.

Setting Values for Individual Profiles

The MultiProfileAddFormHandler contains a users property, which is a list of all user profiles. This property provides access to the property values of individual profiles. The following example uses ForEach to iterate over all user profiles in users, and display text input fields for each one:

<dsp:droplet name="/atg/dynamo/droplet/ForEach">
  <dsp:param bean="MultiProfileAddFormHandler.users" name="array"/>
  <dsp:oparam name="output">
     <dsp:input bean="MultiProfileAddFormHandler.users[param:index].firstName"
     <dsp:input bean="MultiProfileAddFormHandler.users[param:index].lastName"
     <dsp:input bean="MultiProfileAddFormHandler.users[param:index].birthDate"
     <dsp:input bean="MultiProfileAddFormHandler.users[param:index].phoneNumber"

Note: The number of user profiles in users is set by the form handler’s count and maxCount properties. The count property must be set in the handler before the form can be rendered. For more information, see the count property.

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices