View design elements
Table of contents
In this section, we discuss the view design element and its proper and extended usage in our development practices. We assume that you have a basic understanding of the view design element, and focus more on how we can use this design element in our Web application development.
What is a view
The view design element is used to create both visual and functional structures for Notes Document Collections. Unlike Folder design elements, a view design element does not act as a container for Notes Documents, but rather acts as a filter or mask to show complete or subset Document Collections. A view design element can use a combination of selection formula, categorization, and sorting orders to provide an application with specific document collection content.
queries of Notes Document Collections can impact the performance of our applications. View design elements, via the view index, allows for a caching of such queries, providing a less performance-impacting alternative to runtime
queries. The view index is an internally stored indexing, storing the Notes Document Collection displayed in the given view design element. The view index consists of the view column and view entry content as displayed in the view design element.
The Domino Designer Help file includes more information about the view index, including the variable refresh options.
The view design element can be used to render Notes Document Collections by using several different methods provided to the Domino Web Developer. We discuss those methods in the following sections.
View content rendering options
The View Design Element allows for three primary rendering options: Domino-generated Views, Java Applet Views, and Treat Contents as HTML Views. In this section, we discuss the benefits and concerns of each of these rendering options.
By using Rapid Application Development (RAD), we can allow Domino to generate all of the HTML markup required to render the View Design Element UI.
- Allows us to quickly create and maintain Web Browser Client-accessible view design elements
- Allows us to modify view design elements in the Domino Designer WYSIWYG View Design Element editor
- Limited control over the rendered Content Type - Content Type: text/html
- Rendered markup (often) not Web Development Standards-compliant
- Rendered markup (often) generates inconsistant UI across different Web browser client programs and releases
- More advanced utilization requires hacking, including markup tags in column header labels, and other undesirable practices
Java applet views
The View Design Element, via preference setting, can be rendered as a Java applet when said element is viewed via a Web browser client. This rendering allows for category, column sorting, and other view design element-specific navigation facilities to be immediately presented to the browser client.
- Applets can be bandwidth intensive
- Applets are heavily dependent on currently configured and properly functioning Java Virtual Machine
- Applets do not facilitate more advanced Web 2.0 functionality
The use of Java Applet Views in Domino Web application development is a depreciated practice, in favor of Domino-generated Views and (ultimately) "Treat Contents as HTML" Views.
Treat contents as HTML views
The view design element, via preference setting, can be set to allow the view design element contents to be rendered as markup. The most application of this option is the generation of HTML markup to display table rows per documents in the View Notes Document Collection. This is our most flexible rendering option because it allows us to completely control the generated markup.
- Complete control over generated markup
- Rendered markup can be Web Development Standards-compliantCons:
- Requires better understanding of the markup language that is used
- Modifications to generated markup often require combination for Formula and markup language
The Treat Contents as HTML
preference can extend the intended usage of the view design elements when used in combination with a ViewTemplate
, which we discuss in the following section.
The $$ViewTemplate is a design element (often a Form Design Element) that is used as the rendered container for a View Design Element. The $$ViewTemplate can be used to structure rendered View Content, allowing us to expand the standard usage of View Design Elements. It can ultimately redefine how we architect our Domino Web applications.
The following table outlines the naming syntax for $$ViewTemplates.
$$View Template for View Design Element Name
Act as the $$ViewTemplate for the View Design Element defined.
$$ViewTemplate for people
Acts as the global $$ViewTemplate for views unless a specific $$ViewTemplate is defined.
By using multi-aliasing of design elements, we can further extend the usage of $$ViewTemplates. For example, let's say that we the following five view design elements:
1. Example View 1|example1
2. Example View 2|example2
3. Example View 3|example3
4. Example View 4|example4
5. Example View 5|example5
Say our example Domino Web application required that all of the view design elements, except Example View 2 and Example View 4, have a consistent look and function, while Example View 2 and Example View 4 have their own specific look and function. There are several different approaches that we can take to achieve this result. However the following example is considered the best practice for using $$ViewTemplates with multiple view design element requirements:
1. Alias your $$ReturnGeneralError with $$ViewTemplateDefault
2. Create a Form Design Element named $$ViewTemplate for example1|$$ViewTemplate for example3|$$ViewTemplate for example5
3. Create a Form Design Element named $$ViewTemplate for example2|$$ViewTemplate for example4
In the above example, we are using the design element name aliasing capabilities to create a single design element instance to handle commonly-designed $$ViewTemplates. We are additionally setting a $$ViewTemplateDefault, which do not render a view. This is a functional restriction measure to ensure that a user attempting to access (for example) Example View 6|example6, which may not be intended to be viewed from a Web browser client.
You can further simplify this example by adding an additional alias to the View Design Elements above. For example, Example View 1|example|example1
. Then your $$ViewTemplate for the specific views could utilize this additional alias: $$ViewTemplate for example
$$ViewTemplates can use two different approaches to display their view design element content:
- Embedded View Design Object
- $$ViewBody Field Object
Either of these objects acts as a placeholder for the view design element, and the content displayed in said placeholder can be electively controlled via Domino URL commands.
Domino URL commands and view design element content
Domino URL Commands can be utilized to affect rendered View Design Elements by controlling which subset of the Notes Document Collection is rendered. The following example shows the standard view design element URL command syntax:
The following table details several view design element-specific Domino URL commands and command attributes.
Domino URL command/attribute
Standard View Design Element rendering command
Standard View Design Element searching command
Rendering command which creates XML markup from View Design Element content
Attribute to define the total number of entries to return from the View Entries
Attribute to define the starting entry for the result set of View Entries
Attribute to define the entry result set to return from a categorized View Design Element
Attribute to define the starting entry for the result set of a sorted View Design Element
See All Domino URLs
for more Domino URL commands, attributes, and arguments.