Novell is now a part of Micro Focus

GroupWise WebAccess Customization: Making HTML Work for You

Articles and Tips: article

GARY ASHTON
Product Line Manager
GroupWare Division

KEN CIRCEO
Technical Writer
GroupWare Division

01 Sep 1996


Describes how to use the GroupWise WebAccess Customization functionality to modify HTML source files. Also presents an annotated list of variable tags.

Introduction

GroupWise WebAccess allows you to access your GroupWise mailbox and calendar from the Internet. WebAccess Customization lets you modify the HTML source files to include your own graphics or company information. You can also enhance WebAccess by creating additional calendar views.

This article describes how to use the GroupWise WebAccess Customization functionality to modify HTML source files so that you can include your own graphics or company information, or enhance WebAccess by creating additional calendar views. It provides a discussion and examples for display commands, presents a list of templates, and provides sample HTML templates for a login screen and a main menu. Finally, it presents an annotated list of variable tags.

Keywords

GroupWise WebAccess uses the following extensions to the HTML document format:

IF Variable Operator Value
/IF

ELSE
 WHILE Variable Operator Value
/WHILE

 SET Variable=Value
INC Variable
DEC Variable

 DISPLAY Variable[.Modifier]

Following the HTML format, each statement is enclosed by angle brackets (< and >).


IF, ELSE, /IF

IF Variable Operator Value
ELSE
/IF

Every IF statement must be terminated with /IF. GroupWise WebAccess supports all simple IF statements, as well as compound statements that consist of two simple IF statements joined by and(&) or or (|). Unlike WHILE, IF is only performed once per statement (see "WHILE" below).

Examples:

<IF Msg-Type="Mail">Mail Message</IF>

If the Msg-Type returned by the WebAccess is "Mail," the text "Mail Message" appears in the HTML document. Otherwise, nothing appears.

<IF Begin-Time.FORMAT=MONTHWORD = "January"> <OPTION SELECTED>
<ELSE><OPTION></IF>

If the formatted Begin-Time string is "January," the text <OPTION SELECTED< appears in the HTML document. Otherwise, the text <OPTION< appears.

<IF a < 10 | a > 20><DISPLAY a></IF>

If the variable a (declared with <SET a=0<) is less than 10 or greater than 20 when the IF statement is reached, the value of a is displayed as text in the HTML document. Otherwise, nothing is displayed.


WHILE,/WHILE

WHILE Variable Operator Value
/WHILE

The format of WHILE is identical to the format of IF. However, a single WHILE statement is performed repeatedly rather than just once (see "IF" above).

Example:

<SET a=0><SET b=10>

<WHILE a < 10>

<IF a < 2 | 6 ><DISPLAY a></IF>

<INC a>

<DEC b>

</WHILE>

This series of statements would display the following text in the HTML document:

0 1 2 3


SET,INC, DEC

SET Variable=Value INC Variable DEC Variable

SET declares and sets a variable which can be referenced later. INC increments a numeric variable by a value of 1. DECdecrements a numeric variable by a value of 1.

Example:

<SET a=0><SET b=10>
<WHILE a < 10>
<IF a < 2 | 6 ><DISPLAY a></IF>
<INC a>
<DEC b>
</WHILE>

This series of statements would display the following text in the HTML document:

0
1
2
3

DISPLAY

DISPLAY Variable[.Modifier]

DISPLAY shows the value of a variable that may have been declared using SET or declared by WebAccess. A variable can have multiple modifiers that follow the format:

.<MODIFIER-KEYWORD>=<MODIFIER-VALUE>

DISPLAY Commands


Command
Explanation

CASE

Allowsyou to declare uppercase or lowercase characters.

FORMAT

Validonly with date/time variables, which areset by WebAccess and cannot be declared.

INDEX

Takesyou into a sequential array of IDs.

WIDTHand JUSTIFY

Addspaces to the right and left of a field.

SHOW

Specifiesconversion to a particular format. See thetable below.


Usedwith SHOW, this command
Convertsthese characters
Tothis format

ESCAPEURL

spaces,carriage returns, and these characters &; & & | * ? & & &^ ( ) [ ] { } % $ \

%xxformat (where xx represents the hex ASCIIvalue of the character in the native HTMLLATIN 1 character set).

HTML

<br<,carriage returns,and these characters < < < <

their special HTML format

HTMLVAL

" (double quote)

' ' (single quotes)

Examples:

<DISPLAY Begin-Time.FORMAT=SHORTDATE.JUSTIFY=RIGHT.WIDTH=12<

This command would display the text "5/31/96" in the HTML document if the Begin-Time were May 31, 1996.

<DISPLAY Begin-Time.FORMAT=<%2/%5/31<.JUSTIFY=RIGHT. WIDTH=12<

This command would display the text "05/31/96" in the HTML document if the Begin-Time were May 31, 1996.

<SET a=0>
<WHILE TO.INDEX=a # "">
  <DISPLAY TO.INDEX=a>
  <INC a>
</WHILE>

This series of commands would display each occurrence of the variable TO as declared by WebAccess. For example, if a message were sent to multiple recipients, each recipient's name would be displayed.

HTML Templates

These HTML templates are available for modification:


ACCEPT.HTM

LOGINERR.HTM

REPLY.HTM

ACTERR.HTM

LOGOUT.HTM

SELCAL.HTM

COMPLETE.HTM

LOOKUSER.HTM

SELDSPL.HTM

DECLINE.HTM

MMENU.HTM

SELEND.HTM

DELEGATE.HTM

MSGDSPL.HTM

SELLIST.HTM

DELETE.HTM

MSGEND.HTM

SEND.HTM

FLDLIST.HTM

MSGLIST.HTM

SETUPERR.HTM

FORWARD.HTM

MSGLIST2.HTM

STATDSPL.HTM

INFDSPL.HTM

NOTYET.HTM

STATEND.HTM

INFEND.HTM

PREF.HTM

STATLIST.HTM

INFLIST

RDATT.HTM

TEMPLATE.HTM

LOGIN.HTM

RDMSG.HTM

Within each template, you can declare variables using the SET command. You can reference a variable that WebAccess has returned by using the following modifiers:

INDEX=<number< WIDTH=<number< JUSTIFY=<LEFT | RIGHT | CENTER< SHOW=<ESCAPEURL | HTML | HTMLVAL< FORMAT=(see table below)

FORMAT must be followed by one of the following codes or by a WordPerfect 5.1 date format string.

Within each template, you can declare variables using the SET command. You can reference a variable that WebAccess has returned by using the following modifiers:

INDEX=<number<<
WIDTH=<number<<
JUSTIFY=<LEFT | RIGHT | CENTER<<
SHOW=<ESCAPEURL | HTML | HTMLVAL<<
FORMAT=(see table below)

FORMAT must be followed by one of the following codes or by a WordPerfect 5.1 date format string.


FORMATModifier Keyword
DateFormat String

MONTH

"2"

DAY

"1"

YEAR

"4"

HOUR

"7"

MIN

"9"

MONTHWORD

"3"

WEEKDAY

"6"

HOUR12

"8"

AMPM

"0"

YEAR2

"5"

SHORTDATE

"$2/$1/5"

SHORTTIME

"$8:%90"

SHORTDATETIME

"$2/$1$8:%90"

LONGDATE

"6,3 1, 4"

LONGTIME

"8:%90"

LONGDATETIME

"6,3 1, 48:%90"

The types of requests WebAccess can anticipate include:

  • Attachment

  • Calendar request

  • Delete from outbox

  • List folders

  • List request

  • List user

  • Login

  • Logout request

  • Message list

  • Operate on item request

  • Outbox list request

  • Read attachment

  • Read message

  • Request was not processed

  • Security request

  • Security value

  • Send request

Representative variables are shown in the next section.

Samples

HTML Template for the Login Screen

! name LOGIN.HTM

! title - HTML document for intitial Login Screen

! warning - This is not HTML source that you would view from a browser



<HTML<<
<HEAD<<
<TITLE<GroupWise WebAccess</TITLE<<
</HEAD<<
<body<<
<!<
! Comment - To change the graphic that comes up when you log in, change GWGLOBE.GIF

! to the graphic of your choice.

!>>


<IMG SRC="/GW/<DISPLAY LANG</<DISPLAY HTMLVER</GIF/GWGLOBE.GIF" align=middle<<
<h4<<center<<h3<<
WebAccess - Information Anytime, Anyplace

</h3<</center<<


<IF More < 0<<SET ThisMore = More<<ELSE<<SET ThisMore = 25<</IF<<
<IF Folder-Drn = "-1"<<SET ThisDrn = "-1"<<ELSE><IF<
Folder-Drn >= 0 >>SET ThisDrn = Folder-Drn>>
<ELSE<<SET ThisDrn = 0 <</IF<</IF<<
</h4<<


<FORM METHOD=POST ACTION="/cgi-bin/GW/<DISPLAY LANG</GWWEB.EXE?DO-LOGIN<CONTEXT=<DISPLAY<
Context>>MORE=>DISPLAY ThisMore>>FOLDER-DRN=>DISPLAY ThisDrn>>FOLDER-EXT=>DISPLAY>
Folder-Ext.SHOW=ESCAPEURL>">>


<p<Name: <INPUT NAME=user_id TYPE=text SIZE=34VALUE="<DISPLAY Login.SHOW=HTMLVAL<"<<
<p<Password: <INPUT NAME=password TYPE=password SIZE=24< <INPUT TYPE=submit<
VALUE="Login">>
</form<<
</body<<
</HTML<<

HTML Template for the Main Menu

! name MMENU.HTM

! title - HTML document for intitial GroupWise menu

! warning - This is not HTML source that you would view from a browser



<HTML<<
<HEAD<<
<TITLE<GroupWise Main Menu</TITLE<<
</HEAD<<
<body<<h4<<
<h2<Main Menu of <DISPLAY Self-Name< </h2<<


<IF Message-Sent="Yes"<<
The message was sent.

<ELSE<<
<IF Request-Lost="Yes"<<
Your last request was not processed.

<ELSE<<
<SET a=Msg-Count<<DEC a<<
<IF a = More<<
You have more than <DISPLAY a< unread messages.<
<ELSE><
You have <DISPLAY Msg-Count< unread messages.<
</IF<<
</IF<<
</IF<<


<p<<
<a href="/cgi--bin/gwweb.cmd?OPEN=UNREAD<LOGIN=<DISPLAY<
Login.SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY>
Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>">>img src="/inboxun.gif">
 alt="[Unread] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?OPEN=INBOX&LOGIN=&DISPLAY&
Login. SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>">>img src="/inbox.gif">
alt="[In box] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?OPEN=CALENDAR&LOGIN=&DISPLAY&
Login.SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>">>img src="/calendar.gif">
alt="[Calendar] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?ACTION-SEND=MAIL&LOGIN=&DISPLAY&
Login.SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY>
Folder-Ext.SHOW=ESCAPEURL>>SELF-NAME=>DISPLAY Self-Name.SHOW=ESCAPEURL>>>img>
src="/send.gif" alt="[Send] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?OPEN=OUTBOX&LOGIN=&DISPLAY&
Login.SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY>
Folder-Ext.SHOW=ESCAPEURL>">>img src="/outbox.gif">
alt="[Out box] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?GET-DIRECTORY=GET-FOLDERS&LOGIN=&DISPLAY&
Login.SHOW=ESCAPEURL>>MORE=>DISPLAY More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>">>img src="/folders.gif">
alt="[Folders] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?LOGOUT&LOGIN=&DISPLAY Login.SHOW=ESCAPEURL&&MORE=&DISPLAY&
More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>">>img src="/gblogout.gif">
alt="[Logout] " align=middle>>/a>>a>


href="/cgi-bin/gwweb.cmd?HELP=200&LOGIN=&DISPLAY Login.SHOW=ESCAPEURL&&MORE=&DISPLAY&
More>>CONTEXT=>DISPLAY Context>>FOLDER-DRN=>DISPLAY>
Folder-Drn>>SELF-NAME=>DISPLAY Self-Name.SHOW=ESCAPEURL>>FOLDER-EXT=>DISPLAY Folder-Ext.SHOW=ESCAPEURL>>>img>
src="/gbhelp.gif" alt="[Help] " align=middle>>/a>>a0>>


</h4<</body<<
</HTML<<

Requests and Variable Tags

NGWINTER sends or receives GroupWise system variable tags based on the context of the request. The types of requests include:

  • Attachment

  • Calendar request

  • Delete from outbox

  • List folders

  • List request

  • List user

  • Login

  • Logout request

  • Message list

  • Operate on item request

  • Outbox list request

  • Read messagebgcolor

  • Read attachment

  • Request was not processed

  • Security request

  • Security value

  • Send request

Variable Tags


Tag
Description

END (Sent)

Anend-of-data indicator. Cannot be manipulated.

MORE (Sent)(list request)

Moreitems exist.

Attach Category(Sent)(read msg, att)

The values are Text, Audio, Other.

Attach Category Convert(Sent)(read msg, att)

The value is Text.

Attach Count(Sent)(read msg)

A count of item attachments.

Attach File(Sent)(read msg, att)

The file where the data is stored.

Attach File Convert(Sent)(read msg, att)

The name of the converted file.

Attach Id(Sentand received) (read msg, att)

Indexto the attachment. The value is 1 Attach-Count.

Attach Name(Sent)(read msg, att)

The original filename.

Attach Nest(Sent)(read msg, att)

The message was forwarded (Attach-Ids are separated by commas).

Attach Pop(Received)(read msg)

Getto the parent of the forwarded message.

Attach Size(Sent)(read msg, att)

The size of the attached file.

Attach Size Convert(Sent)(read msg, att)

The size of the converted file.

Attach Type(Sent)(read msg, att)

Numericdetect code (see Windows Client macro documentation.)

Attach Type Convert(Sent)(read msg, att)

The value is 160.

Attachment(Sent)(read att)

Comes with a binary tag.

BC(Sent and received)

(send, read msg)

Begin Time(Sentand received) (message list, calendar request, send)

format=DD/MM/YY HH:MM DOW day/month/year 24-hour:minutes day-of-week

Begin Request Time(Sent)(calendar request)

format= DD/MM/YY HH:MM DOW day/month/year 24-hour:minutes day-of-week

Binary(Sentand received) (send and read msg, att)

Messagesand attachments come and go in binary form.

CC(Sentand received)

(send, read msg)

Change Password(Received)

The value is the new password

Close Box(Received)

Closes current list and returns the unread message count.

Context(Sent with each request)

(security value)

Date Sent(Sentand received) (send and read msg)

format= DD/MM/YY HH:MM DOW day/month/year 24-hour:minutes day-of-week

Dec Date(Received)(calendar request)

Thevalues are Month, Day, Week.

Dir Count(Sent)

(list users)

Dir Num(Sent)

(List users)

Echo(Sent and received)

Echoesgiven to NGWINTER are returned with the request.

End Time(Sentand received) (send, read msg, calendar request)

format= DD/MM/YY HH:MM DOW day/month/year 24-hour:minutes day-of-week

End Request Time(Sent)(calendar request)

format= DD/MM/YY HH:MM DOW day/month/year 24-hour:minutes day-of-week

Error(Sent)

(request was not processed)

First Name(Sentand received)

(list users)

Folder Count(Sent)

(list folders)

Folder Drn(Sentand received)

(list folders, list request)

Folder Id(Sent)

(list folders)

Folder Level(Sent)

(list folders)

Folder Name(Sent)

(list folders)

From(Sent and received)

(list request, read msg, send)

From Text(Sent and received)

(outbox list request)

Get Context(Received)

(security value request)

Get Directory(Received)

(list users, folders)

Get Text(Received) (read att)

Convertattachment to text (Attach-Category must be Text).

Hash(Received)

(securityvalue, cannot be manipulated)

HtmlVer(Sent and received)

Valueis stored and echoed back with each request.

Inc Date(Received)(calendar request)

MonthDayWeek

Instance(Sentand received) (read msg, delete from outbox)

The values are All, This.

Lang(Sent and received)

Thevalue is stored and echoed back with each request. The value is used to determine thecode page for text conversion.

Last Name(Sentand received)

(list users)

List(Sent and received)

(list request)

Location(Sent and received)

(read msg and send)

Login(Sent and received) (login, all requests)

Onlogin, the value is user_id, password. For all other requests, the login is echoed withresult of request.

Logout(Received)

(logout request)

Message(Sentand received) (read msg and send)

Comes with binary tag.

Mime Comment(Sent)(read msg, att)

Thetext appears next to the "save to disk"icon. The text is configured through MIMETYPE.CFGin the gateway directory.

Mime Comment Convert(Sent)(read msg, att)

Mime-Commentfor the converted attachment. The text isconfigured through MIMETYPE.CFG in the gatewaydirectory.

Mime Type(Sent)(read msg, att)

Thevalue is passed as "Content-Type" to browser.

Mime Type Convert(Sent)(read msg, att)

Thevalue for the converted attachment (see "Mime-Type.")

More(Received)(list request)

Thenumber of items (users) to get in this request.

Msg Action(Received)(operate on item request)

Thevalues are:Accept Move-FolderComplete Read-AttachDelegate Read-NextDecline Read-PrevDelete Read-IdForward ReplyInfo Reply-All

Msg Count(Sent)

(list request)

Msg Drn(Sentand received)

(listrequest, read msg, att)

Msg Id(Sent)

(listrequest, read msg)

Msg Priority(Sentand received) (list request, read msg, send)

Thevalues are High, Normal, Low.

Msg Status(Sentand received) (list request, read msg, send)

Thevalues are Accepted, Unaccepted, Delegated, Declined.

Msg Type(Sentand received) (list request, read msg, send)

Thevalues are:AppointmentMailMail-UnopenedApptPhoneTaskNoteAppt-Task-NoteAll-Types

Nest Level(Sent)(read msg)

Messagewas forwarded (x times).

NOV API2(Sentand received with each request)

Thevalue must be 1.0.

Open(Received)(list request)

Thevalues are:CalendarIn-FolderOut-FolderInboxOutboxUnread

Password Bad(Sent)

(login request)

Phone Company(Sentand received)

(read msg, send)

Phone From(Sentand received)

(read msg, send)

Phone Number(Sentand received)

(read msg, send)

Reply Request(Sent)

(read msg)

Request Was(Sent)

Indicatesmain request was made. The value can be Open-Inbox,Get-Directory-Get-Users, and so forth.

Security(Sent)(read msg)

Thevalues are:NormalProprietaryConfidentialSecretTop-SecretFor-Your-Eyes-Only

Self Name

(Sent with each request)

Send(Received)

(send request)

Show Detail(Received)

(list users)

Status(Sentand received) (list request, read msg, send)

Thevalues are:Accepted RepliedCompleted RetractedDeclined StartedDelegated TransferredDeleted UnacceptedDelivered UndeletedDownloaded UndeliverablePurged UnreadRead

Subject(Sent and received)

(list request, read msg, send)

Task Priority(Sentand received) (read msg, send)

Thevalue is a single letter and number.

TO(Sentand received)

(listrequest, read msg, send)

Unknown User(Sent)

(send request failed)

User Display Id(Sent)(list users)

Thevalue is UserId if the Domain.PostOfficeis the same as the current user's Domain.PostOffice.

User Drn(Sentand received)

(list users)

User Id(Sent)(list users)

Valueis Domain.PostOffice.UserId.

User Name(Sent)

(list users)

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates