ATG’s built-in map converter facilitates the entry of map property values on forms. You can use it with dsp:input as follows:

<dsp:input bean="" converter="map" value="key=value" />

Note: The map converter is not required by the RepositoryFormHandler, which can handle Map data in its own way (see Managing Map Properties in the RepositoryFormHandler chapter).

For example:

<dsp:input bean="FormHandler.address" converter="map" value="street=" />
<dsp:input bean="FormHandler.address" converter="map" value="city=" />
<dsp:input bean="FormHandler.address" converter="map" value="state=" />
<dsp:input bean="FormHandler.address" converter="map" value="zip=" />

The converter attribute is set to the map tag converter, which ensures that on form submission, the Map settings are applied correctly to the target Map property.

You can also use a hidden input control to set a Map property with multiple key/value pairs, as in the following example:

Please verify the following address:<br/><br/>

Street:&nbsp;<c:out value="${emp.street}"/>  <br/>
City::&nbsp;<c:out value="${}"/>     <br/>
State::&nbsp;<c:out value="${emp.state}"/>   <br/>
Zip code::&nbsp;<c:out value="${}"/>  <br/>

<dsp:input type="hidden"
  bean="FormHandler.address" converter="map"

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