JSP CUSTOM TAG LIBRARIES


form tag
Example

Provides access to a document. This tag should contain tags that build the JSP interface, such as the formula, item, richtext, select, and textarea tags, and the action and validation tags listed below.

Note To access an existing document, you must specify the document's unique id in the unid attribute of the form tag. Otherwise a new document is created.

Note If a page containing this tag is included in another page using the <jsp:include> action tag, the hypertext link that the validhref attribute creates will not function.

To perform client-side validation on user input, set the clientvalidate attribute of this tag to "true", set the clientvalidate attribute of the input tag to "onsubmit" or "onblur", and include one of the following validation tags to specify the type of validation to perform:

validatecc, validatedate, validatelength, validatepattern, validaterange, validaterequired, validatesummary, validatewith. These tags validate user input by either requiring a field to be filled or testing that an entered value conforms to a specified format, length, pattern or falls within a specified range. Be sure the name attribute of the input tag and validation tag are equal to indicate which Web control input to validate.

Note If you do not include one of these validation tags, no validation is performed.

The action tags include: deleteattachment tag, deletedoc, docnavimg, editdoc, newdoc, nextdoc, prevdoc, saveclosedoc, savedoc These tags work in conjunction with a hidden field on the form named das_op. An action tag sets the value of das_op to one of the supported actions and then calls the form.performSubmit() method. This method ensures that submission of all the controls on the form occurs before the form itself is submitted. The following table identifies the operation codes you use in the das_op field to set its value equal to an action:
Operation codeOperation it performs on the serverCorresponding tag
SSaves the current document and continues to display the current page.savedoc
SCSaves the current document and navigates to the page specified in the validhref attribute.saveclosedoc
DDeletes the current document.deletedoc
DADeletes the selected attachment. This operation only works in the context of an attachmentlist tag.
WCreates a new document.newdoc
NDisplays the next document in the view or database as the current page.nextdoc
PDisplays the previous document in the view or database as the current page.prevdoc
ESwitches the current form into edit mode.editdoc
Note If you are using client-side JavaScript to control form submission, you must use the form.performSubmit() method instead of form.submit() or the richtext and attachments controls will not function properly.

To save a document created with a form, either:


To create a new document as a top-level document, use the newdoc tag.

To create a new response to the current document, use the newdoc tag and set the asresponse attribute equal to true.

To delete the current document, use the deletedoc tag.

Contexts

Valid in:


Creates for:
Syntax
Attributes

clientvalidate


counter
dbname
dbserver
editmode
host
id
name
password
responseto
schema
unid
user
validhref
viewname
See the Common Domino JSP tag attributes section for definitions of debug, onfailure, and time.

HTML Attributes

Domino supports the following HTML tag attributes. See the Common HTML tag attributes section for their definitions.


Example
See Also