.NODE

Inheriting Designs from Templates

Basing the design of a database on a template is generally done when the database is created and a design template is used to create the database.

CAUTION

When creating a database from a template, you can choose any of the check boxes in the Advanced tab to set whatever properties you want. The new database will not inherit the selections from the template, regardless of the selections you have made there. These settings must be made after the database is created.

 

Breaking Design Inheritance

You can continue to inherit the design elements from the template or break the relationship. You might find a database template that is very close to what you need, but you might want to change certain design elements. By breaking the relationship between the template and the new database, you can modify the design of the database safely. The design process on the server will not overwrite the new design if you have broken the relationship. To break the relationship between the template and the new database, deselect the Inherit Future Design Changes check box in the New Database dialog box, as shown in Figure 2.27.

Figure 2.27. Deselecting Inherit Future Design Changes breaks the relationship between a template and the new database.

graphics/02fig27.jpg

Another way to break this relationship is from the Database properties box. Select the Design tab and deselect Inherit Design from Template. The contents of the Template Name field will disappear.

Replacing the Database Design

A database can base its design on a template in yet another way: by replacing the database's design. To replace a database design, right-click the database on the Bookmark tab and choose Database, Replace Design. Choose the desired template, as shown in Figure 2.28, and click Inherit Future Design Changes.

Figure 2.28. The Replace Database Design window also lets you hide the design of a database.

graphics/02fig28.jpg

If you want to inherit future designs, make sure that Inherit Future Design Changes remains checked (the default).

CAUTION

The Hide Formulas and LotusScript check box is intended for final release of a database. When you select this option, you will no longer be able to edit the design of the database that you are creating. Hiding the design of a database removes all design access to the database formulas and LotusScript, even if you have Designer or Manager access to the database. Before choosing this option, be sure that you have a master design copy somewhere that does not have the design hidden. Also make sure that the template you are using does not have the design hidden.

 

Inheriting Individual Design Elements

As indicated earlier, individual design elements can inherit designs from templates. A single database can have elements from different templates; the design process keeps track of them all.

To copy individual design elements, follow these steps:

  1. Open the database template in the designer, and switch to the design folder for the design elements that you want to copy.
  2. Highlight the design element. You can select multiple elements by holding down the Control key and clicking once on each element.
  3. Copy the design elements to the Clipboard by pressing Ctrl+C or choosing Edit, Copy from the menu.
  4. Open the database into which you want to copy the design elements in the Designer.
  5. Open the appropriate design folder and press Ctrl+V, or choose Edit, Paste from the menu. Domino asks whether you want to have the forms automatically updated when the design of the template changes. To preserve the inheritance, choose Yes. See Figure 2.29.

    Figure 2.29. Domino asks whether you want to maintain the link to the template when you copy design elements into a database.

    graphics/02fig29.jpg

NOTE

When Domino copies design elements to the Clipboard, they are not copied to the Windows Clipboard. Instead, they are copied to a special file named ~clipbrd.ncf. These can then be pasted into other Domino databases or templates.

 

CAUTION

When a form contains a subform, a shared field, a shared action, or any other shared element, the subform or shared element must be copied and pasted independently. If you fail to do so, the form will not be able to find the subform or shared element and will not function properly.

 

If you attempt to change a design element that inherits its design from a template, you get a warning message indicating that any changes you make to the design element will be lost when the Design task runs on the server and updates the design of your database.

Just as you can break the association between a database and a template, you can break the association between an individual design element and the template. This can be done without breaking the association for all other design elements in the database.

To break the association between a design element and the template that replaces the database design, you must do the following:

  1. Highlight the design element in the design folder.
  2. Choose Design, Design Properties from the menu, or right-click and choose Design Properties from the context menu.
  3. Choose the Design tab from the properties box.
  4. Click the check box for Prohibit Design Refresh or Replace to Modify.

These options are displayed in Figure 2.30. Notice that the field Inherit from the Design Template is populated with the template name.

Figure 2.30. The design template settings are specified in the Design Document properties box. Note that the design documents that inherit designs have a special symbol in the left margin.

graphics/02fig30.jpg

Some elements are not refreshed, however. They are as follows :

  • The database ACL
  • The database title and category
  • Any design elements that you have set with the design property of Prohibit Design Refresh or Replace to Modify
  • All of the properties in the Advanced tab of the Database properties box

These examples have shown you how easily design elements can be copied from a template into your own database. Design changes to the template can be inherited or not, depending on your needs. Agents can be copied in the same way. This technique also works from database to database; in other words, copying design elements can take place from both Domino templates and Domino databases. This is a fast and easy way to avoid reinventing the wheel.

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

show all menu





Lotus Notes and Domino 6 Development
Lotus Notes and Domino 6 Development (2nd Edition)
ISBN: 0672325020
EAN: 2147483647
Year: 2005
Pages: 288
Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net