Background
Domino includes a very powerful web engine, which allows us to
access Notes data through a browser without major changes. Though we
can handle mixed environements, we'll concentrate herein on web
applications, where we'll go beyond the standards generated by domino.
As a further condition, we use a domino view without any modification.
(Some minor text formating changes, i.e. Font: Default sans serif,
size 10, color black, Style plain for all, headers and body, may
optimize speed, but are not imperatively required.)
Preparation
| We need a form |
| |
We create a form with the name "$$ViewTemplateDefault". |
| |
We create a field within this form with the name $$ViewBody of
Type Text, Computed for Display and the content ""
(empty). |
| |
From Objects, we select HTML Head Content and enter the
following 2 lines:
DBPath :=
"/"+@Unique(@ReplaceSubstring(@Subset(@DbName;-1);"\\":"
";"/":"+"))+"/";
"<link rel=\"stylesheet\"
href=\""+DBPath+"view.css\"
type=\"text/css\">" + @NewLine |
| |
We save the form. |
| And we need a page** |
| |
We create a page with the name CSSview and the alias view.css |
| |
| In R5, we set the attributes as shown beside. |
 |
| In ND6, we set the attributes as shown beside.
It's important to select Content type "Other" and to
write "text/css" as shown. In ND6 a new field
"$MimeType" with the content "text/css" is
created, which assures the proper Content type to be sent to the
browser. Leaving the Content type to the default selection
"HTML", will generate warnings in w3c compliant
browsers. |
 |
|
| And we write the content of the stylesheet view.css
(excerpt shown) |
| |
table {
border: 0px;
border-spacing: 1px;
padding: 0px;
background-color: #FF0000;
}
td {
font-size: 9pt;
font-weight: 400;
text-align: left;
color: #000000;
font-family: Helvetica, Arial, sans-serif;
padding-left: 5px;
padding-right: 5px;
padding-top: 2px;
padding-bottom: 2px;
border-width: 1px;
border-style: dashed;
border-color:#008000;
} |
| To get the feeling how it works, change the padding
values, play with colors and background-color, border-style,
border-width, etc. To learn more about css consult w3.org: |
For your convenience you may download the zipped nsf-DB with the
fully working example
test CSS DB
** since ND6 we can include external style sheets under the section Shared Resources. This is a very powerful feature for site wide common style sheets, but for dedicated solutions as our example, pages are much easier to handle.
|