Domino Attachment Builder

 

In this topic ...

Quick Tips

Specifying Inputs

Related Topics ...

Using a Data View Portlet

Paging Assistant Techniques

Use the Domino Attachment Builder whenever we need to give a user the ability launch / view file attachments for a Domino document.

The Domino Attachment Builder creates a set of HTML links for display on a page. Each link created by the builder represents a file that was attached to a Domino document. Clicking on one of these links causes the associated file to be downloaded by the browser and, optionally, have an associated program launched with the file as the content to be displayed or edited.

For example, if a Domino document has a ZIP file attachment, then clicking on the link for this attachment would cause your browser to download the ZIP file and launch the program, if any, registered with the browser to open ZIP files.

 

How this Builder Works

The Domino Attachment Builder works in conjunction with either a Domino View Builder or a Domino View & Form builder. The Attachment Builder uses the Domino View artifacts created by the other builders to communicate with the back-end Domino server while creating the links for a Document s attachments.

The builder performs the following high-level actions at runtime when a page containing its links is requested:

  1. The builder obtains the Domino document for which attachment links are to be created. The document is referenced by the unique ID value contained in the "Document UNID" builder input.

  2. The builder then extracts the value of the first document field identified by the "Item" builder input. If this is a Domino "RichText" field, then the process continues. Otherwise link generation is aborted since file attachments are only located in "RichText" fields.

  3. The builder then iterates through all of the embedded objects present in the field looking for file-attachment objects. For each file-attachment object a link is generated and placed on the requested page. All other embedded object types are ignored.

 

Quick Tips

  • Provide a UNID -- Use a Domino View & Form builder to display a set of documents contained in a View. Also let the user select a specific document and thereby provide the "Document UNID" input for the Domino Attachment builder.

  • First Field Found -- Domino documents can contain multiple fields of the same name. This builder creates links only for attachments contained in the first field found.

  • Rich Text Required -- The document field must be of the "RichText" type; these are the only fields that contain file attachments.

  • No OLE -- The builder will include links for file attachments only. OLE objects and their links are ignored.

 

Specifying Inputs

The Domino Attachment builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."

Input Name Description
Name Enter a name for this builder call. The Designer displays this name in the Builder Call List.
Page Location Use the Page Location input to specify the page or pages on which this builder call will act.

See "Locating Control Builders on Pages" for detailed documentation about the Page Location input and page location syntax.

Domino Connection Helper Enter the name of the Domino artifact through which the Attachment builder is to communicate with the back-end domino server.

This input is automatically populated with all of the valid choices based upon the builder content of the model.

Document UNID Provide the unique ID of the document for which file attachment links are to be created at runtime.

Normally another builder would set the value of this input automatically when the user selects a specific Domino document for detailed display

Item Provide the name of a "RichText" document field that can contain file attachments.
Custom Link Formatting
Display Page Use this input to import a custom HTML page used to display attachment links.
Page Tag Use this input to located links on the Display page. Select a tag on this page where you want to place the links.