The DSP library provides form processing tags that are similar to their HTML equivalents. In general, these tags support standard HTML attributes. On page compilation, these attributes are simply passed through to the HTML page. For example, the text input tag has a size attribute that specifies the width of the text input field. If you specify size=25 for a text input tag, after page compilation the resulting field is 25 characters wide.

Name Attribute

Unlike standard HTML, which requires the name attribute for most input tags; the name attribute is optional for DSP form element tags:

Note: If name attributes are used, they must be unique for each property set in the form.

Do not use dynamically generated name attributes for input tags. Dynamically generated names can result in memory leaks. For example, do not use repository IDs to name input fields.

Attribute Values

Unlike HTML forms, ATG forms require an explicit value for all attributes. For example, an HTML input tag that creates a checkbox can specify the checked attribute without supplying a value, in order to specify that the checkbox is selected by default. For example, the following HTML specifies to check the primary checkbox:

Primary residence:
<input type="checkbox" name="re" value="primary" checked /><br />
Vacation home:
<input type="checkbox" name="re" value="vacation" /><br />
<input type="checkbox" name="re" value="other" />

This construction is invalid in JSP tags, where all attributes must be explicitly set to a value. Thus, the corresponding dsp:input tag must use this form:

Primary residence
<dsp:input type="checkbox" name="re" value="primary" checked="true" />

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