Before you add columns or other elements to the view, I want to take a moment to discuss the View properties box, which provides options for setting colors and styles as well as global indexing options. This is where you enter the name and the alias for a view. There are six tabs on the View properties box:
Setting View Info Properties
The View Info tab (see Figure 6.4) is where you name views, create aliases, and choose the type of view. Names are entered in the Name field and cannot exceed 64 characters . It is always a good idea to create a view alias, just as it is a good idea to create a form alias. Views can be referred to in formulas just as forms can. Using a view alias in formulas allows the view name to be changed without affecting the formulas. Keep the alias short to facilitate use in a formula. As the number of views grows, you will probably want to collect them into folders. This involves changing the name; if you have been careful to use a view alias and to use that alias in formulas referencing the view, no formulas have to be changed.
Figure 6.4. The View Info tab of the View properties dialog box includes a field for defining the alias.
Some views are actually hidden from users. These views appear in the View Design folder with parentheses around them. Placing the view title in parentheses hides the view.
NOTE
Hidden views can be useful. I often use a hidden view for populating keyword fields in a form by using @DbLookup() and @DbColumn() formulas to access the data in the view. To distinguish this type of hidden view from other hidden views, I use LU for "look up" as the first two letters of the name. (LUDept) and (LUCustomer) are typical examples. I try to avoid using regular views for lookup purposes because if users want a change to the view, it's easy to forget that it's a lookup view and make changes that cause the lookups to fail.
You can collect views into folders and cascade them by naming them with the backslash (). Everything to the right of the slash appears either inside a folder or cascaded on the menu. This allows the designer to collect related views together easily. Up to 200 cascading views can be added to a database ”a limit that, in practice, you'll never reach. If the views are included on the View menu, there is a limit of nine views per level, after which Other appears on the menu. Clicking Other produces a dialog box that displays all the views. In my opinion, it is best to leave the views completely off the View menu, avoiding the Other window altogether. Another reason to keep views from the View menu is that users are accustomed to working with the Navigation pane, not the View menu, to navigate the database. Users typically won't look at the View menu to navigate. If for some reason, however, the design calls for the views to be on the View menu, take all possible precautions to keep the levels to nine or fewer.
A field called Comment can be used for a simple description of the view. Although the text scrolls in the field, it is impossible to view the complete comment. Practically speaking, the comment is limited to the visible area of the field. Oddly enough, the comment does not even appear in the design synopsis of the view.
The last field on the View Info tab is the Style field. Not to be confused with the Style tab, this field has two selections: Standard Outline (the default) and Calendar. Most views are created in the Standard Outline style; the Calendar style creates a view similar to the Calendar view in your mail database.
Setting View Options Properties
Many of the choices on the Options tab are self-explanatory (see Figure 6.6). Here you define a default view for your database, which appears when the database is first opened. You can also set the property Default Design for New Folders and Views. As described earlier, when you do so, the default view is automatically chosen as the template for all new views that you create.
Figure 6.6. The Options tab of the View properties box is where the default view for the database is selected.
TIP
It is often a good idea to make sure that the view you select as the default design does not exclude any documents. This is the view upon which new views and folders will be based.
If the view includes sorted and categorized columns, documents appear under the categories. Choosing Collapse All When Database Is First Opened causes only the top-level categories to appear. Show Response Documents in a Hierarchy is chosen by default; this selection causes response documents to be indented under the parent document. This is commonly used in discussion databases. Selecting Show in View Menu causes the view to appear in the View menu.
The Allow Customizations check box is new to Notes and Domino 6. If you click this check box, users can customize the view. This includes moving columns in the view, resizing columns, and changing colors. Note that sticky column sorts are available even if you set this option.
The setting Evaluate Actions for Every Document Change is also new to Notes and Domino 6. If you select this feature, each time you move to a new document, actions such as hide-when are evaluated. As you can imagine, this can have a negative impact on performance, so use this feature carefully .
By selecting the option Create New Documents at the View Level, also new to Notes and Domino 6, you can save users some time by letting them create and edit documents at the view level, instead of using a form. For this to work, you must program the InViewEdit event for the view and, for each column that is editable, select the property Editable Column from the Column Properties dialog box. The view displays with the text Ctrl+Click Here to Add a New Document after the last row.
On Open has three choices: Go to Last Opened Document (the default), Go to Top Row, and Go to Bottom Row. The last two choices are useful if the documents are sorted by date, for example. If the first column in the view is sorted by descending date, Go to Top Row moves the document highlight to the most recent entry.
On Refresh has four choices: Display Indicator, Refresh Display, Refresh Display from Top Row, and Refresh Display from Bottom Row. In my experience, these settings are rarely used; I prefer to leave this field set at the default. The display indicator is visible in Figure 6.7 and is a small circular arrow that appears to the left of the view column header. This visual cue lets the user know that the view needs to be refreshed; clicking the display indicator refreshes the view. Visual cues are an important facet of UI design, and you should use them when they're available.
Figure 6.7. The view refresh indicator displays whenever a new document has been added to the database that is not showing in the view.
Setting Style Properties
The numerous settings on the Style tab (see Figure 6.8) fall into six categories:
Figure 6.8. The Style tab of the View properties box has many settings for the developer.
Setting Launch Properties
The Launch tab can be seen in Figure 6.9. Once you have chosen a frameset from the list, you can specify which frame the view will use. This is available only to Web browsers, as the caption on the properties box indicates. The frameset must already exist, and the individual frames must be named.
Figure 6.9. The Content frame is specified on the Launch tab of this View properties box.
Setting Advanced Properties
The Advanced tab has many settings of interest to developers (see Figure 6.10). There are five groups of settings on this tab:
Figure 6.10. The Advanced "propeller beanie" tab has choices for Index, Unread Marks, ODBC Access, Web Access, and Logging.
TIP
The Refresh Index options can be changed from automatic to one of the other choices to improve performance. If a column formula is based on @Now or another time-dependent function (such as you might use to "age" documents), the refresh indicator displays constantly. To eliminate this, you can either turn off the display indicator or change the Refresh Index options to Manual or Auto, at Most Every XX Hours. Changing the Discard Index options from the default of Never can be used to conserve disk space. If the index is discarded, displaying it subsequently can be very time-consuming .
The view applet provides Web clients with the following abilities for manipulating a view from the Web:
Setting Security Properties
The Security tab (see Figure 6.11) controls access to the view. Access is normally set to All readers and above, but by deselecting this, you can restrict the readers of a view. The window is scrollable and displays the users and groups in the ACL, as well as the roles for the database. The button to the right of the window allows access to the Domino directory. Using roles in conjunction with Author access in the database ACL is a powerful way to extend editing privileges to certain documents without giving the user Editor access to the entire database. You can further extend this control by not allowing certain forms to appear on the Create menu and using a view with limited access. Putting an Action bar button on that view or views to create documents using a specific form effectively restricts create access to those documents.
Figure 6.11. The Security tab (the Key icon) controls read access to the view.
The option Available to Public Access Users works in conjunction with the ACL properties Read Public Documents and Write Public Documents. Your mail database uses these properties to allow access to your calendar.
Part I. Introduction to Release 6
Whats New in Release 6?
The Release 6 Object Store
The Integrated Development Environment
Part II. Foundations of Application Design
Forms Design
Advanced Form Design
Designing Views
Using Shared Resources in Domino Applications
Using the Page Designer
Creating Outlines
Adding Framesets to Domino Applications
Automating Your Application with Agents
Part III. Programming Domino Applications
Using the Formula Language
Real-World Examples Using the Formula Language
Writing LotusScript for Domino Applications
Real-World LotusScript Examples
Writing JavaScript for Domino Applications
Real-World JavaScript Examples
Writing Java for Domino Applications
Real-World Java Examples
Enhancing Domino Applications for the Web
Part IV. Advanced Design Topics
Accessing Data with XML
Accessing Data with DECS and DCRs
Security and Domino Applications
Creating Workflow Applications
Analyzing Domino Applications
Part V. Appendices
Appendix A. HTML Reference
Appendix B. Domino URL Reference