The following example shows how to update multiple user profiles.

<%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0" prefix="dsp" %>

<%@ page import="atg.servlet.*"%>

<dsp:page>
<HTML>
<HEAD>
<TITLE>Update Contact Information Checklist</TITLE>
</HEAD>

<dsp:importbean bean="/atg/userprofiling/MultiProfileUpdateFormHandler"/>
<dsp:importbean bean="/atg/dynamo/droplet/RQLQueryForEach"/>

<BODY>
<%-- This page displays a list of users beginning with the letter 's', using the
RQLQueryForEach droplet - It allows you to check off the users you'd like to
update and offers a few property <dsp:input> tags for you to update the selected
user
information --%>

<%-- The next line sets the action page for this form to be the same as the
current page --%>
<dsp:form action="<%=ServletUtil.getDynamoRequest(request).getRequestURL()%>"
method="post">

<%-- The next two lines set the form redirection locations for success or failure.
--%>
<dsp:input bean="MultiProfileUpdateFormHandler.updateSuccessURL" type="hidden"
value="MultiProfileDelete.jsp"/>
<dsp:input bean="MultiProfileUpdateFormHandler.updateErrorURL" type="hidden"
value="myUpdateError.jsp"/>

<h3>Select which users to update:</h3>

<%-- For testing purposes, this page finds users with firstname beginning with 's'
--%>

<dsp:param name="beginChar" value="s"/>
<%-- The following droplet displays the list of users with a checkbox for each
one. When boxes are checked, the repositoryId for that user is placed in the
repositoryIds array property. --%>
<dsp:droplet name="/atg/dynamo/droplet/RQLQueryForEach">
        <dsp:param name="repository"
        value="/atg/userprofiling/ProfileAdapterRepository"/>
        <dsp:param name="itemDescriptor" value="user"/>
        <dsp:param bean="/atg/dynamo/transaction/TransactionManager"
        name="transactionManager"/>
        <dsp:param name="queryRQL" value="firstName STARTS WITH IGNORECASE
            :beginChar"/>
        <dsp:oparam name="outputStart">
                <table width=100% cellpadding=0 cellspacing=0 border=0>
        </dsp:oparam>
        <dsp:oparam name="output">
                <tr><td>
                <dsp:input bean="MultiProfileUpdateFormHandler.repositoryIds"
                paramvalue="element.repositoryId" type="checkbox"/>
                <dsp:valueof param="element.firstName"/>&nbsp;
               <dsp:valueof param="element.lastName"/>
                </td></tr>
        </dsp:oparam>

        <dsp:oparam name="outputEnd">
                </table>
        </dsp:oparam>

        <dsp:oparam name="error">
                *** Error occurred *** <p><p>
                <dsp:valueof param="rqlException"/>
        </dsp:oparam>
                <p>*** No results returned ***

</dsp:droplet>

<%-- This table displays the list of properties to be set for each of the checked
users --%>
<table border=0>
  <tr>
    <td valign=middle align=right>Aggressive Index:</td>
    <td><dsp:input bean="MultiProfileUpdateFormHandler.value.aggressiveIndex"
maxsize="30" size="30" type="text"/></td>
  </tr>
  <tr>
    <td valign=middle align=right>Goals: (short-term,retirement-focus)</td>
    <td><dsp:input bean="MultiProfileUpdateFormHandler.value.goals" maxsize="30"
size="30" type="text"/></td>
  </tr>
  <tr>
    <td valign=middle align=right>Strategy:(moderate,aggressive)</td>
    <td><dsp:input bean="MultiProfileUpdateFormHandler.value.strategy"
maxsize="30" size="30" type="text"/></td>
  </tr>
</table>

<dsp:input bean="MultiProfileUpdateFormHandler.update" type="submit"
value="update"/>
<dsp:input bean="MultiProfileUpdateFormHandler.cancel" type="submit"
value="cancel"/>
</dsp:form>
</BODY>
</HTML>
</dsp:page>

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