Multi-profile form handlers use the ATG servlet bean ProfileErrorMessageForEach to display error messages. For more information about this servlet bean, see Single Profile Form Handler Error Messages.

You can also access the MultiProfileAddFormHandler.formExceptions property to find a summary of exceptions, one for each type of exception that is generated during a submit operation. You can also obtain exceptions for each user profile through this syntax:

MultiProfileAddFormHandler.users[index].formExceptions

For example, the following code collects a summary of form errors:

<%-- To handle the summary list of errors - duplicate exceptions eliminated --%>
<dsp:droplet name="Switch">
   <dsp:param bean="MultiProfileAddFormHandler.formError" name="value"/>
   <dsp:oparam name="true">
      <dsp:droplet name="ProfileErrorMessageForEach">
         <dsp:param bean="MultiProfileAddFormHandler.formExceptions"
         name="exceptions"/>
         <dsp:oparam name="output">
            <dsp:valueof param="message"/>
         </dsp:oparam>
      </dsp:droplet>
   </dsp:oparam>
</dsp:droplet>

The following code collects errors generated by specific user profiles:

<%-- To see the errors generated for each user --%>
<dsp:droplet name="/atg/dynamo/droplet/ForEach">
   <dsp:param bean="MultiProfileAddFormHandler.users" name="array"/>
   <dsp:droplet name="Switch">
      <dsp:param bean="MultiProfileAddFormHandler.users[param:index].formError"
      name="value"/>
      <dsp:oparam name="true">
         <dsp:droplet name="ProfileErrorMessageForEach">
            <dsp:param
            bean="MultiProfileAddFormHandler.users[param:index].formExceptions"
            name="exceptions"/>
            <dsp:oparam name="output">
               <dsp:valueof param="message"/>
            </dsp:oparam>
         </dsp:droplet>
      </dsp:oparam>
   </dsp:droplet>
</dsp:droplet>