Internet Builder Class Reference
Internet Builder Class Reference
IBC Library
Reference
COPYRIGHT SoftVelocity Inc
All rights reserved.
This publication is protected by copyright and all rights are reserved by SoftVelocity Incorporated.
It may not, in whole or part, be copied, photocopied, reproduced, translated, or reduced to any
electronic medium or machine-readable form without prior consent, in writing, from SoftVelocity
Incorporated.
This publication supports Clarion Internet Connect. It is possible that it may contain technical or
typographical errors. SoftVelocity Incorporated provides this publication “as is,” without
warranty of any kind, either expressed or implied.
[Link]
Trademark Acknowledgements:
Btrieve is a registered trademark of Pervasive Software.
All other products and company names are trademarks of their respective owners.
CONTENTS 3
CONTENTS SUMMARY
FOREWORD 27
INTRODUCTION 29
BROKER CLASS 39
WEB SERVER CLASSES 61
WEB CLIENT MANAGER CLASS 91
BROWSER MANAGER CLASS 107
WEB FRAME CLASS 115
WEB WINDOW CLASSES 127
WEB CONTROL CLASS 217
WEBCONTROLCLASS DERIVED CLASSES 263
WEB AREA CLASSES 407
WEB REPORT CLASS 441
JSL MANAGER CLASS 449
JSL EVENTS CLASS 475
WEB FILES CLASS 487
LAYOUT HTML CLASS 507
SUBMIT ITEM CLASS 519
HTML CLASS 525
TEXT OUTPUT CLASS 569
HTTP CLASSES 579
INDEX 621
4 IBC LIBRARY REFERENCE
CONTENTS
FOREWORD 27
INTRODUCTION 29
Changes in this Book 28
About This Book 30
Clarion Internet Builder Classes 31
Class Libraries Generally.......................................................................................31
Internet Builder Classes—The IBC Library ..........................................................31
Using the IBC Library ...........................................................................................32
Internet Connect Terms and Concepts .................................................................. 32
Internet Builder Class Synopsis ............................................................................ 35
Internet Builder Class Header Files .......................................................................36
Internet Connect Templates and the IBC Library ................................................. 36
Documentation Conventions 37
Reference Item Formats and Syntax Diagrams .................................................... 37
Property (short description of intended use) ......................................................... 37
Method (short description of what the method does) ............................................38
BROKER CLASS 39
Overview 41
BrokerClass Concepts ............................................................................................41
Relationship to Other Internet Builder Classes ..................................................... 41
Internet Connect Template Implementation ...........................................................42
Source Files............................................................................................................42
Conceptual Example ..............................................................................................43
BrokerClass Properties 44
Client (WebClientManagerClass object) .............................................................. 44
Http (HttpClass object) ..........................................................................................44
Files (WebFilesClass object) .................................................................................45
ServerName (server identifier) ..............................................................................45
BrokerClass Methods 46
Functional Organization—Expected Use ..............................................................46
CloseChannel (close channel to application broker) .............................................47
GetAuthorizedInfo (get client password) ..............................................................48
GetClient (return WebClientManagerClass object) ...............................................49
GetRequestArguments (return browser request) .................................................. 50
Init (initialize the BrokerClass object) .................................................................. 51
Kill (shut down the BrokerClass object) ............................................................... 52
OpenChannel (open channel to application broker) ............................................. 53
ProcessHttpHeader (process incoming http)..........................................................54
SetClient (set client information) .......................................................................... 55
SetClientBrowser (set browser information) ........................................................ 55
TakeFile (send HTML code or JSL data)...............................................................56
TakeHtmlPage (prepare and send HTML code) ....................................................57
TakeJslData (prepare and send JSL data) ..............................................................58
TakeUnauthorized (prepare and send access denied page)....................................59
INDEX 621
CONTENTS 21
26 IBC LIBRARY REFERENCE
FOREWORD 27
FOREWORD
Once you’ve become familiar with the Clarion’s Internet Templates through
the Internet Application Guide, you may need more information on the finer
points of the Internet Builder Class properties and methods that the
templates rely on.
INTRODUCTION
The IBC Library Reference describes how this takes place, by providing an
overview of each class or related group of classes. It provides specific
information on the public properties and methods of each class, plus
examples for using them. It also shows you the source files for each class and
describes the relationships between the classes.
CHAPTER 1 INTERNET BUILDER CLASSES 31
The Internet Builder Classes (IBC Library) provide all the benefits of class
libraries in general. Plus, the Internet Connect Templates automatically
generate code that uses and reuses the robust, flexible, and solid (pre-tested)
objects defined by the IBC Library. Further, the templates are designed to
help you easily derive your own classes from the Internet Builder Classes.
Of course, you need not use the templates to use the Internet Builder Classes.
However, the template generated code certainly provides appropriate
examples for using the IBC Library in hand coded programs. Either way, the
bottom line for you is more powerful programs with less coding.
The Internet Builder Classes have a fairly specific focus or scope. That is, its
objects are designed to “Web-enable” a Clarion application. In effect, the
Internet Builder Classes turn your Clarion application into a dynamic
HTML code generator.
Key Terms
This book uses these terms as defined here. That is, Server always refers
to a Web-enabled Clarion application; Client refers to the Java-enabled
browser that is controlling the Server; and Broker refers to the
Application Broker that routes messages between the Client and Server.
Key Concepts
One very important point to remember is that the Server cannot initiate any
action on the Client. In the Internet context, the Client initiates Server
activity by sending something to the Server. The Client may send a request
for more information, or it may send data entered by the end user, or both.
The Server responds to the Client request, typically by generating and
sending more HTML code. The generated HTML code is structured so that
end user manipulation of the HTML controls sends additional requests to the
Server.
Client n
Client 2
Client
Any Java-enabled Web
Browser
Workstation
(Windows, OS/2, UNIX, etc.)
Request
Internet/
HTML
Intranet
Application Broker
Routes traffic between
Client and Server
Request
HTML
Server 2
Server n
Web
Web Web
Broker Client
Window Server
Class Manager
Class Class
object Class
object object
object
CHAPTER 1 INTERNET BUILDER CLASSES 35
BrokerClass
WebClientManagerClass
WebServerClass
WebWindowClass
Other Classes
There are several other classes in the IBC Library that help these main
classes accomplish their objectives. All of these Internet Builder Classes are
documented in the remainder of this book.
If you use the Internet Connect Templates, they automatically add the
appropriate files to your project. However, if you hand code your program
you must manually add some files to your project. See the Hand Coded
Programs in the Internet Connect User’s Guide for more information.
Internet ConnectTemplatesandtheIBCLibrary
The Internet Connect Templates rely heavily on the Internet Builder Classes.
However, the templates are highly configurable and are designed to let you
substitute your own class definitions if you wish. See Internet Builder Class
Templates—Classes in the Internet Connect User’s Guide for more
information on configuring the global level interaction between the Internet
Connect Templates and the IBC Library. See Internet Builder Class
Templates—Classes in the Internet Connect User’s Guide for more
information on configuring the IBC Library for individual controls.
CHAPTER 1 INTERNET BUILDER CLASSES 37
Documentation Conventions
Reference Item Formats and Syntax Diagrams
The documentation formats for Properties and Methods are illustrated in the
following syntax diagrams:
Implementation: A description of how the method currently accomplishes its objective. The
implementation may change with each release / version of Clarion.
Example:
FieldOne = FieldTwo + FieldThree !This is a source code example
FieldThree = Method(FieldOne,FieldTwo) !Comments follow the “!” character
BROKER CLASS
Overview 41
BrokerClass Concepts ............................................................................................41
Relationship to Other Internet Builder Classes ..................................................... 41
Internet Connect Template Implementation ...........................................................42
Source Files............................................................................................................42
Conceptual Example ..............................................................................................43
BrokerClass Properties 44
Client (WebClientManagerClass object) .............................................................. 44
Http (HttpClass object) ..........................................................................................44
Files (WebFilesClass object) ................................................................................ 45
ServerName (server identifier) ..............................................................................45
BrokerClass Methods 46
Functional Organization—Expected Use ..............................................................46
CloseChannel (close channel to application broker) .............................................47
GetAuthorizedInfo (get client password) ..............................................................48
GetClient (return WebClientManagerClass object) ...............................................49
GetRequestArguments (return browser request) .................................................. 50
Init (initialize the BrokerClass object) .................................................................. 51
Kill (shut down the BrokerClass object) ............................................................... 52
OpenChannel (open channel to application broker) ............................................. 53
ProcessHttpHeader (process incoming http)..........................................................54
SetClient (set client information) .......................................................................... 55
SetClientBrowser (set browser information) ........................................................ 55
TakeFile (send HTML code or JSL data)...............................................................56
TakeHtmlPage (prepare and send HTML code) ....................................................57
TakeJslData (prepare and send JSL data) ..............................................................58
TakeUnauthorized (prepare and send access denied page)....................................59
40 IBC LIBRARY REFERENCE
CHAPTER 2 BROKER CLASS 41
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts in the preceding chapter. This short topic
contains information and terms that are prerequisite to the following
material.
BrokerClassConcepts
InternetDataSinkClass
HttpClass
The BrokerClass uses the HttpClass to process incoming and outgoing HTTP
(Hyper-Text Transfer Protocol) headers. HTTP is the protocol that web
42 IBC LIBRARY REFERENCE
WebClientManagerClass
WebFilesClass
The BrokerClass uses the WebFilesClass to locate and identify files shared
with the client.
If your program uses the BrokerClass, it also needs these other classes. See
the Conceptual Example for more information.
SourceFiles
Conceptual Example
LinkBaseClasses EQUATE(1)
BaseClassDllMode EQUATE(0)
INCLUDE('[Link]') !declare TextOutputClass
INCLUDE('[Link]') !declare WebBrokerClass
INCLUDE('[Link]') !declare WebWindowClass
INCLUDE('[Link]') !declare WebClientManagerClass
INCLUDE('[Link]') !declare WebReportClass
INCLUDE('[Link]') !declare Internet EQUATEs
MAP
INCLUDE('[Link]') !declare Internet helper procedures
END
!data declarations
Broker BrokerClass !declare Broker object
HtmlManager HtmlClass !declare HtmlManager object
JavaEvents JslEventsClass !declare JslEvents object
WebServer WebServerClass !declare WebServer object
WebFilesManager WebFilesClass !declare WebFilesManager object
Client (WebClientManagerClassobject)
Client &WebClientManagerClass, PROTECTED
The Client property is a reference to the WebClientManagerClass object that
supplies information about the client’s browser and IP address.
Http (HttpClassobject)
Http &HttpClass
The Http property is a reference to the HttpClass object that processes
incoming and outgoing HTTP headers.
Implementation: The Init method instantiates an HttpClass object for this BrokerClass object.
SeeAlso: Init
CHAPTER 2 BROKER CLASS 45
Files(WebFilesClassobject)
Files &WebFilesClass
The Files property is a reference to the WebFilesClass object that locates and
identifies files shared with the client’s browser.
Implementation: The Init method sets the initial value of the Files property.
SeeAlso: Init
Implementation: The Init method sets the value of the ServerName property. The Application
Broker supplies the ServerName value when it launches the Server program.
SeeAlso: Init
46 IBC LIBRARY REFERENCE
BrokerClass Methods
The BrokerClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
Occasional Use:
CloseChannel close channel to application broker
GetAuthorizedInfo get client password
GetClient return WebClientManagerClass object
GetRequestArguments return browser request
OpenChannel open channel to application broker
ProcessHttpHeader process incoming http
SetClient set client information
SetClientBrowser set browser information
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Example:
[Link] PROCEDURE
CODE
[Link] !close communication channel
IF (NOT ([Link] &= NULL))
[Link]
DISPOSE([Link])
END
IF (NOT [Link] &= NULL)
[Link]
DISPOSE([Link])
END
SeeAlso: OpenChannel
48 IBC LIBRARY REFERENCE
When it demands a password, the client browser displays the contents of the
area parameter to the end-user. By default, this value comes from the
[Link] property.
Implementation: The GetAuthorizedInfo method relies on the HttpClass object to supply the
userid and password.
Example:
[Link] PROCEDURE
Password STRING(255)
UserName STRING(255)
CODE
[Link]([Link], UserName, Password)
RETURN [Link](UserName, Password)
GetClient (returnWebClientManagerClassobject)
GetClient, WebClientManagerClass
The GetClient returns a reference to the WebClientManagerClass object for
this BrokerClass object. The WebClientManagerClass object supplies
information about the client browser.
Implementation: The GetClient method calls the SetClient method to instantiate the
BrokerClass’ WebClientManagerClass object.
Example:
[Link] PROCEDURE(*BrokerClass Broker,SIGNED TimeOut,WebFilesClass Files)
ServerName CSTRING(255)
StartIndex SIGNED
EndIndex SIGNED
CODE
[Link] &= NEW SubmitItemClass
[Link] &= Broker
[Link] &= [Link]() !set reference to Client info
!etc.
SeeAlso: SetClient
50 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
Header EQUATE('Internet:')
CmdRequest EQUATE('Request')
HttpStart UNSIGNED
LenHeader SIGNED
LenCmdRequest SIGNED
LenCmd SIGNED
Request ANY
CODE
IF ([Link])
CASE EVENT()
OF EVENT:DDEexecute
Request = DDEvalue()
LenHeader = LEN(Header)
LenCmdRequest = LEN(CmdRequest)
LenCmd = LenHeader + LenCmdRequest
HttpStart = INSTRING(NewLine,Request,1,LenCmd+2)+2
[Link](SUB(Request,HttpStart,LEN(Request)-HttpStart))
SeeAlso: [Link]
CHAPTER 2 BROKER CLASS 51
The BrokerClass uses the program value when communicating with the
client browser, for example to identify the program for processing cookies or
when demanding password authorization.
Implementation: The Init method records the client IP address, the Web-application’s instance
number, and calls the SetClient method to record information about the
client’s specific Web browser.
The Init method passes the program parameter to the HttpClass object to
supply to the client browser as needed.
Example:
!data declarations
CODE
[Link](1, '') !initialize WebFilesManager object
[Link] !initialize JavaEvents object
[Link]('TREE', WebFilesManager) !initialize Broker object
[Link](WebFilesManager) !initialize HtmlManager object
[Link](Broker,,600,,WebFilesManager) !initialize WebServer object
IF ([Link]()) !if launched by App Broker
OPEN(ICServerWin) !open invisible window
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link] !set up communication w/ App Broker
Main !run as usual
BREAK
END
END
ELSE !if not launched by App Broker
Main !run as usual
END
[Link] !shut down WebServer object
[Link] !shut down HtmlManager object
[Link]() !shut down Broker object
[Link] !shut down JavaEvents object
[Link] !shut down WebFilesManager object
Example:
!data declarations
CODE
[Link](1, '') !initialize WebFilesManager object
[Link] !initialize JavaEvents object
[Link]('TREE', WebFilesManager) !initialize Broker object
[Link](WebFilesManager) !initialize HtmlManager object
[Link](Broker,,600,,WebFilesManager) !initialize WebServer object
IF ([Link]()) !if launched by App Broker
OPEN(ICServerWin) !open invisible window
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link] !set up communication w/ App Broker
Main !run as usual
BREAK
END
END
ELSE !if not launched by App Broker
Main !run as usual
END
[Link] !shut down WebServer object
[Link] !shut down HtmlManager object
[Link]() !shut down Broker object
[Link] !shut down JavaEvents object
[Link] !shut down WebFilesManager obj
CHAPTER 2 BROKER CLASS 53
Example:
[Link] PROCEDURE
CODE
[Link] = [Link]()
IF ([Link])
IC:InitializeHooks
END
SeeAlso: CloseChannel
54 IBC LIBRARY REFERENCE
ProcessHttpHeader (processincominghttp)
ProcessHttpHeader( http )
ProcessHttpHeader
Processes the Hyper-Text Transfer Protocol (HTTP)
stream prepended to transmissions from the client
browser.
http A string constant, variable, EQUATE, or expression
containing the http to process.
The ProcessHttpHeader method processes the Hyper-Text Transfer
Protocol (HTTP) stream prepended to transmissions from the client browser.
Implementation: The ProcessHttpHeader method relies on the HttpClass object to process the
http stream.
Example:
[Link] PROCEDURE
Header EQUATE('Internet:')
CmdRequest EQUATE('Request')
HttpStart UNSIGNED
LenHeader SIGNED
LenCmdRequest SIGNED
LenCmd SIGNED
Request ANY
CODE
IF ([Link])
CASE EVENT()
OF EVENT:DDEexecute
Request = DDEvalue()
LenHeader = LEN(Header)
LenCmdRequest = LEN(CmdRequest)
LenCmd = LenHeader + LenCmdRequest
HttpStart = INSTRING(NewLine,Request,1,LenCmd+2)+2
[Link](SUB(Request,HttpStart,LEN(Request)-HttpStart))
[Link] = [Link]()
[Link] &= [Link]()
[Link] = CLOCK()
IF (NOT [Link])
RETURN NET:Unknown
END
IF (SUB([Link], 1, 1) = '@')
[Link] = SUB([Link],2,-1)
END
IF ([Link])
[Link] = [Link] & '&'
END
[Link] = 1
RETURN NET:Request
END
END
RETURN NET:Unknown
SeeAlso: [Link]
CHAPTER 2 BROKER CLASS 55
Example:
[Link] PROCEDURE(STRING ProgramName, WebFilesClass Files)
CODE
[Link](BROWSER:IE30, TRUE, FALSE)
[Link](BROWSER:IE40, TRUE, FALSE)
[Link](BROWSER:NetScape3, FALSE, TRUE)
[Link] = TRUE
[Link](BROWSER:Mozilla4, FALSE, TRUE)
[Link] = TRUE
[Link](BROWSER:Unknown, FALSE, FALSE)
[Link] = IC:GetCommandLineOption('/inet=')
[Link] &= Files
[Link] &= NEW HttpClass
[Link](Files)
[Link](ProgramName)
[Link] !set Client information
[Link] = IC:GetCommandLineOption('/client=')
SeeAlso: SetClientBrowser
Implementation: The SetClientBrowser method notes the Client’s specific type of Web
browser (Netscape, Internet Explorer, etc.), its version number, and the
facilities it supports, such as caching, java, style sheets, etc.
Example:
[Link] PROCEDURE
CODE
IF ([Link] &= NULL)
[Link] &= NEW WebClientManagerClass
[Link](SELF, UnknownBrowser)
END
[Link]
56 IBC LIBRARY REFERENCE
TakeFile is a VIRTUAL method so that other base class methods can directly
call the TakeFile virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Implementation: EQUATEs for the secure parameter are declared in [Link] as follows:
ITEMIZE,PRE(Secure)
Default EQUATE
None EQUATE
Full EQUATE
Last EQUATE(Secure:Full)
END
Example:
[Link] PROCEDURE(STRING Filename, SIGNED Security)
CODE
[Link](200, Filename)
[Link]()
[Link](Filename, Security, TRUE)
CHAPTER 2 BROKER CLASS 57
Implementation: TakeHtmlPage uses the HttpClass object to prepend the appropriate HTTP to
the HTML, then calls the TakeFile method to transmit the whole package.
Example:
[Link] PROCEDURE |
(STRING Filename,SIGNED Security, BYTE dontmove=FALSE)
CODE
[Link](Filename, Security, dontmove)
SeeAlso: TakeFile
58 IBC LIBRARY REFERENCE
Implementation: TakeJslData uses the HttpClass object to prepend the appropriate HTTP to
the JSL data, then calls the TakeFile method to transmit the whole package.
Example:
[Link] PROCEDURE(STRING Filename,SIGNED Security)
CODE
[Link](Filename, Security)
SeeAlso: TakeFile
CHAPTER 2 BROKER CLASS 59
TakeUnauthorized(prepare andsendaccessdeniedpage)
TakeUnauthorized( filename, secure ), VIRTUAL
Example:
[Link] PROCEDURE(STRING Filename,SIGNED Security)
CODE
[Link](Filename, Security)
SeeAlso: TakeFile
60 IBC LIBRARY REFERENCE
CHAPTER 3 WEBSERVERCLASSES 61
Overview 63
WebServerClass Concepts .....................................................................................63
ShutDownClass Concepts ......................................................................................63
Relationship to Other Internet Builder Classes ..................................................... 63
Internet Connect Template Implementation ...........................................................64
Source Files............................................................................................................64
Conceptual Example ..............................................................................................65
WebServerClass Properties 66
Active (server communicates with broker) ........................................................... 66
ArgIndex (index to browser request string) .......................................................... 66
Broker (BrokerClass object) ................................................................................. 66
CurSubmit (SubmitItemClass object) ....................................................................67
Client (WebClientManagerClass object) .............................................................. 67
CommandLine (command line parameters) ..........................................................68
DialogPageBackColor (MESSAGE page background color) ...............................68
DialogPageImage (MESSAGE page wallpaper) ...................................................68
DialogWinBackColor (MESSAGE window background color) ...........................68
DialogWinImage (MESSAGE window wallpaper) .............................................. 69
Files (WebFilesClass object) ................................................................................ 69
GotCommandLine (command line arguments set flag) ........................................ 69
JavaLibraryPath (Java Support Library location) ..................................................70
PageToReturnTo (return URL).............................................................................. 70
ProgramName (Server pathname) ........................................................................ 71
TimeOut (period of inactivity after which to shut down) ..................................... 71
WebServerClass Methods 72
Functional Organization—Expected Use ..............................................................72
Connect (establish communication with Application Broker) ...............................74
GetInternetEnabled (return Web/Windows mode) ................................................ 75
GetReadyForPage (return ready-to-continue flag) ................................................76
GetRequestedWholePage (return scope of browser request).................................77
GetSendWholePage (return full or partial refresh flag).........................................78
Halt (immediately shut down the Server) ............................................................. 79
Init (initialize the WebServerClass object) ............................................................80
Kill (shut down the WebServerClass object) .........................................................81
62 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebServerClassConcepts
ShutDownClassConcepts
SourceFiles
Conceptual Example
LinkBaseClasses EQUATE(1)
BaseClassDllMode EQUATE(0)
INCLUDE('[Link]') !declare TextOutputClass
INCLUDE('[Link]') !declare WebBrokerClass
INCLUDE('[Link]') !declare WebWindowClass
INCLUDE('[Link]') !declare WebClientManagerClass
INCLUDE('[Link]') !declare Internet EQUATEs
MAP
INCLUDE('[Link]') !declare Internet helper procedures
END
!data declarations
Broker BrokerClass !declare Broker object
HtmlManager HtmlClass !declare HtmlManager object
JavaEvents JslEventsClass !declare JslEvents object
WebServer WebServerClass !declare WebServer object
WebFilesManager WebFilesClass !declare WebFilesManager object
ShutDownManager CLASS(ShutDownClass) !declare ShutDownManager object
Close PROCEDURE,VIRTUAL
END
[Link]
CODE
[Link] !shut down WebServer object
[Link] !shut down HtmlManager object
[Link]() !shut down Broker object
[Link] !shut down JavaEvents object
[Link] !shut down WebFilesManager object
66 IBC LIBRARY REFERENCE
Implementation: The Connect method sets the Active property to a non-zero value when it
establishes a communication channel with the Application Broker.
SeeAlso: Connect
Implementation: The SetNext Action method uses the ArgIndex property to parse browser
requests.
SeeAlso: SetNextAction
Broker (BrokerClassobject)
Broker &BrokerClass
The Broker property is a reference to a BrokerClass object. The
WebServerClass object uses this property to handle all communications with
the Application Broker.
Implementation: The Broker property handles the transmission of HTML code and Java
Support Library (JSL) data from the Server (your Web-enabled application
program) to the Application Broker.
CHAPTER 3 WEBSERVERCLASSES 67
CurSubmit (SubmitItemClassobject)
CurSubmit &SubmitItemClass, PROTECTED
The CurSubmit property is a reference to a SubmitItemClass object. The
WebServerClass object uses this property to manage incoming data from the
client browser.
Implementation: When the end user enters data through the Web browser, the browser submits
the data in a “request string” which the Application Broker forwards to the
Server (your Web-enabled application). The request string optionally
contains a list of field assignments of the form ‘field=value&field2=value2’.
The CurSubmit property represents a single field assignment within the
request string, including the field equate of the control, the new value entered
in the browser, and any event associated with the control (accepted, scroll,
etc.).
The Init method sets the initial value of the CurSubmit property to reference
a new SubmitItemClass object. The SetNextAction method “positions” the
CurSubmit property to the next field assignment.
Client (WebClientManagerClassobject)
Client &WebClientManagerClass
The Client property is a reference to the WebClientManagerClass object that
supplies information about the client’s browser and IP address. The
WebServerClass object does not use the Client property, except to make it
available to other objects, such as the WebWindowClass object, that
reference the WebServerClass object.
Implementation: The Init method sets the initial value of the Client property. The TakeEvent
method refreshes the Client property in case the end user modifies the
browser capabilites in mid-session.
CommandLine(commandlineparameters)
CommandLine ANY
The CommandLine property contains any parameter string specified when
the client browser requests the Server (your Web-enabled application). The
WebServerClass object does not use this property, except to make it available
to your program for parsing and processing as needed.
Implementation: The Init method sets the value of the CommandLine property. See Using
Command Line Parameters for more information on specifying parameters.
SeeAlso: Init
DialogPageBackColor (MESSAGEpagebackgroundcolor)
DialogPageBackColor LONG
The DialogPageBackColor property indicates the background color of the
Web page which displays Clarion MESSAGEs.
SeeAlso: SetDialogPageBackground
DialogPageImage(MESSAGEpagewallpaper)
DialogPageImage CSTRING(FILE:MaxFileName)
The DialogPageImage property indicates the background image (wallpaper)
of the Web page which displays Clarion MESSAGEs.
SeeAlso: SetDialogPageBackground
SeeAlso: SetDialogWindowBackground
CHAPTER 3 WEBSERVERCLASSES 69
DialogWinImage(MESSAGEwindowwallpaper)
DialogWinImage CSTRING(FILE:MaxFileName)
The DialogWinImage property indicates the background image (wallpaper)
of the Web page window which displays Clarion MESSAGEs.
SeeAlso: SetDialogWindowBackground
Files(WebFilesClassobject)
Files &WebFilesClass
The Files property is a reference to the WebFilesClass object that locates and
identifies files shared with the client’s browser.
Implementation: The Init method sets the initial value of the Files property.
SeeAlso: Init
Implementation: The Init method sets the GotCommandLine property to zero. The
TakeRequest method sets GotCommandLine to true after it processes the first
browser request.
Implementation: The Init method sets the initial value of the JavaLibraryPath property. This
value comes from the Internet Application Extension template’s Advanced
tab. If the Java Support Library is installed to its default location (the /public
directory below the Application Broker directory), then JavaLibraryPath is
null.
SeeAlso: Init
Implementation: The Init method sets the initial value of the PageToReturnTo property. This
value comes from the Internet Application Extension template’s Advanced
tab. If the Java Support Library is installed to its default location (the /public
directory below the Application Broker directory), then JavaLibraryPath is
null.
SeeAlso: Init
CHAPTER 3 WEBSERVERCLASSES 71
Implementation: The Init method sets the initial value of the ProgramName property. This
value comes from the Application Broker when it launches the Server.
SeeAlso: Init
Implementation: The Init method sets the initial value of the TimeOut property. This value
comes from the Internet Application Extension template’s Advanced tab.
SeeAlso: Init
72 IBC LIBRARY REFERENCE
WebServerClass Methods
The WebServerClass inherits all the methods of the WebDataSinkClass from
which it is derived.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
-none-
Occasional Use:
GetReadyForPage return ready-to-continue flag
GetRequestedWholePage return scope of browser request
GetSendWholePage return full or partial refresh flag
Halt shut down the Server immediately
QuitV shut down the Server normally
SetSendWholePage force full page refresh
SetNewPageDisable suppress outgoing Web pages
SetNextAction return Web page field information
TakeEvent process WebServerClass object events
TakePageSent prepare WebServerClass object for page
V
These methods are also Virtual.
CHAPTER 3 WEBSERVERCLASSES 73
Virtual Methods
Typically you will not call these methods directly—other IBC Library
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Implementation: The Connect method sets the Active property to a non-zero value when it
successfully establishes the communication channel.
Example:
WebWindow PROGRAM
!data declarations
CODE
[Link](Broker, '', 600, '', WebFilesManager)
IF ([Link]())
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link] !set up channel to App Broker
Main
BREAK
END
END
ELSE
Main
END
[Link]
SeeAlso: Active
CHAPTER 3 WEBSERVERCLASSES 75
GetInternetEnabled(returnWeb/Windowsmode)
GetInternetEnabled, BYTE
The GetInternetEnabled method returns a value indicating whether the
Server (your Web-enabled application) was launched by the Application
Broker at the request of a Web browser. A value of one (1) indicates the
Server was launched by the Application Broker (Web mode); a value of zero
(1) indicates the Server was not launched by the Application Broker
(Windows mode).
Example:
WebWindow PROGRAM
!data declarations
CODE
[Link](Broker, '', 600, '', WebFilesManager)
IF ([Link]()) !launched from browser?
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link]
Main
BREAK
END
END
ELSE !not launched from browser?
Main
END
[Link]
SeeAlso: ProgramName
76 IBC LIBRARY REFERENCE
GetReadyForPage(return ready-to-continueflag)
GetReadyForPage, BYTE
The GetReadyForPage method returns a value indicating whether the
Server (your Web-enabled application) is ready to refresh the client’s Web
browser display. A return value of one (1) indicates the Server is ready to
proceed; a value of zero (0) indicates the Server is not ready to proceed.
Implementation: The GetReadyForPage method returns a value of zero (0) primarily if there
are events remaining to be processed. This allows the Internet Builder Class
objects to delay the HTML generation until all normal Windows processing
is complete.
Example:
[Link] PROCEDURE
CODE
IF ([Link])
CASE [Link]()
OF NET:Request
[Link]
END
CASE (EVENT())
OF EVENT:NewPage
IF ([Link]()) !ready to refresh the web page?
[Link]
END
OF EVENT:OpenWindow
[Link]
END
[Link]
IF ([Link]()) !ready to refresh the web page?
POST(EVENT:NewPage)
END
END
SeeAlso: SetNewPageDisable
CHAPTER 3 WEBSERVERCLASSES 77
Example:
[Link] PROCEDURE
!data declarations
Index SIGNED,AUTO
CODE
IF [Link]() !full page requested?
!clear all check boxes before sending new page
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
[Link]()
END
END
LOOP
!etc
END
78 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]()) !full page refresh?
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link],Filename)
ELSE
[Link]([Link],Filename)
END
[Link](Filename, [Link](),FALSE)
ELSE !or partial page refresh?
[Link]([Link](),[Link])
[Link]([Link])
[Link]
END
[Link]()
SeeAlso: SetSendWholePage
CHAPTER 3 WEBSERVERCLASSES 79
Implementation: The Halt method calls the [Link] method to shutdown the
Server.
You can call the Halt method to let the end user exit the Server from any of
its generated Web pages, rather than requiring the end user to navigate to the
Server’s opening page before exiting.
SeeAlso: [Link]
80 IBC LIBRARY REFERENCE
Implementation: The Init method sets the initial value of the Broker, Files, JavaLibraryPath,
PageToReturnTo, and TimeOut properties.
Example:
WebWindow PROGRAM
!data declarations
CODE
[Link](Broker,ShutDown,,600,'',WebFilesManager) !initialize WebServer object
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link]
Main
BREAK
END
END
[Link] !shut down Server
Implementation: The Kill method removes all temporary files created during the remote
computing session, sends the browser to the appropriate return page, and
closes the communication channel with the Application Broker.
Example:
WebWindow PROGRAM
!data declarations
CODE
[Link](Broker,ShutDown,,600,'',WebFilesManager) !initialize WebServer object
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link]
Main
BREAK
END
END
[Link] !shut down Server
[Link] PROCEDURE
CODE
[Link] !shut down WebServer object
82 IBC LIBRARY REFERENCE
Quit is a VIRTUAL method so that other base class methods can directly call
the Quit virtual method in a derived class. This lets you easily implement
your own custom version of this method.
Implementation: The Quit method sets a flag to begin normal program shut down.
You can call the Quit method to let the end user exit the Server from any of
its generated Web pages, rather than requiring the end user to navigate to the
Server’s opening page before exiting.
Example:
[Link] PROCEDURE
!data declarations
CODE
IF ([Link])
IF [Link] THEN RETURN Net:Terminate.
CASE EVENT()
OF EVENT:Terminate !on end user request
[Link] ! initiate normal shut down
RETURN Net:Terminate
OF EVENT:Request
IF [Link]
[Link] = FALSE
RETURN [Link](IC:GetRequestText())
END
OF EVENT:Timer
IF ([Link])
IF (CLOCK()-[Link]>[Link]*100) !on program time out
[Link] ! initiate normal shut down
END
END
OF EVENT:OpenWindow
IF [Link]
POST(EVENT:Request)
END
IF 0{PROP:timer}=0
0{PROP:timer} = [Link] * 10
END
END
END
RETURN NET:Unknown
SeeAlso: Kill
CHAPTER 3 WEBSERVERCLASSES 83
SetDialogPageBackground(set MESSAGEWebpagebackground)
SetDialogPageBackground( [color] [,image] )
SetDialogPageBackground
Sets the MESSAGE Web page background color and
image.
color An integer constant, variable, EQUATE, or expression
indicating the PAGE color.
image A string constant, variable, EQUATE, or expression
containing a filename. The WebWindowClass object
displays (tiles) the image in the specified file as the
background to the Web page.
The SetDialogPageBackground method sets the background color and
image for the Web page that displays Clarion MESSAGEs.
Example:
MyWebPgm PROGRAM
!data declarations
CODE
[Link](1, '')
[Link]
[Link]('TREE', WebFilesManager
[Link](WebFilesManager)
[Link](Broker,ShutDownManager,,600,,WebFilesManager)
[Link](,’[Link]’)!set global MESSAGEs logo
[Link](COLOR:Blue) !set global MESSAGEs window color
!program code
SetDialogWinBackground
Sets the MESSAGE Web page window background
color and image.
color An integer constant, variable, EQUATE, or expression
indicating the PAGE color.
image A string constant, variable, EQUATE, or expression
containing a filename. The WebWindowClass object
displays (tiles) the image in the specified file as the
background to the Web page window.
The SetDialogWinBackground method sets the background color and
image for the Web page window that displays Clarion MESSAGEs.
Example:
MyWebPgm PROGRAM
!data declarations
CODE
[Link](1, '')
[Link]
[Link]('TREE', WebFilesManager
[Link](WebFilesManager)
[Link](Broker,ShutDownManager,,600,,WebFilesManager)
[Link](,’[Link]’)!set global MESSAGEs logo
[Link](COLOR:Blue) !set global MESSAGEs window color
!program code
SetSendWholePage(forcefull pagerefresh)
SetSendWholePage( force )
SetSendWholePage
Determines whether the Server honors or ignores Client
(browser) requests for a partial page update.
force An integer constant, variable, EQUATE, or expression
indicating whether the Server (your Web-enabled
application) sends a full page refresh, regardless of
whether the Client browser requested a full page or a
partial page. A value of one (1) forces the Server to send
a full page; a value of zero (0) lets the Server send
whatever the Client requested.
The SetSendWholePage method determines whether the Server honors
Client (browser) requests for a partial page update by sending only a partial
page, or ignores the partial page request and sends a full page instead.
You can use the SetSendWholePage method to force a full page refresh
based on any events or conditions you choose. Conversely, you can use the
SetSendWholePage method to return control to the Client based on any
events or conditions you choose.
Example:
[Link] PROCEDURE(*WebServerClass Server,*HtmlClass HtmlTarget)
CODE
! initialize WebWindow object
[Link](True) !Always force full page on a new window
SeeAlso: GetSendWholePage
86 IBC LIBRARY REFERENCE
SetNewPageDisable (suppressoutgoingWebpages)
SetNewPageDisable( ignore )
SetNewPageDisable
Determines whether the Server (your Web-enabled
application) honors or ignores Client (browser) requests
for information.
ignore An integer constant, variable, EQUATE, or expression
indicating whether the Server honors or ignores Client
(browser) requests for information. A value of one (1)
ignores Client requests for information; a value of zero
(0) honors Client requests.
The SetNewPageDisable method determines whether the Server honors or
ignores Client (browser) requests for information. This lets you delay HTML
generation based on any events or conditions you choose.
An ignore value of one (1) tells the Server continue to receive and process
incoming information, but suppresses any outgoing information (Web
pages).
Example:
CASE EVENT()
OF EVENT:StupidQuestion
[Link](True) !suppress outgoing information
OF EVENT:Apology
[Link](False) !enable outgoing information
END
SeeAlso: GetReadyForPage
CHAPTER 3 WEBSERVERCLASSES 87
Implementation: The SetNextItem method calls the [Link] method to set the
CurSubmit property to the next incoming item.
When the end user enters data through the Web browser, the browser submits
the data in a “request string” which the Application Broker forwards to the
Server (your Web-enabled application). The request string optionally
contains a list of field assignments of the form ‘field=value&field2=value2’.
The CurSubmit property represents a single field assignment within the
request string, including the field equate of the control, the new value entered
in the browser, and any event associated with the control (accepted, scroll,
etc.).
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
LOOP
NextSubmit &= [Link]() !return Web page field info
IF (NextSubmit &= NULL) !if NULL,
BREAK ! no more fields to process
END
CurFeq = [Link] !otherwise, process the field
CASE (CurFeq)
OF FEQ:UNKNOWN
[Link](NextSubmit)
ELSE
IF ([Link](CurFeq))
IF ([Link])
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)
END
END
END
END
END
Implementation: EQUATEs for the return value are declared in [Link] as follows:
NET:Unknown EQUATE(0)
NET:Terminate EQUATE(1)
NET:Request EQUATE(2)
The TakeEvent method handles any events that originated from the Client,
that is, any events forwarded to the Server by the Application Broker through
the communication channel established by the Connect method.
The TakeEvent method also handles other events that may be significant to
the WebServerClass object, such as EVENT:OpenWindow events (the
WebServerClass object initiates a timer to support automatic shut down after
an idle period), or EVENT:Timer events (the WebServerClass object
monitors timer events to support automatic shut down after an idle period).
This does not interfere with any other timer events and processing for the
Window.
Example:
[Link] PROCEDURE
CODE
IF ([Link])
CASE [Link]()
OF NET:Request
[Link]
END
CASE (EVENT())
OF EVENT:NewPage
IF ([Link]())
[Link]
END
OF EVENT:OpenWindow
[Link]
END
[Link]
IF ([Link]())
POST(EVENT:NewPage)
END
END
CHAPTER 3 WEBSERVERCLASSES 89
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]())
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]() !reset for next page
90 IBC LIBRARY REFERENCE
ShutDownClass Methods
The WebServerClass uses the ShutDownClass to shut down other IBC
Library objects when the Server (Web-enabled application) undergoes a
normal shut down, including end user request and time outs.
Example:
MyWebPgm PROGRAM
!data declarations
Broker BrokerClass !declare Broker object
HtmlManager HtmlClass !declare HtmlManager object
JavaEvents JslEventsClass !declare JslEvents object
WebServer WebServerClass !declare WebServer object
WebFilesManager WebFilesClass !declare WebFilesManager object
ShutDownManager CLASS(ShutDownClass) !declare ShutDownManager object
Close PROCEDURE,VIRTUAL
END
ICServerWin WINDOW,AT(-100,-100,0,0) !declare an invisible
window END
CODE
[Link](1, '') !initialize WebFilesManager object
[Link] !initialize JavaEvents object
[Link]('TREE', WebFilesManager) !initialize Broker object
[Link](WebFilesManager) !initialize HtmlManager object
[Link](Broker,ShutDownManager,,600,,WebFilesManager)!init ShutDown object
OPEN(ICServerWin) !open invisible window
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link] !set up communication w/ App Broker
Main !run as usual
BREAK
END
END
[Link] !shut down IBC Library objects
[Link]
CODE
[Link] !shut down WebServer object
[Link] !shut down HtmlManager object
[Link]() !shut down Broker object
[Link] !shut down JavaEvents object
[Link] !shut down WebFilesManager object
CHAPTER 4 WEBCLIENTM ANAGERCLASS 91
Overview 93
WebClientManagerClass Concepts .......................................................................93
Relationship to Other Internet Builder Classes ..................................................... 93
Internet Connect Template Implementation ...........................................................93
Source Files............................................................................................................93
WebClientManagerClass Properties 94
Broker (BrokerClass object) ................................................................................. 94
Browser (BrowserManagerClass object) .............................................................. 94
IP (client IP address) ..............................................................................................95
Jsl (JslManagerClass object) ..................................................................................95
WebClientManagerClass Methods 96
Functional Organization—Expected Use ..............................................................96
Feq2Id (return HTML control Id) ..........................................................................97
Init (initialize the WebClientManagerClass object)...............................................98
Kill (shut down the WebClientManagerClass object) ...........................................99
NextHtmlPage (prepare for next HTML page) ....................................................100
TakeFile (send HTML code or JSL data).............................................................100
TakeHtmlPage (send HTML code) ......................................................................101
TakeJslData (send JSL data) ................................................................................103
TakeUnauthorized (send access denied page) .....................................................105
92 IBC LIBRARY REFERENCE
CHAPTER 4 WEBCLIENTMANAGERCLASS 93
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebClientManagerClassConcepts
SourceFiles
Implementation: The Init method sets the value of the Broker property.
SeeAlso: Init
Browser (BrowserManagerClassobject)
Browser &BrowserManagerClass
The Browser property is a reference to the BrowserManagerClass object that
represents the Client’s Web browser within the Server (Web-enabled
application). The Browser property contains information about the specific
features the Web browser supports.
Implementation: The Init method sets the value of the Browser property.
SeeAlso: Init
CHAPTER 4 WEBCLIENTMANAGERCLASS 95
IP (client IP address)
IP CSTRING(255)
The IP property contains the Client’s IP address. The
WebClientManagerClass does not use this property, but makes it available
for other code that may need it.
Implementation: The [Link] method sets the value of the IP property. The value
comes from the Application Broker that launches the Server (Web-enabled
application).
SeeAlso: [Link]
Jsl (JslManagerClassobject)
Jsl &JslManagerClass
The Jsl property is a reference to the JslManagerClass that represents the
Java Support Library (JSL). The Jsl property allows dynamic updates to the
contents of an HTML page without refreshing the entire page.
Implementation: The Init method instantiates a JslManagerClass object for the Jsl property.
SeeAlso: Init
96 IBC LIBRARY REFERENCE
WebClientManagerClass Methods
The WebClientManagerClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
-none-
Occasional Use:
Feq2Id return HTML control Id
NextHtmlPage prepare for next HTML page
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Feq2Id is a VIRTUAL method so that other base class methods can directly
call the Feq2Id virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Example:
[Link] PROCEDURE |
(SIGNED Feq,STRING ClassName,SIGNED Width,SIGNED Height)
Id SIGNED,AUTO
CODE
Id = [Link].Feq2Id(Feq)
[Link](Feq, '_X' & Id, ClassName, Width, Height)
SeeAlso: [Link]
98 IBC LIBRARY REFERENCE
Implementation: The Init method sets the value of the Broker, Browser, and Jsl properties.
Example:
[Link] PROCEDURE
CODE
IF ([Link] &= NULL)
[Link] &= NEW WebClientManagerClass !instantiate client object
[Link](SELF, UnknownBrowser) !initialize client object
END
[Link]
Example:
[Link] PROCEDURE
CODE
[Link]
IF (NOT ([Link] &= NULL))
[Link]
DISPOSE([Link])
END
IF (NOT [Link] &= NULL)
[Link] !shut down client object
DISPOSE([Link])
END
100 IBC LIBRARY REFERENCE
Implementation: The NextHtmlPage method increments a counter used to generate unique IDs
for HTML controls.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF [Link]() !if sending whole page
Filename = [Link](Content:Html)
[Link] !prepare Client object for new page
[Link]([Link],Filename) !WebWindow object creates new page
[Link](Filename,[Link](),FALSE) !Client takes it
ELSE
[Link]([Link](),[Link])
[Link]([Link])
[Link]
END
[Link]() !prepare Server object for next page
CHAPTER 4 WEBCLIENTMANAGERCLASS 101
TakeFile is a VIRTUAL method so that other base class methods can directly
call the TakeFile virtual method in a derived class. This lets you easily
implement your own custom version of this method.
SeeAlso: [Link]
102 IBC LIBRARY REFERENCE
TakeHtmlPage(sendHTML code)
TakeHtmlPage( filename, secure, dontmove ), VIRTUAL
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF [Link]() !if sending whole page
Filename = [Link](Content:Html)
[Link] !prepare Client object for new page
[Link]([Link],Filename) !WebWindow object creates new page
[Link](Filename,[Link](),FALSE) !Client takes it
ELSE
[Link]([Link](),[Link])
[Link]([Link])
[Link]
END
[Link]() !prepare Server object for next page
SeeAlso: [Link]
104 IBC LIBRARY REFERENCE
TakeJslData (sendJSLdata)
TakeJslData( filename, secure ), VIRTUAL
SeeAlso: [Link]
CHAPTER 4 WEBCLIENTMANAGERCLASS 105
TakeUnauthorized (sendaccessdeniedpage)
TakeUnauthorized( filename, secure ), VIRTUAL
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
IF ([Link] AND NOT [Link]())
Filename = [Link](Content:UnAuthorized)
[Link]([Link], Filename)
[Link](Filename,[Link]()) !access denied
[Link] = TRUE
Post(EVENT:CloseWindow)
ELSE
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
END
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
SeeAlso: [Link]
CHAPTER 5 BROWSER MANAGER CLASS 107
Overview 109
BrowserManagerClass Concepts .........................................................................109
Relationship to Other Internet Builder Classes ................................................... 109
Internet Connect Template Implementation .........................................................109
Source Files..........................................................................................................109
BrowserManagerClass Properties 110
Kind (browser type) .............................................................................................110
SetNoCache (external cache control support)......................................................110
SupportsStyleSheets (style sheet support) ...........................................................111
SubmitFromJava (applet communication mode) .................................................111
BrowserManagerClass Methods 112
Init (initialize the BrowserManagerClass object) ................................................112
108 IBC LIBRARY REFERENCE
CHAPTER 5 BROWSER MANAGER CLASS 109
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
BrowserManagerClassConcepts
SourceFiles
[Link] BrowserManagerClass
110 IBC LIBRARY REFERENCE
Implementation: The Init method sets the value of the Kind property. The
[Link] method alters its output based on the value of
the Kind property.
SeeAlso: Init
Implementation: The [Link] method sets the value of the SetNoCache property. The
HttpClass object alters its output based on the value of the SetNoCache
property.
SeeAlso: [Link]
CHAPTER 5 BROWSER MANAGER CLASS 111
Implementation: The Init method sets the value of the SupportsStyleSheets property. The
HtmlClass and the WebWindowClass alter their output based on the value of
the SupportsStyleSheets property.
SeeAlso: Init
Implementation: The Init method sets the value of the SubmitFromJava property. The
[Link] method alters its output based on the value of the
SubmitFromJava property.
SeeAlso: Init
112 IBC LIBRARY REFERENCE
BrowserManagerClass Methods
The BrowserManagerClass contains only one method.
Implementation: The Init method sets the values of the Kind, SupportsStyleSheets, and
SubmitFromJava properties.
Example:
[Link] PROCEDURE(STRING ProgramName, WebFilesClass Files)
CODE
[Link](BROWSER:IE30,TRUE,FALSE) !init Internet Explorer 3.0 browser
[Link](BROWSER:IE40,TRUE,FALSE) !init Internet Explorer 4.0 browser
[Link](BROWSER:NetScape3,FALSE,TRUE) !init NetScape 3x browser
[Link] = TRUE
[Link](BROWSER:Mozilla4,FALSE,TRUE) !init Mozilla 4 browser
[Link] = TRUE
[Link](BROWSER:Unknown,FALSE,FALSE)!init generic Java enabled browser
Overview 117
WebFrameClass Concepts ...................................................................................117
Relationship to Other Internet Builder Classes ................................................... 117
Internet Connect Template Implementation .........................................................117
Source Files..........................................................................................................117
Conceptual Example ............................................................................................118
WebFrameClass Properties 119
FrameWindow (MDI frame window) ..................................................................119
MenubarFeq (menubar control number) ..............................................................119
ToolbarFeq (Toolbar control number) .................................................................119
WebFrameClass Methods 120
CopyControlsToWindow (a virtual to copy frame controls to child window) ... 120
CopyControlToWindow (copy frame control to child window) ......................... 122
GetMenubarFeq (return menubar control number) .............................................123
GetToolbarFeq (return Toolbar control number) .................................................124
TakeEvent (a virtual to handle menu and toolbar events) ....................................125
116 IBC LIBRARY REFERENCE
CHAPTER 6 WEB FRAME CLASS 117
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebFrameClassConcepts
The WebFrame Class provides methods to “merge” these global toolbar and
menu controls onto the Web pages representing the application’s child
windows. Finally, WebFrame Class provides methods to handle any events
associated with the merged controls.
SourceFiles
Conceptual Example
[Link] PROCEDURE|
(*WebWindowClass OwnerWindow, BYTE MergeMenu, BYTE MergeTool)
CODE
IF MergeMenu
[Link](OwnerWindow, ?Exit)
[Link](OwnerWindow, ?BrowseCustomer)
[Link](OwnerWindow, ?BrowseProduct)
[Link](OwnerWindow, ?BrowseState)
[Link](OwnerWindow, ?Print)
[Link](OwnerWindow, ?PrintInvoice)
[Link](OwnerWindow, ?PrintMailingLabels)
[Link](OwnerWindow, ?PrintPriceList)
[Link](OwnerWindow, ?ReadMe)
END
BrowseCustomer PROCEDURE
!data
CODE
!procedure code
PrepareProcedure ROUTINE
IF ([Link])
IC:CurFrame &= GetWebActiveFrame()
IC:[Link](WebWindow, TRUE, TRUE)
END
CHAPTER 6 WEB FRAME CLASS 119
Implementation: The GetMenubarFeq method returns the value of the MenubarFeq property.
SeeAlso: GetMenubarFeq
Implementation: The GetToolbarFeq method returns the value of the ToolbarFeq property.
SeeAlso: GetToolbarFeq
120 IBC LIBRARY REFERENCE
WebFrameClass Methods
The WebFrameClass contains the methods listed below.
CopyControlsToWindow
Is a virtual placeholder method to copy controls from the
application frame to another window.
window object The label of the WebWindowClass object that represents
the WINDOW that receives the copied controls.
merge menu An integer constant, variable, EQUATE, or expression
indicating whether to copy menu controls. A value of
one (1) copies menu controls; a value of zero (0) does
not copy menu controls.
merge toolbar An integer constant, variable, EQUATE, or expression
indicating whether to copy toolbar controls. A value of
one (1) copies toolbar controls; a value of zero (0) does
not copy toolbar controls.
The CopyControlsToWindow method s a virtual placeholder method to
copy controls from the application frame to another (child) window. This
allows the simulation of standard Windows (menu and toolbar) merging
behavior within Web pages as seen through the Client browser.
Example:
BrowseCustomer PROCEDURE
!data
CODE
!procedure code
PrepareProcedure ROUTINE
IF ([Link])
IC:CurFrame &= GetWebActiveFrame()
IC:[Link](WebWindow, TRUE, TRUE)
END
SeeAlso: CopyControlToWindow
122 IBC LIBRARY REFERENCE
CopyControlToWindow
Copies the specified control from the application frame
to another window.
window object The label of the WebWindowClass object that represents
the WINDOW that receives the copied control.
control An integer constant, variable, EQUATE, or expression
containing the number (field equate) of the control to
copy.
The CopyControlToWindow method CREATEs a copy of the specified
frame control on the current (child) WINDOW. This allows the simulation of
standard Windows (menu and toolbar) merging behavior within Web pages
as seen through the Client browser.
Example:
[Link] PROCEDURE|
(*WebWindowClass OwnerWindow, BYTE MergeMenu, BYTE MergeTool)
CODE
IF MergeMenu
[Link](OwnerWindow, ?Exit)
[Link](OwnerWindow, ?BrowseCustomer)
[Link](OwnerWindow, ?BrowseProduct)
[Link](OwnerWindow, ?BrowseState)
[Link](OwnerWindow, ?Print)
[Link](OwnerWindow, ?PrintInvoice)
[Link](OwnerWindow, ?PrintMailingLabels)
[Link](OwnerWindow, ?PrintPriceList)
[Link](OwnerWindow, ?ReadMe)
END
SeeAlso: [Link]
CHAPTER 6 WEB FRAME CLASS 123
Implementation: The GetMenubarFeq method returns the value of the MenubarFeq property.
Example:
GetParentFeq PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
ParentFeq SIGNED,AUTO
CODE
ParentFeq = Feq{PROP:Parent}
IF (ParentFeq = 0)
CASE (Feq{PROP:Type})
OF CREATE:MENU
OROF CREATE:ITEM
ParentFeq = [Link]()
ELSE
IF (Feq{PROP:intoolbar})
ParentFeq = [Link]()
ELSE
ParentFeq = FEQ:ClientArea
END
END
END
RETURN ParentFeq
SeeAlso: MenubarFeq
124 IBC LIBRARY REFERENCE
Implementation: The GetToolbarFeq method returns the value of the ToolbarFeq property.
Example:
GetParentFeq PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
ParentFeq SIGNED,AUTO
CODE
ParentFeq = Feq{PROP:Parent}
IF (ParentFeq = 0)
CASE (Feq{PROP:Type})
OF CREATE:MENU
OROF CREATE:ITEM
ParentFeq = [Link]()
ELSE
IF (Feq{PROP:intoolbar})
ParentFeq = [Link]()
ELSE
ParentFeq = FEQ:ClientArea
END
END
END
RETURN ParentFeq
SeeAlso: ToolbarFeq
CHAPTER 6 WEB FRAME CLASS 125
The TakeEvent return value indicates whether the calling entity should
CYCLE to the top, BREAK out of, or continue through the current ACCEPT
loop.
This method has the PROC attribute so you can call it like a PROCEDURE
and ignore the return value.
Example:
[Link] FUNCTION
FirstIteration SIGNED(1)
CODE
LOOP
IF (NOT FirstIteration)
RETURN REPLY:CYCLE
END
FirstIteration = FALSE
CASE FIELD()
OF ?BrowseCustomer
CASE EVENT()
OF EVENT:Accepted
START(BrowseCustomer,050000)
END
END
RETURN REPLY:NONE
END
RETURN REPLY:BREAK
SeeAlso: [Link]
126 IBC LIBRARY REFERENCE
CHAPTER 7 WEB WINDOW CLASSES 127
Overview 131
WebWindowClass Concepts ............................................................................... 131
Relationship to Other Internet Builder Classes ................................................... 132
Internet Connect Template Implementation .........................................................132
Source Files..........................................................................................................133
WebControlListClass Methods 134
Functional Organization—Expected Use ............................................................134
AddControlsToLayout (set controls for HTML generation) ...............................135
CreateHtml (generate HTML for controls) ......................................................... 136
Init (initialize the WebControlListClass object) ..................................................138
Kill (shut down the WebControlListClass object) .............................................. 138
SetParentDefaults (set a control’s children) ........................................................139
WebWindowBaseClass Properties 140
AllowJava (generate or suppress JavaScript) .......................................................140
Background (window background color) ........................................................... 140
BackImage (window wallpaper) ..........................................................................140
BorderWidth (Web page border width) ...............................................................141
CloseImage (close button graphic) ..................................................................... 141
CreateCaption (include a titlebar on the Web page) ........................................... 141
CreateClose (include a close button on the Web page) ........................................142
CreateToolbar (include a toolbar on the Web page) ............................................142
DefaultButton (enter key button) ........................................................................ 143
DefaultButtonNeeded (simulate default button) ................................................. 143
DisabledAction (default HTML for disabled controls) ...................................... 144
Files (WebClientManagerClass object) ...............................................................144
FormatBorderWidth (HTML table cell border width) .........................................145
GroupBorderWidth (group box border width).................................................... 145
HelpDocument (HTML help document) .............................................................145
HelpEnabled (HTML help enabled flag) .............................................................146
HelpRelative (remote or local help document) ....................................................146
HelpStyle (HTML help style) ..............................................................................146
HtmlOption (window/control scaling information) ............................................ 147
IsSplash (splash screen flag) ................................................................................147
MenubarFeq (menubar control number) ..............................................................148
128 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebWindowClassConcepts
Event Processing
The WebWindowClass handles all additional events that arise when the
Server is running at the request of a Client. This event handling is in addition
to your application’s normal event handling. Conceptually, the
WebWindowClass event processing does the following:
1 Handles any events generated by the Application Broker. The
Application Broker generates events that tell the Server what
action occurred on the Client (mouse-click, data entry, etc.), the
new contents of data fields on the Client, and what information
is requested by the Client.
2 Translates the events in item 1 to Clarion events that fall under
the application’s normal event handling. For example, an
EVENT:CloseWindow, or an EVENT:Accepted to a control.
132 IBC LIBRARY REFERENCE
SourceFiles
WebControlListClass Methods
The WebControlListClass contains the methods listed below.
Functional Organization—ExpectedUse
AddControlsToLayout
Sets the controls to include in the HTML layout and
generation process.
control list The label of the structure containing the list of controls
to include in the HTML layout and generation process.
layout object The label of the LayoutHtmlClass object that optimally
arranges the controls on the generated Web page.
The AddControlsToLayout method sets the controls to include in the
HTML layout and generation process. Any controls omitted from the
generated Web page are not included in this process, for example, disabled or
hidden controls may be omitted from the generated Web page.
Implementation: AddControlsToLayout assumes the control list has already been built by
appropriate calls to the [Link] method, and includes
only the “visible” controls from this list into the HTML layout process. The
[Link] method evaluates whether a control is visible.
The control list parameter must name a QUEUE with a structure the same as
the WebControlQueue declared in [Link]:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
Example:
[Link] PROCEDURE(*LayoutHtmlClass Layout, SIGNED ParentFeq)
Children WebControlQueue
CODE
[Link](Children, ParentFeq)
[Link](Children, Layout)
The control list parameter must name a QUEUE with a structure the same as
the WebControlQueue declared in [Link]:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
CHAPTER 7 WEBCONTROLLISTCLASS 137
Example:
[Link] PROCEDURE|
(*HtmlClass Target, SIGNED ParentFeq, STRING Style)
Controls WebControlQueue
CODE
[Link](Controls, ParentFeq)
[Link](Controls, Target, Style, [Link], [Link])
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
SeeAlso: [Link]
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
CHAPTER 7 WEBCONTROLLISTCLASS 139
Implementation: The ConfirmParent method identifies each child of the parent by setting the
child’s ParentFeq property equal to the parent’s Feq property. The
SetParentDefaults method calls the [Link]
method for each control in the control list.
The control list parameter must name a QUEUE with a structure the same as
the WebControlQueue QUEUE declared in [Link]:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
The coordinates parameter names a GROUP with a structure the same as the
Rect GROUP declared in [Link]:
Rect GROUP,TYPE
x SIGNED
y SIGNED
width SIGNED
height SIGNED
END
Example:
[Link] PROCEDURE
Children WebControlQueue
MyRect GROUP(Rect)
END
CODE
[Link](MyRect.x, MyRect.y, [Link], [Link])
[Link](Children, [Link], CREATE:Region)
[Link](Children, SELF, MyRect)
SeeAlso: [Link]
140 C L A R I O N IBC LIBRARY REFERENCE
The Init method sets the initial value of the AllowJava property to TRUE.
SeeAlso: Init
Background(window backgroundcolor)
Background LONG(COLOR:None)
The Background property indicates the background color of the Web page
window. Discrete areas of the window (caption, menubar, toolbar, and client
area) inherit this color unless overriden.
Implementation: The SetBackground method sets the value of the Background property.
SeeAlso: SetBackground
BackImage(windowwallpaper)
BackImage ANY
The BackImage property indicates the background image (wallpaper) to
apply to the Web page window. Discrete areas of the window (caption,
menubar, toolbar, and client area) inherit this image unless overriden.
Implementation: The SetBackground method sets the value of the BackImage property.
SeeAlso: SetBackground
CHAPTER 7 WEBWINDOWBASECLASS 141
Implementation: The Init method sets the initial value of the BorderWidth property to two (2).
SeeAlso: Init
CloseImage(closebuttongraphic)
CloseImage STRING(FILE:MaxFileName)
The CloseImage property contains the pathname of the image to display on
the Close Button generated by the WebWindowClass object.
Implementation: The WebWindowClass object creates the Close Button (or not) based on the
value of the CreateClose property. The Init method sets the value of the
CloseImage property. The default CloseImage value is ‘[Link].’
Implementation: The Init method sets the initial value of the CreateCaption property to TRUE.
The ResetFromControls method creates the caption.
CreateClose(includea closebuttonontheWebpage)
CreateClose BYTE
The CreateClose property indicates under what circumstances to include a
close button on the Web page. Circumstances include always, never, when
the WINDOW has a system menu (the SYSTEM attribute), and when the
WINDOW has a system menu and no “visible” BUTTONs.
The Init method sets the initial value of the CreateClose property to
CLOSE:Always. The ResetFromControls method creates the close button.
The CloseImage property specifies the image to display on the close button.
Implementation: The Init method sets the CreateToolbar property to TRUE. The
ResetFromControls method creates the toolbar.
Under Standard Windows Behavior, pressing the ENTER key when there is no
default button does nothing. Under most browsers pressing the ENTER key
when there is no default button invokes an action roughly equivalent to the
typical Windows OK button (submits data from the current Web page and
optionally requests a new page). The DefaultButtonNeeded property allows
the WebWindowClass object to accurately simulate a default button on a
Web page that doesn’t actually have one.
144 C L A R I O N IBC LIBRARY REFERENCE
DisabledAction(default HTMLfordisabledcontrols)
DisabledAction BYTE
The DisabledAction property sets the default treatment of any disabled
controls for generating HTML to represent them. This property lets you
determine how to handle controls that are disabled under Windows, but
cannot be disabled under a browser, because the HTML control does not
support disabling.
Valid treatments include, always display the disabled control, always hide
the disabled control, and disable the control if HTML supports it, otherwise
hide the control.
Tip: [Link]
[Link] any individual
control.
Files(WebClientManagerClassobject)
Files &WebFilesClass
The Files property is a reference to the WebFilesClass object that manages
pathnames for the WebWindowClass object. The WebWindowClass uses this
property to generate appropriate pathnames whereever needed.
Implementation: The Init method sets the Files property to reference the [Link] property.
This property is primarily a debugging tool to help you see how and why
each control is placed where it is on the generated Web page.
Implementation: The Init method sets the FormatBorderWidth property to zero (0).
SeeAlso: Init
Implementation: The Init method sets the GroupBorderWidth property to two (2).
SeeAlso: Init
Implementation: The SetHelpDocument method or the SetHelpURL method sets the value of
the HelpDocument property.
Implementation: The SetHelpDocument method or the SetHelpURL method sets the value of
the HelpDocument property to True.
Implementation: The SetHelpDocument method sets the HelpRelative property to True. The
SetHelpURL method sets the HelpRelative property to False.
Implementation: The SetHelpDocument and SetHelpURL methods set the HelpStyle property.
HtmlOption(window/control scalinginformation)
HtmlOption LIKE(HtmlOptionGroup)
The HtmlOption property contains information for proper scaling and
positioning of controls on the Web page. The actual effect of this property is
determined by the HtmlClass object that applies the information.
Implementation: The SetFormatOptions method sets the values of the HtmlOption property.
These values are used for converting dialog units to pixels for scaling
purposes.
IsSplash(splashscreenflag)
IsSplash BYTE
The IsSplash property indicates whether the WINDOW serves as a splash
screen. A value of one (1) indicates a splash screen; a value of zero (0)
indicates some other purpose. The WebWindowClass uses this property to
generate any HTML unique to splash screens.
Implementation: The SetSplash method sets the value of the IsSplash property.
SeeAlso: SetSplash
148 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The Init method sets the initial value of the MenubarFeq property. The
GetMenubarFeq method returns the value of the MenubarFeq property.
MenubarType(menu placement)
MenubarType SIGNED
The MenubarType property indicates where the WebWindowClass places
the menu items on the Web page. Valid options are above the toolbar, left
side of the window, or omit the menu items from the Web page.
Implementation: The Init method sets the MenubarType property to PROP:none which omits
menu items. To include menu items on the Web page, you must assign a
value to the MenubarType property after the Init method executes.
SeeAlso: Init
Implementation: The Init method sets the OptionBorderWidth property to two (2).
SeeAlso: Init
CHAPTER 7 WEBWINDOWBASECLASS 149
PageBackground(webpage backgroundcolor)
PageBackground LONG(COLOR:None)
The PageBackground property indicates the background color of the Web
page.
SeeAlso: SetPageBackground
PageImage(webpagewallpaper)
PageImage ANY
The PageImage property indicates the background image (wallpaper) to
apply to the Web page.
Implementation: The SetPageBackground method sets the value of the PageImage property.
SeeAlso: SetPageBackground
Server (WebServerClassobject)
Server &WebServerClass
The Server property is a reference to the WebServerClass object that
represents the Server application for the WebWindowClass object. The
WebWindowClass relies on this property to supply information about the
Client browser, to supply appropriate pathnames, to handle events
originating from the Client browser, and to interact with the BrokerClass
object as needed.
Implementation: The Init method sets the initial value of the Server property—typically to
reference a global instance of the WebServerClass.
SeeAlso: Init
150 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The Init method sets the SheetBorderWidth property to two (2).
SeeAlso: Init
Implementation: The SetFormatOptions method sets the initial value of the SnapX property.
Implementation: The SetFormatOptions method sets the initial value of the SnapY property.
There are four valid actions, three of which consist of a request to the Server
for an update of the Web page. Update:Full submits any entered items and
requests a complete screen redraw. Update:Partial submits any entered items
and requests only the data to fill Java controls (see JSL Manager Class).
Update:Refresh is only valid for the windows with a TimerDelay. It submits
no items but requests a complete screen redraw when the timer runs out.
Update:OnBrowser updates the Web page as far as possible without
contacting the Server.
The Init method sets the initial value of the TimerAction property to zero (0).
The SetTimer method sets subsequent values of the TimerAction property.
Implementation: The Init method sets the initial value of the TimerDelay property to zero (0).
The SetTimer method sets subsequent values of the TimerDelay property.
Implementation: The Init method sets the initial value of the ToolbarFeq property. The
GetToolbarFeq method returns the value of the ToolbarFeq property.
WebWindowBaseClass Methods
The WebWindowBaseClass inherits all the methods of the
WebControlListClass from which it is derived.
Functional Organization—ExpectedUse
SeeAlso: [Link]
154 C L A R I O N IBC LIBRARY REFERENCE
GetBackgroundColor
A virtual placeholder to return the background color of
the Web page window.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method is only a virtual placeholder to return the
background color of the Web page.
GetBackgroundImage (returnWebwindowwallpaper)
GetBackgroundImage, STRING, VIRTUAL
The GetBackgroundImage method is only a virtual placeholder to return
the filename containing the background image of the Web page window.
SeeAlso: [Link]
GetCreateClose(return closebuttonflag)
GetCreateClose, BYTE, VIRTUAL
The GetCreateClose method is only a virtual placeholder. It returns a value
indicating whether to create a close button on the Web page.
GetCreateClose is a VIRTUAL method so that other base class methods can
directly call the GetCreateClose virtual method in a derived class. This lets
you easily implement your own custom version of this method.
Return DataType: BYTE
SeeAlso: [Link]
156 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The children parameter is a QUEUE with the same structure as the
WebControlQueue declared in [Link] as follows:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
SeeAlso: [Link]
CHAPTER 7 WEBWINDOWBASECLASS 157
Implementation: EQUATEs for the control type parameter are declared in [Link].
Each control type EQUATE is prefixed with CREATE:.
SeeAlso: [Link]
GetPageImage(returnWebpagewallpaper)
GetPageImage, STRING, VIRTUAL
The GetPageImage method is only a virtual placeholder to return the
filename of the file containing the background image of the Web page.
SeeAlso: [Link]
SeeAlso: [Link]
160 C L A R I O N IBC LIBRARY REFERENCE
SeeAlso: [Link]
CHAPTER 7 WEBWINDOWBASECLASS 161
GetWebActiveFrame (returnWebFrameClassreference)
GetWebActiveFrame, WebFrameClass, VIRTUAL
The GetWebActiveFrame method is only a virtual placeholder to return a
reference to the active WebFrameClass.
SeeAlso: [Link]
162 IBC LIBRARY REFERENCE
A value of one (1) indicates username and password are required. A value of
zero (0) indicates no username and password are required. The
WebWindowClass uses this property to provide procedure level security.
Implementation: The Init method sets the initial value of the Authorize property to False. The
SetPassword method sets the Authorize property to True.
Implementation: The Init method sets the initial value of the AuthorizeArea. The Internet
Connect Templates set AuthorizeArea to window title + procedure name.
HtmlTarget (HtmlClassobject)
HtmlTarget &HtmlClass
The HtmlTarget property is a reference to the HtmlClass object that writes
HTML code representing the window. The WebWindowClass uses this
property to generate HTML code.
Implementation: The Init method sets the value of the HtmlTarget property.
SeeAlso: Init
IsCentered(center or left-justifywebwindow)
IsCentered BYTE
The IsCentered property indicates whether the window is centered within
the generated Web page. A value of one (1) centers the window; a value of
zero (0) left justifies the window.
Implementation: The Init method sets the value of the IsCentered property to True.
SeeAlso: Init
164 IBC LIBRARY REFERENCE
There are significant performance penalties associated with the use of secure
channels, so we recommend using them only when circumstances demand it;
for example, when transmitting credit card numbers or other very sensitive
information.
SeeAlso: Init
SeeAlso: CreateHtmlPage
CHAPTER 7 WEBWINDOWCLASS 165
WebWindowClass Methods
The WebWindowClass inherits all the methods of the WebWindowBaseClass
from which it is derived.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
TakeEvent handle browser & ACCEPT loop events
Occasional Use:
CreateDummyHtmlPage write empty Html page
CreateHtmlPage generate HTML for a window
CreateJslData generate Java Support Library data
CreatePageFooter generate HTML page footer
CreatePageHeader generate HTML page footer
CreateUnauthorizedPage create unauthorized user page
GetAuthorized check user authorization
GetButtonInClientArea return button present indicator
166 IBC LIBRARY REFERENCE
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
This method has the PROC attribute, so you can call it like a PROCEDURE
and ignore the return value.
AddControl(control)
If control is a field equate, AddControl instantiates a
WebControlClass object of the appropriate type, adds it to the
control list, and returns a reference to the new control object.
If control is a WebControlClass object, AddControl adds the
object to the control list, but does not initialize it. There is no
return value.
AddControl(control, type)
If type is a control type, AddControl instantiates a
WebControlClass object of the specified type, then adds it to the
control list, and returns a reference to the new control object.
If type is a WebControlClass object, AddControl initializes the
object, then adds it to the control list. There is no return value.
Return DataType: &WebControlClass
Implementation: The AddControl method adds a WebControlClass object to the list of control
168 IBC LIBRARY REFERENCE
objects for this window. The AddControl method may instantiate a new
WebControlClass object then add it to the list, or it may add an existing
object to the list.
Example:
WebMenubar WebMenubarClass !declare WebMenubar control object
CODE
[Link](?InsertButton) !instantiate & add a real control
IC:CurControl &= [Link](?CustList)!instantiate & add a real control
IC:[Link](CustQ) ! and use the returned reference
[Link](?Feq:Menubar, WebMenubar) !add an existing control object
[Link](FEQ:Caption, CREATE:Caption) !instantiate & add a psuedo-control
[Link](FEQ:Close, CREATE:Close) !instantiate & add Web only control
SeeAlso: WebControlClass
CHAPTER 7 WEBWINDOWCLASS 169
AddControlsToLayout
Sets the controls to include in the HTML layout and
generation process.
layout object The label of the LayoutHtmlClass object that optimally
arranges the controls on the generated Web page.
parent control An integer constant, variable, EQUATE, or expression
containing a control number of the control whose
children are included in the layout process, or zero (0) if
the window is the parent.
The AddControlsToLayout method sets the controls to include in the
HTML layout and generation process. The AddControlsToLayout method
includes only “visible” controls; that is, it excludes disabled and hidden
controls from the Web page layout process.
Example:
[Link] PROCEDURE(*WebControlQueue Source, |
*HtmlClass Target, STRING style, SIGNED SnapX, SIGNED SnapY)
Layout LayoutHtmlClass
CODE
[Link](style, SnapX, SnapY)
[Link](Source, Layout)
[Link](Target)
[Link]
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF [Link]
[Link]([Link]*1000, [Link])
END
[Link]
IF [Link]
[Link]
END
[Link](Target)
IF ([Link])
[Link]('<</CENTER>')
END
[Link]('<</BODY>')
[Link]('<</HTML>')
SeeAlso: CreatePageFooter
CHAPTER 7 WEBWINDOWCLASS 171
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<HTML>')
[Link]()
[Link]('<<HEAD>')
[Link]('<<TITLE>')
[Link](Target)
[Link]('<</TITLE>')
[Link]('<</HEAD>')
[Link]('<<BODY')
IF ([Link] <> COLOR:None)
[Link](' BGCOLOR="' & IC:ColorText([Link]) & '"')
END
[Link](' onLoad="setuptimer()" onUnload="killtimer()">')
[Link]('<<CENTER>')
[Link]()
[Link](Target)
SeeAlso: CreatePageHeader
172 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target, [Link], [Link]())
[Link]
CHAPTER 7 WEBWINDOWCLASS 173
CreateDummyHtmlPage
Generates an empty HTML page.
html target The label of the HtmlClass object that writes the HTML
code.
filename A string constant, variable, EQUATE, or expression
containing the HTML code filename.
The CreateDummyHtmlPage method generates an empty HTML page for
transmittal to the client browser.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
Filename = [Link]() & '[Link]'
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
174 IBC LIBRARY REFERENCE
CreateHtmlPage(generate HTMLforawindow)
CreateHtmlPage( html target, filename )
Implementation: The CreateHtmlPage method generates a page header and footer surrounding
the HTML code for all the window controls. The CreateHtmlPage method
sets the SentHtml property to one (True).
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
Filename = [Link]() & '[Link]'
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
SeeAlso: SentHtml
CHAPTER 7 WEBWINDOWCLASS 175
Implementation: The CreateJslData method calls the CreateJslData method for each visible
control in the window.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
Filename = [Link]() & '[Link]'
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
SeeAlso: [Link]
176 IBC LIBRARY REFERENCE
CreatePageFooter
Generates the HTML page footer for the window.
html target The label of the HtmlClass object that writes the HTML
code.
The CreatePageFooter method generates the HTML page footer, including
any page-ending JavaScript needed by Java controls.
Example:
[Link] PROCEDURE(*HtmlClass Target, STRING HtmlFilename)
CODE
[Link](HtmlFilename,[Link],[Link],[Link])
[Link](Target)
[Link](Target, 0, [Link]())
[Link](Target)
[Link]
[Link] = TRUE
Example:
[Link] PROCEDURE(*HtmlClass Target, STRING HtmlFilename)
CODE
[Link](HtmlFilename,[Link],[Link],[Link])
[Link](Target)
[Link](Target, 0, [Link]())
[Link](Target)
[Link]
[Link] = TRUE
CHAPTER 7 WEBWINDOWCLASS 177
CreateUnauthorizedPage
Generates an HTML page showing an access denied
message.
html target The label of the HtmlClass object that writes the HTML
code.
filename A string constant, variable, EQUATE, or expression
containing the filename of the file containing the HTML
code.
The CreateUnauthorizedPage method generates an HTML page showing
an access denied message.
Implementation: The default message is “Access denied. Click here to return to previous
screen, or wait for 10 seconds.” This default page is installed by default to
the \LIBSRC\[Link].
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link] AND NOT [Link]())
Filename = [Link](Content:UnAuthorized)
[Link]([Link], Filename)
[Link](Filename, [Link]())
[Link] = TRUE
Post(EVENT:CloseWindow)
ELSE
Filename = [Link](Content:Html)
[Link]
[Link]([Link], Filename)
[Link](Filename, [Link](), FALSE)
END
[Link]()
Implementation: The SetPassword method sets the Authorize property to true, to password
protect the Web page (AuthorizeArea). It also sets the authorized password
for the AuthorizeArea. The GetAuthorized method collects and validates the
end user’s password for the AuthorizeArea. The ValidatePassword method
verifies the password entered by the end user. Finally, the TakeCreatePage
method generates an “access denied” page (CreateUnauthorizedPage) for
invalid passwords.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link] AND NOT [Link]())
Filename = [Link](Content:UnAuthorized)
[Link]([Link], Filename)
[Link](Filename, [Link]())
[Link] = TRUE
Post(EVENT:CloseWindow)
ELSE
Filename = [Link](Content:Html)
[Link]
[Link]([Link], Filename)
[Link](Filename, [Link](), FALSE)
END
[Link]()
GetBackgroundColor
Returns the background color of the Web page window.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method returns the background color of the Web
page window.
Example:
[Link] PROCEDURE
CODE
IF ([Link] <> COLOR:None)
RETURN [Link]
END
RETURN [Link]()
SeeAlso: Background
CHAPTER 7 WEBWINDOWCLASS 181
GetBackgroundImage (returnWebpagewallpaper)
GetBackgroundImage, STRING, VIRTUAL
The GetBackgroundImage method returns the filename of the file
containing the background image of the Web page window.
SeeAlso: BackImage
182 IBC LIBRARY REFERENCE
Implementation: The GetButtonInClientArea returns the control number of the first visible
button in the client area. The GetCreateClose method calls the
GetButtonInClientArea method to determine whether to create a close button
for the window.
Example:
[Link] PROCEDURE
CODE
CASE [Link]
OF CLOSE:Never
RETURN FALSE
OF CLOSE:IfSystem
RETURN 0{PROP:System}
OF CLOSE:SystemNoButton
IF 0{PROP:System} AND NOT [Link]()
RETURN TRUE
END
RETURN FALSE
OF CLOSE:Always
RETURN TRUE
END
Implementation: The children parameter names a QUEUE with the same structure as the
WebControlQueue declared in [Link] as follows:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
Example:
[Link] PROCEDURE|
(*HtmlClass Target,SIGNED ParentFeq,STRING Style)
Controls WebControlQueue
CODE
[Link](Controls, ParentFeq)
[Link](Controls, Target, Style, [Link], [Link])
184 IBC LIBRARY REFERENCE
Implementation: The control information parameter names a GROUP with the same structure
as the WebControlRefGroup GROUP declared in [Link] as
follows:
WebControlRefGroup GROUP,TYPE
Control &WebControlClass
END
Example:
[Link] PROCEDURE
ParentControlGroup GROUP(WebControlRefGroup)
END
CODE
[Link]([Link], ParentControlGroup)
IF (NOT [Link] &= NULL)
RETURN [Link]()
END
RETURN [Link]()
SeeAlso: GetControlInfo
CHAPTER 7 WEBWINDOWCLASS 185
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlRefGroup Result)
CODE
[Link] &= [Link](Feq)
186 IBC LIBRARY REFERENCE
GetCreateClose(return closebuttonflag)
GetCreateClose, BYTE, VIRTUAL
The GetCreateClose method returns a value indicating whether to create a
close button on the Web page. A return value of one (1) indicates a close
button should be created; a return value of zero (0) indicates a close button
should not be created.
Example:
[Link] PROCEDURE
CurFeq SIGNED,AUTO
CODE
CurFeq = 0{PROP:nextfield}
LOOP WHILE (CurFeq)
IF (CurFeq)
[Link](CurFeq, IC:GetControlType(CurFeq))
END
CurFeq = 0{PROP:nextfield, CurFeq}
END
CurFeq = 04000H
LOOP WHILE (CurFeq{PROP:type})
[Link](CurFeq, IC:GetControlType(CurFeq))
CurFeq += 1
END
[Link](FEQ:ClientArea, CREATE:ClientArea)
IF ([Link]())
[Link](FEQ:Close, CREATE:Close)
END
[Link]
Example:
[Link] PROCEDURE
CODE
IF ([Link]() AND [Link]([Link]))
RETURN TRUE
END
RETURN FALSE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<INPUT TYPE=SUBMIT VALUE="')
[Link](IC:QuoteText([Link](), IC:RESET:HotValue) & '"')
[Link]([Link](Target))
IF [Link]{PROP:std} = STD:Help
[Link]([Link]())
END
[Link]('>')
SeeAlso: GetHelpReference
CHAPTER 7 WEBWINDOWCLASS 189
Example:
[Link] PROCEDURE
CODE
RETURN ' onClick="' & IC:QuoteJsl('ShowHelp(''' & |
[Link]() & ''',''' & [Link] & ''')') & '"'
[Link] PROCEDURE
CODE
RETURN ' HREF="' & [Link]() & '"'
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>')
[Link](([Link]()-1)*2)
[Link]('<<A')
IF [Link]{PROP:std} = STD:Help
[Link](' TARGET="_blank"' & [Link]())
ELSE
[Link](' HREF="' & [Link]([Link]) & '"')
END
[Link]('>')
[Link]([Link]() & '<</A>')
[Link]('<</NOBR><<BR>')
SeeAlso: GetHelpReference
CHAPTER 7 WEBWINDOWCLASS 191
Implementation: The GetMenubarFeq method returns the value of the MenubarFeq property.
Example:
GetParentFeq PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
ParentFeq SIGNED,AUTO
CODE
ParentFeq = Feq{PROP:Parent}
IF (ParentFeq = 0)
CASE (Feq{PROP:Type})
OF CREATE:MENU
OROF CREATE:ITEM
ParentFeq = [Link]()
ELSE
IF (Feq{PROP:intoolbar})
ParentFeq = [Link]()
ELSE
ParentFeq = FEQ:ClientArea
END
END
END
RETURN ParentFeq
SeeAlso: [Link]
192 IBC LIBRARY REFERENCE
GetPageImage(returnWebpagewallpaper)
GetPageImage, STRING, VIRTUAL
The GetPageImage method returns the filename of the file containing the
background image of the Web page.
Implementation: The GetPageImage method returns the value of the PageImage property.
SeeAlso: PageImage
Example:
[Link] PROCEDURE
CODE
RETURN [Link]()
SeeAlso: GetFirstChild
CHAPTER 7 WEBWINDOWCLASS 193
Example:
[Link] PROCEDURE
CODE
RETURN [Link]()
SeeAlso: GetFirstChild
194 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target, STRING HtmlFilename)
CODE
[Link](HtmlFilename,[Link],[Link],[Link])
[Link](Target)
[Link](Target, 0, [Link]())
[Link](Target)
[Link]
[Link] = TRUE
Implementation: The GetTargetSecurity method evaluates the IsSecure property and returns
Secure:Full if IsSecure is True.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link] AND NOT [Link]())
Filename = [Link](Content:UnAuthorized)
[Link]([Link], Filename)
[Link](Filename, [Link]())
[Link] = TRUE
Post(EVENT:CloseWindow)
ELSE
Filename = [Link](Content:Html)
[Link]
[Link]([Link], Filename)
[Link](Filename, [Link](), FALSE)
END
[Link]()
SeeAlso: IsSecure
196 IBC LIBRARY REFERENCE
Implementation: The GetToolbarFeq method returns the value of the ToolbarFeq property.
Example:
GetParentFeq PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
ParentFeq SIGNED,AUTO
CODE
ParentFeq = Feq{PROP:Parent}
IF (ParentFeq = 0)
CASE (Feq{PROP:Type})
OF CREATE:MENU
OROF CREATE:ITEM
ParentFeq = [Link]()
ELSE
IF (Feq{PROP:intoolbar})
ParentFeq = [Link]()
ELSE
ParentFeq = FEQ:ClientArea
END
END
END
RETURN ParentFeq
SeeAlso: [Link]
CHAPTER 7 WEBWINDOWCLASS 197
Example:
[Link] PROCEDURE(SIGNED EventNo)
CODE
IF (EventNo = EVENT:Accepted)
IF ([Link]() = FormMode)
RETURN Update:Full
ELSE
RETURN Update:Partial
END
END
RETURN Update:OnBrowser
198 IBC LIBRARY REFERENCE
GetWebActiveFrame (returnWebFrameClassreference)
GetWebActiveFrame, WebFrameClass, VIRTUAL
The GetWebActiveFrame method returns a reference to the active
WebFrameClass. The WebWindowClass uses this method to pass events to
the WebFrameClass for processing.
Example:
[Link] PROCEDURE(*SIGNED x,*SIGNED y,*SIGNED width,*SIGNED height)
ActiveFrame &WebFrameClass
CODE
ActiveFrame &= [Link]()
IF [Link]=[Link]()
x = [Link]{PROP:childindex} * 40
y = 0
ELSE
x = 0
y = [Link]{PROP:childindex} * 40
END
width = 10
height = 10
SeeAlso: WebFrameClass
CHAPTER 7 WEBWINDOWCLASS 199
Implementation: The Init method sets the default values of all the WebWindowClass
properties, including the properties that control HTML code generation. You
may override these default values by subsequent (after init method)
assignments to the WebWindowClass properties.
Example:
PrepareProcedure ROUTINE
[Link](WebServer, HtmlManager, window{PROP:text} & ' (BrowseCustomer)')
!etc.
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
Example:
ProcedureReturn ROUTINE
[Link]
!etc.
Implementation: The ResetFromControls method calls the AddControl method for each
control and pseudo-control in the opened WINDOW. When all controls are
set, ResetFromControls establishes relationships between controls by calling
the SetParentDefaults method.
Example:
[Link] PROCEDURE
CODE
!procedure code
CASE (EVENT())
OF EVENT:NewPage
IF ([Link]())
[Link]
END
OF EVENT:OpenWindow
[Link]
END
!etc,
SetBackground(setWebpagewindowbackground)
SetBackground( [color] [,image] )
SetBackground Sets the Web page window background color and image.
color An integer constant, variable, EQUATE, or expression
indicating the PAGE color. This color is inherited by the
window components, such as the toolbar and client area,
unless a specific color is set for the component.
image A string constant, variable, EQUATE, or expression
containing a filename. The WebWindowClass object
displays (tiles) the image in the specified file as the
background to the Web page.
The SetBackground method sets the Web page window background color
and image. Other window components (caption, menubar, toolbar, and client
area) inherit the color and image unless overriden.
Implementation: The SetBackground method sets the Background property and the
BackImage property. The GetBackgroundColor method returns the value of
the Background property.
Example:
PrepareProcedure ROUTINE
[Link](4227200, '[Link]')
!etc.
Example:
PrepareProcedure ROUTINE
[Link](True)
!etc.
SeeAlso: IsCentered
Example:
[Link] PROCEDURE
CurFeq SIGNED,AUTO
CODE
!procedure code
[Link]
SeeAlso: [Link]
CHAPTER 7 WEBWINDOWCLASS 203
SetFormatOptions(setWebpagescale andalignment)
SetFormatOptions( snaptoX, snaptoY, scaleX, scaleY )
SetFormatOptions
Sets the control scaling and alignment factors for the
Web page.
snaptoX An integer constant, variable, EQUATE, or expression
containing a horizontal “snap to” factor for aligning
controls on the Web page.
snaptoY An integer constant, variable, EQUATE, or expression
containing a vertical “snap to” factor for aligning
controls on the Web page.
scaleX An integer constant, variable, EQUATE, or expression
containing a horizontal scaling factor for sizing Java
controls on the Web page.
scaleY An integer constant, variable, EQUATE, or expression
containing a vertical scaling factor for sizing Java
controls on the Web page.
The SetFormatOptions method sets the control scaling and alignment
factors for the Web page. The precise effect of these properties is determined
by the LayoutHtmlClass and HtmlClass objects that actually apply the
factors.
Implementation: The SetFormatOptions method sets the initial value of the SnapX and SnapY
properties, and the initial values of the HtmlOption property.
Example:
[Link] PROCEDURE(*WebServerClass Server, |
*HtmlClass HtmlTarget, <STRING AuthorizeArea>)
CODE
!procedure code
[Link](2, 2, 6, 13)
The GetHelpReference method derives the help topic from the WINDOW’s
HLP attribute.
Example:
PrepareProcedure ROUTINE
[Link](‘Widgets/OrdHelp,htm’, ‘’)
Implementation: The SetHelpURL method sets the HelpDocument property to URL, the
HelpEnabled property to True, the HelpRelative property to False, and the
HelpStyle property to style.
The GetHelpReference method derives the help document name from the
WINDOW’s HLP attribute.
Example:
PrepareProcedure ROUTINE
[Link](‘http//[Link]/Widgets’, ‘’)
SetPageBackground(setWebpage background)
SetPageBackground( [color] [,image] )
SetPageBackground
Sets the Web page background color and image.
color An integer constant, variable, EQUATE, or expression
indicating the PAGE color.
image A string constant, variable, EQUATE, or expression
containing a filename. The WebWindowClass object
displays (tiles) the image in the specified file as the
background to the Web page.
The SetPageBackground method sets the Web page background color and
image.
Implementation: The SetPageBackground method sets the PageBackground property and the
PageImage property.
Example:
PrepareProcedure ROUTINE
[Link](4227200, '[Link]')
!etc.
Implementation: The SetPassword method sets the Authorize property to true, to password
protect the Web page (AuthorizeArea). It also sets the authorized password
for the AuthorizeArea. The GetAuthorized method collects and validates the
end user’s password for the AuthorizeArea. The ValidatePassword method
verifies the password entered by the end user. Finally, the TakeCreatePage
method generates an “access denied” page (CreateUnauthorizedPage) for
invalid passwords.
Example:
PrepareProcedure ROUTINE
!routine code
[Link](WebServer, HtmlManager, window{PROP:text} & ' (BrowseCustomer)')
[Link](UserPassword, FALSE)
SetSplash(makethis a splashwindow)
SetSplash( timer delay )
Implementation: The SetSplash method sets the IsSplash property to true, the TimerAction
property to Update:Refresh, and the TimerDelay property to timer delay.
Example:
Splash PROCEDURE
!procedure data
CODE
!procedure code
PrepareProcedure ROUTINE
!routine code
[Link](10)
SetTimer Sets a time interval and the action to take when the time
interval expires.
timer delay An integer constant, variable, EQUATE, or expression
indicating the time period for Java applets to wait before
initiating the timer action.
timer action An integer constant, variable, EQUATE, or expression
indicating the action the browser takes after the timer
delay interval. The action is repeated each time the timer
delay interval expires.
The SetTimer method sets a time interval and the action to take when the
time interval expires. Both the timer delay interval and the timer action are
implemented by the Client browser, not the Server.
There are four valid timer actions, three of which consist of a request to the
Server for an update of the Web page. Update:Full submits any entered items
and requests a complete screen redraw. Update:Partial submits any entered
items and requests only the data to fill Java controls (see JSL Manager
Class). Update:Refresh submits no items, but requests a complete screen
redraw. Update:OnBrowser updates the Web page as far as possible without
contacting the Server.
Implementation: The SetTimer method sets the TimerAction and TimerDelay properties.
The Init method sets the initial value of the TimerAction property to zero (0).
The SetTimer method sets subsequent values of the TimerAction property.
Example:
PrepareProcedure ROUTINE
!routine code
[Link](10, Update:Partial)
Example:
PrepareProcedure ROUTINE
!routine code
[Link](?Insert)
[Link](?Change)
[Link](?Delete)
Example:
[Link] PROCEDURE
CODE
IF ([Link])
CASE [Link]()
OF NET:Request
[Link]
OF NET:Terminate
RETURN 1
END
CASE (EVENT())
OF EVENT:NewPage
IF ([Link]())
[Link]
END
OF EVENT:OpenWindow
[Link]
END
[Link]
IF ([Link]())
POST(EVENT:NewPage)
END
END
RETURN 0
SeeAlso: TakeEvent
212 IBC LIBRARY REFERENCE
A return value of one (1) indicates the calling entity should BREAK out of
the current ACCEPT loop. A return value of zero (0) indicates the calling
entity should continue through the current ACCEPT loop.
Implementation: When the WINDOW is opened, the TakeEvent method builds the
WebWindowClass object’s knowledge of the WINDOW’s controls and
pseudo-controls from the present state of the WINDOW.
Example:
AlmostAny PROCEDURE
!procedure data
CODE
DO PrepareProcedure
ACCEPT
IF [Link]()
BREAK
END
CASE EVENT()
!etc
END
DO ProcedureReturn
CHAPTER 7 WEBWINDOWCLASS 213
Implementation: TakeRequest processes requests from the Client browser by accepting field
values from the browser and updating the corresponding Clarion controls’
USE variables, then POSTing the associated event to the appropriate control
([Link]).
Example:
[Link] PROCEDURE
CODE
IF ([Link])
CASE [Link]()
OF NET:Request
[Link]
OF NET:Terminate
RETURN 1
END
CASE (EVENT())
OF EVENT:NewPage
IF ([Link]())
[Link]
END
OF EVENT:OpenWindow
[Link]
END
[Link]
IF ([Link]())
POST(EVENT:NewPage)
END
END
RETURN 0
TakeUnknownSubmit
A virtual placeholder method to handle unexpected
Client requests.
control name A string constant, variable, EQUATE, or expression
containing the HTML control identifier.
new value A string constant, variable, EQUATE, or expression
containing the new value of the HTML control.
The TakeUnknownSubmit method is a virtual placeholder method to handle
Client data assignments to unrecognized Web page fields.
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
[Link]()
END
END
LOOP
NextSubmit &= [Link]()
IF (NextSubmit &= NULL) THEN BREAK.
CurFeq = [Link]
CASE (CurFeq)
OF FEQ:UNKNOWN
[Link]([Link], [Link])
ELSE
IF ([Link](CurFeq))
IF ([Link])
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)
END
END
END
END
END
SeeAlso: TakeRequest
CHAPTER 7 WEBWINDOWCLASS 215
Implementation: The TitleContents method surrounds the WINDOW’s PROP:Text value with
quotations suitable for the Client browser.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<HTML>')
[Link]()
IF ([Link] = Update:Refresh)
[Link]([Link])
END
[Link]('<<HEAD>')
[Link]('<<TITLE>')
[Link](Target)
[Link]('<</TITLE>')
!etc.
SeeAlso: CreatePageHeader
216 IBC LIBRARY REFERENCE
Implementation: The SetPassword method sets the Authorize property to true, to password
protect the Web page (AuthorizeArea). It also sets the authorized password
for the AuthorizeArea. The GetAuthorized method collects and validates the
end user’s password for the AuthorizeArea. The ValidatePassword method
verifies the password entered by the end user. Finally, the TakeCreatePage
method generates an “access denied” page (CreateUnauthorizedPage) for
invalid passwords.
Example:
[Link] PROCEDURE
Password STRING(255)
UserName STRING(255)
CODE
[Link]([Link], UserName, Password)
RETURN [Link](UserName, Password)
Overview 219
WebControlClass Concepts ................................................................................ 219
Relationship to Other Internet Builder Classes ................................................... 219
Internet Connect Template Implementation .........................................................220
Source Files..........................................................................................................220
WebControlClass Properties 221
ActionOnAccept (browser action for control) .................................................... 221
Container (container control) .............................................................................. 222
DisabledAction (HTML for disabled control) .................................................... 222
Feq (control number) ...........................................................................................223
IsDynamic (memory allocated flag) ................................................................... 223
OwnerWindow (owner window) .........................................................................223
ParentFeq (Web page parent control ) .................................................................224
RealParentFeq (window parent control) ............................................................. 224
WebControlClass Methods 225
Functional Organization—Expected Use ............................................................225
BeforeResetControl (a virtual for control preprocessing) .................................. 227
CreateCellContents (write HTML for control) ....................................................227
CreateCellFooter (end HTML for control attributes) ..........................................228
CreateCellHeader (begin HTML for control attributes) ..................................... 228
CreateColorParameters (write Java applet color parameters) ............................. 229
CreateForeColorParameter (write Java applet foreground color parameter) ...... 230
CreateHtml (write HTML for control and its attributes) .....................................231
CreateHtmlExtra (write HTML for related control) ............................................232
CreateJslData (update Web page controls) ..........................................................232
CreateParams (write all parameters for Java control) ......................................... 233
DoSetChildDefaults (set nested child controls) .................................................. 233
GetAlignText (return text alignment information) ..............................................234
GetAppletType (return applet type) .................................................................... 234
GetBackgroundColor (return background color) .................................................235
GetCanDisable (return disable-ability flag) .........................................................236
GetCellAttributes (return control attributes)........................................................237
GetChoiceChanged (return selection change) .................................................... 238
GetEventAction (return browser action)..............................................................239
218 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebControlClassConcepts
The WebControlClass manages the control attributes and behaviors that are
common to all Clarion controls. For example, MSG attributes are handled
the same for all controls; however, the HTML code generated for a CHECK
is different than for an ENTRY. Therefore, each specific type of Clarion
control also has its own class derived from the WebControlClass to
implement type-specific behavior. For example, the WebHtmlPromptClass
represents a PROMPT, and the WebHtmlEntryClass represents an ENTRY,
etc. These derived classes are documented in the WebControlClass Derived
Classes chapter.
HtmlItemClass
WebWindowClass
LayoutHtmlClass
SourceFiles
[Link] HtmlItemClass
[Link] WebControlClass
CHAPTER 8 WEB CONTROL CLASS 221
There are three valid actions. Update:Full submits any entered items and
requests a complete screen redraw. Update:Partial submits any entered items
and requests only the data to fill Java controls (see JSL Manager Class).
Update:OnBrowser updates the Web page as far as possible without
contacting the Server.
Implementation: The Init method sets the initial value of the ActionOnAccept property. The
SetEventAction method sets subsequent values of ActionOnAccept. The
GetEventAction returns the action the browser takes when the control is
accepted.
The IBC Library objects use container controls to group multiple Java
controls into a single Java container control. Grouping these controls
optimizes the performance of the Server (Web-enabled application). The
Server generates and transmits less HTML code, and the containerized Java
applets initialize and display faster on the Client machine.
SeeAlso: Init
DisabledAction(HTML fordisabledcontrol)
DisabledAction BYTE
The DisabledAction property indicates how the disabled control is
represented on the Web page. This property lets you determine how to handle
controls that are disabled under Windows, but cannot be disabled under a
browser, because the HTML control does not support disabling.
Valid actions include, always display the disabled control, always hide the
disabled control, and disable the control if HTML supports it, otherwise hide
the control.
Implementation: The Init method sets the initial value of the DisabledAction property to equal
the [Link] property. You may override the
DisabledAction for a control with a simple assignment statement.
Feq(control number)
Feq SIGNED
The Feq property contains the control’s control number (field equate). The
WebWindowClass uses this property to uniquely identify the control.
Implementation: The Init method sets the value of the Feq property.
SeeAlso: Init
IsDynamic (memoryallocatedflag)
IsDynamic BYTE
The IsDynamic property indicates whether memory was allocated for the
WebControlClass object. The WebWindowClass object uses this property to
free the allocated memory.
SeeAlso: [Link]
Implementation: The Init method sets the value of the OwnerWindow property.
SeeAlso: Init
224 IBC LIBRARY REFERENCE
Implementation: The SetChildDefaults method sets the value of the ParentFeq property.
SeeAlso: SetChildDefaults
RealParentFeq(windowparent control)
RealParentFeq SIGNED, PROTECTED
The RealParentFeq property contains the control number (field equate) of
the parent control for window purposes. The WebWindowClass uses this
property to allow child controls inherit properties from their parents.
Implementation: The Init method sets the value of the ParentFeq property.
SeeAlso: Init
CHAPTER 8 WEB CONTROL CLASS 225
WebControlClass Methods
The WebControlClass inherits all the methods of the HtmlItemClass from
which it is derived.
Functional Organization—ExpectedUse
The primary interface methods are called from outside the WebControlClass.
That is, the WebWindowClass methods call these methods fairly routinely.
These primary interface methods can be further divided into three categories
according to their use:
Mainstream Use:
BeforeResetControlV preprocess control
CreateHtmlV write HTML for control and children
CreateJslDataV update Web page control
RefreshDisabled update Web page control status
ResetFromQueueV record changes to Server LIST queue
ResetControlV update Server control
UpdateCopyUse save copy of control contents
UpdateCopyChoice save selected item number
V
These methods are also Virtual.
226 IBC LIBRARY REFERENCE
Occasional Use:
CreateColorParameters write Java applet color parameters
CreateCellHeader begin HTML for control attributes
CreateCellFooter end HTML for control attributes
DoSetChildDefaults set nested child controls
GetChoiceChanged return selection change
GetFont add font information
GetLevel return nesting level
GetNameAttribute return HTML control name
GetQuotedText return control text in quotes
GetUseChanged return contents changed indicator
SetDirty force list refresh
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
CreateCellContents
A virtual placeholder to write the HTML code represent-
ing the control.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method is a virtual placeholder to write the HTML
code representing the control.
Implementation: The proper positioning of each Web page control is accomplished by using
HTML <TABLE> and <CELL> statements. CreateCellContents writes only
the HTML code representing the control. The HTML code defining the
<TABLE> and the <CELL> containing the control is written by other
methods including [Link], CreateCellHeader, and
CreateCellFooter.
Implementation: CreateCellHeader ends the HTML Font specifications for the control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target)
[Link](Target)
CreateCellHeader
Begins the HTML representing control attributes.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellHeader method begins the HTML representing control
attributes.
Implementation: CreateCellHeader begins the HTML Font specifications for the control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target)
[Link](Target)
CHAPTER 8 WEB CONTROL CLASS 229
CreateColorParameters
Generates the HTML/JavaScript to specify the control’s
foreground and background colors.
html object The label of the HtmlClass object that writes the HTML
code.
autospotlink An integer constant, variable, EQUATE, or expression
indicating whether this control is a hyperlink. A value of
one (1 or True) indicates a hyperlink; a value of zero (0
or False) indicates no hyperlink. If omitted, autospotlink
defaults to False.
The CreateColorParameters method generates the HTML or JavaScript to
specify the control’s foreground and background colors.
Implementation: The CreateColorParameters method sets the foreground color based on the
CreateForeColorParameter method. It sets the background color based on the
GetBackgroundColor method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
CODE
[Link](CurFont)
[Link] = [Link]()
[Link](Target, [Link])
[Link]('Text', [Link])
[Link]('Align', [Link]())
[Link](CurFont)
IF ([Link])
[Link]('Wrap', '1')
END
IF ([Link])
[Link]('AutoSpotLink', [Link])
END
CreateForeColorParameter
Generates the HTML/JavaScript to specify the control’s
foreground color.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateForeColorParameter method generates the HTML or
JavaScript to specify the control’s foreground color.
Example:
[Link] PROCEDURE(*HtmlClass Target,BYTE AutoSpotLink)
BackColor LONG,AUTO
CODE
[Link](Target)
BackColor = [Link]()
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
IF (AutoSpotLink)
END
CHAPTER 8 WEB CONTROL CLASS 231
CreateHtml Writes the HTML code representing the control and its
attributes.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateHtml method writes the HTML code representing the control
and its attributes. CreateHtml also serves as a placeholder method for many
derived classes—one for each control type. See WebControlClass Derived
Classes.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
!procedure code
SeeAlso: [Link]
232 IBC LIBRARY REFERENCE
SeeAlso: [Link]
CreateJslData (updateWebpagecontrols)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE
CODE
[Link]
Implementation: The GetAlignText method provides text alignment information for Java
applets that support text alignment.
Example:
[Link] PROCEDURE(*HtmlClass Target,SIGNED Width,SIGNED Height)
Filename CSTRING(FILE:MaxFileName)
CODE
IF (NOT [Link]) THEN RETURN.
[Link] = [Link]{PROP:enabled}
Filename = [Link]()
[Link]([Link], 'ClarionImageButton', Width, Height)
[Link]('Picture', Filename)
[Link]('Label', [Link]())
[Link]('Hint', [Link]{PROP:tooltip})
[Link]('Align', [Link]())
IF ([Link](EVENT:Accepted) = Update:Full)
[Link]('Submit', 1)
END
IF (NOT [Link])
[Link]('Disabled', '1')
END
[Link]
GetBackgroundColor
Returns the background color of the control.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method returns the background color of the
control.
Example:
[Link] PROCEDURE(*HtmlClass Target, BYTE AutoSpotLink)
ForeColor LONG,AUTO
BackColor LONG,AUTO
CODE
GETFONT([Link],,, ForeColor)
BackColor = [Link]()
IF (ForeColor <> 0) AND (ForeColor <> COLOR:None)
[Link]('ForeColor', IC:RGB(ForeColor))
END
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
SeeAlso: GetParentBackgroundColor
236 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
CODE
IF ([Link] = DISABLE:Hide) OR |
(([Link] = DISABLE:OptHide) AND NOT [Link]())
IF NOT [Link]{PROP:enabled}
RETURN FALSE
END
END
RETURN [Link]{PROP:visible}
Implementation: The GetCellAttributes method returns HTML to set the font typeface, size,
color, and style of the HTML <TABLE> <CELL> containing the control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
238 IBC LIBRARY REFERENCE
GetChoiceChanged(return selectionchange)
GetChoiceChanged, BYTE
The GetChoiceChanged method returns a value indicating whether the end
user selected a different item within the control. A return value of one (1)
indicates a new selection; a return value of zero (0) indicates no change.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CHOICE([Link]))
[Link]
END
SeeAlso: UpdateCopyChoice
CHAPTER 8 WEB CONTROL CLASS 239
Implementation: EQUATEs for the return values are declared in [Link] as follows:
EVENT:NewPage EQUATE(280H) ! Build a new page now
EVENT:Initialize EQUATE(281H) ! List box wants contents
EVENT:RefreshPage EQUATE(282H) ! Refresh a browse box
Update:OnBrowser EQUATE(0)
Update:Partial EQUATE(1)
Update:Full EQUATE(2)
Example:
[Link] PROCEDURE(*HtmlClass Target)
Filename CSTRING(FILE:MaxFileName)
CODE
[Link] = [Link]{PROP:enabled}
Filename = [Link]()
[Link]('Picture', Filename)
[Link]('Label', [Link]())
[Link]('Hint', [Link]{PROP:tooltip})
[Link]('Align', [Link]())
IF ([Link](EVENT:Accepted) = Update:Full)
[Link]('Submit', 1)
END
IF (NOT [Link])
[Link]('Disabled', '1')
END
SeeAlso: SetEventAction
240 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
Border SIGNED(0)
CODE
[Link]('<<INPUT TYPE=SUBMIT VALUE="')
[Link](IC:QuoteText([Link](), IC:RESET:HotValue) & '"')
[Link]([Link](Target))
[Link]('>')
SeeAlso: PushFont
Implementation: The GetText method calls the GetHasHotKey method to identify controls
that may have Clarion hot key delimiters (&).
SeeAlso: GetText
CHAPTER 8 WEB CONTROL CLASS 241
Example:
[Link] PROCEDURE(SIGNED ParentFeq, SIGNED Type=0)
Index SIGNED,AUTO
FirstChild SIGNED(0)
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link] = ParentFeq)
FirstChild = [Link](ParentFeq, Type)
IF (FirstChild)
BREAK
END
END
END
RETURN FirstChild
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>')
[Link](([Link]()-1)*2)
[Link]([Link]())
[Link]('<</NOBR><<BR>')
Implementation: The GetNameAttribute method converts the Clarion control number (field
equate) into a valid, unique HTML control name.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Border SIGNED(0)
CODE
[Link]('<<INPUT TYPE=SUBMIT VALUE="')
[Link](IC:QuoteText([Link](), IC:RESET:HotValue) & '"')
[Link]([Link](Target))
[Link]('>')
CHAPTER 8 WEB CONTROL CLASS 243
GetParentBackgroundColor
Returns the background color of the parent control.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetParentBackgroundColor method returns the background color of
the parent control or window. The WebControlClass object uses this method
to allow controls to inherit colors from their parent controls.
Example:
[Link] PROCEDURE
BackColor LONG
CODE
BackColor = [Link]{PROP:background}
IF (BackColor <> COLOR:None)
RETURN BackColor
END
RETURN [Link]()
SeeAlso: GetBackgroundColor
244 IBC LIBRARY REFERENCE
Implementation: The GetPosition method uses the GETPOSITION procedure. See the
Language Reference for more information.
Example:
[Link] PROCEDURE
Children WebControlQueue
MyRect GROUP(Rect)
END
CODE
[Link](MyRect.x, MyRect.y, [Link], [Link])
[Link](Children, [Link])
[Link](Children, SELF, MyRect)
CHAPTER 8 WEB CONTROL CLASS 245
Implementation: GetQuotedText calls the GetText method to retrieve the control’s text.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>')
[Link](([Link]()-1)*2)
[Link]('<<A HREF="' & [Link]([Link]) & '">')
[Link]([Link]() & '<</A>')
[Link]('<</NOBR><<BR>')
SeeAlso: GetText
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target, [Link], [Link]())
[Link]
GetText is a VIRTUAL method so that other base class methods can directly
call the GetText virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Implementation: The GetQuotedText method calls the GetText method to retrieve the text.
GetText calls the GetHasHotKey method to identify controls that may have
Clarion hot key delimiters (&). GetText returns PROP:ScreenText for the
control.
Example:
[Link] PROCEDURE
CODE
RETURN IC:QuoteText([Link](), IC:RESET:Text)
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CONTENTS([Link]))
[Link]
END
SeeAlso: UpdateCopyUse
CHAPTER 8 WEB CONTROL CLASS 247
Implementation: A control may be omitted from the Web page for several reasons: it may be
disabled or hidden, it’s parent may be disabled or hidden, or it may be on a
TAB control that is not selected.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link]())
[Link](Target)
END
END
248 IBC LIBRARY REFERENCE
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method sets the initial value of the ActionOnAccept,
DisabledAction, Feq, OwnerWindow, and ParentFeq properties.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
Example:
[Link] PROCEDURE
Index SIGNED,AUTO
CODE
IF (~[Link] &= NULL)
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
ASSERT(~[Link] &= NULL)
[Link]
END
DISPOSE([Link])
END
PopFont is a VIRTUAL method so that other base class methods can directly
call the PopFont virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Menubar)
[Link](Target)
SeeAlso: PushFont
CHAPTER 8 WEB CONTROL CLASS 251
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Menubar)
[Link](Target)
SeeAlso: PopFont
252 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
[Link]([Link])
[Link](Target, 1 - [Link]{PROP:disable}, [Link])
CHAPTER 8 WEB CONTROL CLASS 253
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
CODE
LOOP
NextSubmit &= [Link]()
IF (NextSubmit &= NULL)
BREAK
END
CurFeq = [Link]
IF ([Link](CurFeq))
IF ([Link])
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)
END
END
END
END
SeeAlso: [Link]
254 IBC LIBRARY REFERENCE
SeeAlso: [Link]
CHAPTER 8 WEB CONTROL CLASS 255
SeeAlso: [Link],
[Link], [Link]
256 IBC LIBRARY REFERENCE
SetBreakable (allowwordwrap)
SetBreakable( value ), VIRTUAL
SeeAlso: [Link]
SeeAlso: [Link],
[Link]
CHAPTER 8 WEB CONTROL CLASS 257
SeeAlso: [Link]
258 IBC LIBRARY REFERENCE
Implementation: EQUATEs for the event parameter are declared in [Link]. Each
event EQUATE is prefixed with EVENT:. Valid events are
EVENT:Accepted
EVENT:Initialize
EVENT:NewSelection
EVENT:AlertKey
EVENT:Locate
EVENT:ScrollTop
EVENT:ScrollBottom
EVENT:PageUp
EVENT:PageDown
EVENT:ScrollUp
EVENT:ScrollDown
EVENT:ScrollDrag
EVENT:Expanding
EVENT:Contracting
EVENT:Expanded
EVENT:Contracted
Update:OnBrowser EQUATE(0)
Update:Partial EQUATE(1)
Update:Full EQUATE(2)
Example:
[Link] PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
CODE
[Link](Feq, OwnerWindow)
[Link] &= NEW EventActionQueue
[Link] &= NEW QueueActionQueue
[Link] = TRUE
IF ([Link]{PROP:imm})
[Link](EVENT:ScrollDown, Update:Partial)
[Link](EVENT:ScrollUp, Update:Partial)
[Link](EVENT:ScrollTop, Update:Partial)
[Link](EVENT:ScrollBottom, Update:Partial)
[Link](EVENT:ScrollDrag, Update:Partial)
[Link](EVENT:PageUp, Update:Partial)
[Link](EVENT:PageDown, Update:Partial)
[Link](EVENT:Locate, Update:Partial)
END
[Link](EVENT:NewSelection, Update:Partial)
[Link](EVENT:Initialize, Update:Partial)
[Link](EVENT:AlertKey, Update:Partial)
SetParentDefaults (confirmparent)
SetParentDefaults( potential parent, coordinates ), VIRTUAL
Implementation: The coordinates parameter names a GROUP with the same structure as the
Rect GROUP declared in [Link] as follows:
Rect GROUP,TYPE
x SIGNED
y SIGNED
width SIGNED
height SIGNED
END
Example:
[Link] PROCEDURE|
(*WebControlQueue Source, *WebControlClass Other, *Rect ParentPos)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
[Link](Other, ParentPos)
END
SeeAlso: [Link]
CHAPTER 8 WEB CONTROL CLASS 261
UpdateCopyChoice(saveselecteditemnumber)
UpdateCopyChoice, PROTECTED
The UpdateCopyChoice method saves the number of the Clarion control’s
currently selected item. The WebControlClass uses this information and the
GetChoiceChanged method to minimize the data sent to the Client
browser—no JSL data is generated for unchanged controls.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CHOICE([Link]))
[Link]
END
SeeAlso: GetChoiceChanged
262 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CONTENTS([Link]))
[Link]
END
SeeAlso: GetUseChanged
CHAPTER 9 WEBCONTROLCLASS DERIVED CLASSES 263
Overview 269
WebControlClass Concepts ................................................................................ 269
Classes Derived from WebControlClass ............................................................ 269
Relationship to Other Internet Builder Classes ................................................... 269
Internet Connect Template Implementation .........................................................269
Source Files..........................................................................................................270
WebHtmlCheckClass Methods 271
BeforeResetControl (control preprocessing) .......................................................271
CreateCellContents (generate HTML check box) ...............................................272
CreateJslData (update Web page control) ............................................................273
GetHasHotkey (control text may contain &) .......................................................274
ResetControl (update server control) ...................................................................275
WebHtmlEntryClass Methods 276
CreateCellContents (generate HTML entry box) ................................................276
CreateJslData (update Web page control) ............................................................277
ResetControl (update server control) ...................................................................278
WebHtmlGroupClass Properties 279
BorderWidth (Web page control border width) .................................................. 279
WebHtmlGroupClass Methods 280
CreateHtml (write HTML for GROUP control) ................................................. 280
GetHasHotkey (control text may contain &) .......................................................281
Init (initialize WebHtmlGroupClass object) ........................................................282
SetBorderWidth (set Web page control border width).........................................283
WebHtmlItemClass Methods 284
CreateCellContents (generate HTML menu item) ...............................................284
GetVisible (return control status flag) .................................................................285
ResetControl (update server control) ...................................................................286
WebHtmlMenuClass Methods 287
CreateCellContents (generate HTML menu) ...................................................... 287
CreateHtml (write HTML for MENU control) ....................................................288
GetCellAttributes (return control attributes)........................................................289
GetVisible (return control status flag) .................................................................290
264 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebControlClassConcepts
ClassesDerivedfromWebControlClass
Each type of Clarion control has unique HTML code requirements. For
example, the HTML code generated for a CHECK is different than for an
ENTRY. Therefore, each type of Clarion control has a corresponding class
derived from the WebControlClass to implement its type-specific behavior.
For example, the WebHtmlPromptClass represents a PROMPT control, and
the WebHtmlEntryClass represents an ENTRY control, etc. These derived
classes are documented in this chapter.
All the classes described in this chapter are derived from the
WebControlClass; therefore, the information and documentation pertaining
to the WebControlClass is directly applicable to these derived classes. Please
see Web Control Class for more information.
All the classes described in this chapter are derived from the
WebControlClass; therefore, the information and documentation pertaining
to the WebControlClass is directly applicable to these derived classes. Please
see Web Control Class for more information.
270 IBC LIBRARY REFERENCE
SourceFiles
The source code for the classes in this chapter is installed by default to the
\LIBSRC folder. The class declarations are in the following .INC files and
their respective method definitions are in the corresponding .CLW files.
[Link] WebButtonClass
WebCloseButtonClass
WebHotlinkClass
WebHtmlButtonClass
WebHtmlCheckClass
WebHtmlEntryClass
WebHtmlGroupClass
WebHtmlImageClass
WebHtmlItemClass
WebHtmlListClass
WebHtmlMenuClass
WebHtmlOptionClass
WebHtmlPromptClass
WebHtmlRadioClass
WebHtmlRegionClass
WebHtmlSheetClass
WebHtmlStringClass
WebHtmlTabClass
WebHtmlTextClass
WebImageClass
WebJavaButtonClass
WebJavaImageClass
WebJavaListClass
WebJavaStringClass
WebJavaToolButtonClass
WebListClass
WebLiteralClass
WebNullControlClass
WebStringClass
CHAPTER 9 WEBHTMLCHECKCLASS 271
WebHtmlCheckClass Methods
The WebHtmlCheckClass inherits all the methods of the WebControlClass
from which it is derived.
Implementation: The BeforeResetControl method clears the CHECK control. This is needed
because the Client browser never sends information regarding a cleared
check box—no information means the box is not checked—and always sends
information regarding a checked box.
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
272 C L A R I O N IBC LIBRARY REFERENCE
CreateCellContents
Generates HTML code to represent a check box.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a
check box.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
274 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
CHAPTER 9 WEBHTMLCHECKCLASS 275
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
276 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlEntryClass Methods
The WebHtmlEntryClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent an entry box.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent an
entry box.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
278 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
CHAPTER 9 WEBHTMLGROUPCLASS 279
The BorderWidth property is only effective for GROUP controls with the
BOXED attribute.
Implementation: The Init method sets the initial value of the BorderWidth property equal to
the [Link] property. The SetBorderWidth
method sets subsequent values of the BorderWidth property.
WebHtmlGroupClass Methods
The WebHtmlGroupClass inherits all the methods of the WebControlClass
from which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Border SIGNED(0)
CODE
IF ([Link]{PROP:boxed}<>0)
Border = [Link]
END
IF (Border)
[Link](' BORDER=' & Border)
END
[Link](Target, [Link])
IF (Border)
[Link]
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLGROUPCLASS 281
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
282 C L A R I O N IBC LIBRARY REFERENCE
Init (initializeWebHtmlGroupClassobject)
Init( control number, owner window ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, and sets the initial
value of the BorderWidth property equal to the
[Link] property.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
SeeAlso: BorderWidth
284 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlItemClass Methods
The WebHtmlItemClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a menu item.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a menu
item.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Implementation: A menu item may be omitted from the Web page because it is disabled or
hidden, or its parent is disabled or hidden.
Example:
[Link] PROCEDURE |
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
286 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
CHAPTER 9 WEBHTMLMENUCLASS 287
WebHtmlMenuClass Methods
The WebHtmlMenuClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a menu.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a
menu.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, [Link])
SeeAlso: [Link]
CHAPTER 9 WEBHTMLMENUCLASS 289
Implementation: The GetCellAttributes method returns the font typeface, size, color, and style
of the HTML TABLE CELL containing the control, plus nowrap and
alignment specifications.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
290 C L A R I O N IBC LIBRARY REFERENCE
Implementation: A menu may be omitted from the Web page because it has no children, or
because it is explicitly omitted from the Web page based on the
[Link] property.
Example:
[Link] PROCEDURE |
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLOPTIONCLASS 291
The BorderWidth property is only effective for OPTION controls with the
BOXED attribute.
Implementation: The Init method sets the initial value of the BorderWidth property equal to
the [Link] property. The SetBorderWidth
method sets subsequent values of the BorderWidth property.
WebHtmlOptionClass Methods
The WebHtmlOptionClass inherits all the methods of the WebControlClass
from which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Border SIGNED(0)
CODE
IF ([Link]{PROP:boxed}<>0)
Border = [Link]
END
IF (Border)
[Link](' BORDER=' & Border)
END
[Link](Target, [Link])
IF (Border)
[Link]
END
[Link]
SeeAlso: [Link]
CHAPTER 9 WEBHTMLOPTIONCLASS 293
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
294 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target, [Link], [Link]())
[Link]
CHAPTER 9 WEBHTMLOPTIONCLASS 295
Init (initializeWebHtmlOptionClassobject)
Init( control number, owner window ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, and sets the initial
value of the BorderWidth property equal to the
[Link] property.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
CHAPTER 9 WEBHTMLOPTIONCLASS 297
SeeAlso: BorderWidth
298 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlPromptClass Methods
The WebHtmlPromptClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a prompt.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a
prompt.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
300 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlRadioClass Methods
The WebHtmlRadioClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a radio button.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a radio
button.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
302 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlRegionClass Methods
The WebHtmlRegionClass inherits all the methods of the WebControlClass
from which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Children WebControlQueue
Filename CSTRING(FILE:MaxFileName)
Id UNSIGNED,AUTO
ImagePos LIKE(Rect)
CODE
Filename = [Link]([Link]{PROP:tempimage})
Id = IC:Feq2Id([Link])
IF (Filename)
[Link](Children, [Link])
IF RECORDS(Children)
[Link]('<<MAP NAME="MAP' & Id & '">')
[Link](Children, Target)
[Link]('<</MAP>')
END
[Link]('<<IMG SRC="' & Filename & '"')
IF (RECORDS(Children))
[Link](' USEMAP="#MAP' & Id & '"')
END
GetPosition([Link],,,[Link],[Link])
[Link](' WIDTH=' & [Link]([Link]))
[Link](' HEIGHT=' & [Link]([Link]))
[Link]('>')
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLREGIONCLASS 303
SetParentDefaults (confirmparent)
SetParentDefaults( potential parent, coordinates ), VIRTUAL
Implementation: The coordinates parameter names a GROUP with the same structure as the
Rect GROUP declared in [Link] as follows:
Rect GROUP,TYPE
x SIGNED
y SIGNED
width SIGNED
height SIGNED
END
Example:
[Link] PROCEDURE|
(*WebControlQueue Source, *WebControlClass Other, *Rect ParentPos)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
[Link](Other, ParentPos)
END
SeeAlso: [Link]
304 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The Init method sets the initial value of the BorderWidth property equal to
the [Link] property. The SetBorderWidth
method sets subsequent values of the BorderWidth property.
WebHtmlSheetClass Methods
The WebHtmlSheetClass inherits all the methods of the WebControlClass
from which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
!procedure code
CreateTabControl
Writes the HTML for the SHEET control’s TABs.
tabs The label of the structure containing information about
the SHEET control’s TAB controls.
html object The label of the HtmlClass object that writes the HTML
code.
position An integer constant, variable, EQUATE, or expression
indicating the tabs’ position relative to the SHEET
control. Valid positions are above, left, right, and below.
selected tab An integer constant, variable, EQUATE, or expression
containing the control number (field equate) of the
selected tab.
The CreateTabControl method writes the HTML for the SHEET control’s
TAB controls.
The tabs parameter names a QUEUE with the same structure as the
WebControlQueue declared in [Link] as follows:
WebControlQueue QUEUE,TYPE
Feq SIGNED
ThisControl &WebControlClass
END
Example:
[Link] PROCEDURE(*HtmlClass Target)
Alignment SIGNED(PROP:above)
Children WebControlQueue
CurTabFeq SIGNED,AUTO
TabControls WebControlQueue
CODE
[Link](TabControls, [Link], CREATE:Tab)
CurTabFeq = [Link]{PROP:choicefeq}
[Link]('<<TABLE' & [Link]() & '><<TR>')
[Link]('<<TD>')
[Link](TabControls, Target, Alignment, CurTabFeq)
[Link]('<</TD><</TR><<TR>')
!procedure code
308 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(SIGNED ParentFeq, SIGNED Type=0)
Index SIGNED,AUTO
FirstChild SIGNED(0)
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link] = ParentFeq)
FirstChild = [Link](ParentFeq, Type)
IF (FirstChild)
BREAK
END
END
END
RETURN FirstChild
Example:
[Link] PROCEDURE(*HtmlClass Target)
Alignment SIGNED(PROP:above)
Children WebControlQueue
CurTabFeq SIGNED,AUTO
TabControls WebControlQueue
CODE
[Link](TabControls, [Link], CREATE:Tab)
CurTabFeq = [Link]{PROP:choicefeq}
[Link]('<<TABLE' & [Link]() & '><<TR>')
[Link]('<<TD>')
[Link](TabControls, Target, Alignment, CurTabFeq)
[Link]('<</TD><</TR><<TR>')
!procedure code
310 C L A R I O N IBC LIBRARY REFERENCE
Init (initializeWebHtmlSheetClassobject)
Init( control number, owner window object ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, and sets the initial
value of the BorderWidth property equal to the
[Link] property.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
312 C L A R I O N IBC LIBRARY REFERENCE
SeeAlso: BorderWidth
CHAPTER 9 WEBHTMLSHEETCLASS 313
Example:
[Link] PROCEDURE
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
[Link]
END
IsEnabled(control enabledflag)
IsEnabled BYTE
The IsEnabled property indicates whether the control is enabled or disabled.
A value of one (1) indicates the control is enabled; a zero (0) indicates the
control is disabled. The WebHtmlTabClass uses this property to enable or
disable the Web page control corresponding to the Server TAB control.
Implementation: The CreateHtml method sets the value of the IsEnabled property as needed.
SeeAlso: CreateHtml
CHAPTER 9 WEBHTMLTABCLASS 315
WebHtmlTabClass Methods
The WebHtmlTabClass inherits all the methods of the WebControlClass from
which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
316 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Implementation: The CreateJslData method enables or disables the Web page control that
corresponds to the TAB control.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLTABCLASS 317
CreateParams Writes all the applet parameters for the TAB control.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateParams method writes all the applet parameters for the TAB
control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CharToDlgX EQUATE(4)
TabExtraWidth EQUATE(8)
CurText ANY
Filename ANY
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
CurText = [Link]()
Width = LEN(CurText) * CharToDlgX + TabExtraWidth
Height = 14
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
318 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CharToDlgX EQUATE(4)
TabExtraWidth EQUATE(8)
CurText ANY
Filename ANY
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
CurText = [Link]()
Width = LEN(CurText) * CharToDlgX + TabExtraWidth
Height = 14
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
CHAPTER 9 WEBHTMLTABCLASS 319
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
320 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(SIGNED ParentFeq, SIGNED Type=0)
Index SIGNED,AUTO
FirstChild SIGNED(0)
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link] = ParentFeq)
FirstChild = [Link](ParentFeq, Type)
IF (FirstChild)
BREAK
END
END
END
RETURN FirstChild
Example:
[Link] PROCEDURE
Children WebControlQueue
MyRect GROUP(Rect)
END
CODE
[Link](MyRect.x, MyRect.y, [Link], [Link])
[Link](Children, [Link])
[Link](Children, SELF, MyRect)
322 C L A R I O N IBC LIBRARY REFERENCE
Implementation: A TAB control may be omitted from the Web page because it is disabled or
hidden.
Example:
[Link] PROCEDURE |
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
CHAPTER 9 WEBHTMLTABCLASS 323
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
324 C L A R I O N IBC LIBRARY REFERENCE
SetParentDefaults (confirmparent)
SetParentDefaults( potential parent, coordinates ), VIRTUAL
The coordinates parameter names a GROUP with the same structure as the
Rect GROUP declared in [Link] as follows:
Rect GROUP,TYPE
x SIGNED
y SIGNED
width SIGNED
height SIGNED
END
Example:
[Link] PROCEDURE|
(*WebControlQueue Source, *WebControlClass Other, *Rect ParentPos)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
[Link](Other, ParentPos)
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLTEXTCLASS 325
WebHtmlTextClass Methods
The WebHtmlTextClass inherits all the methods of the WebControlClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a text box.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a text
box.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBHTMLTEXTCLASS 327
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
328 C L A R I O N IBC LIBRARY REFERENCE
WebButtonClass Methods
The WebHtmlButtonClass inherits all the methods of the WebControlClass
from which it is derived.
Implementation: The BeforeResetControl method identifes the default button for the window.
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
Example:
[Link] FUNCTION
CODE
IF ([Link]()) !check for hot key
RETURN IC:StripHotkey(CLIP([Link]{PROP:ScreenText}))!return text sans delimiter
END
RETURN CLIP([Link]{PROP:ScreenText}) !return text
SeeAlso: [Link]
330 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE |
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
SeeAlso: [Link]
CHAPTER 9 WEBBUTTONCLASS 331
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
WebHtmlButtonClass Methods
The WebHtmlButtonClass inherits all the methods of the WebButtonClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a button.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a
button.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Init (initializeWebButtonClassobject)
Init( control number, owner window ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, then sets PROP:Std
to STD:Help for global toolbar help buttons.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
SeeAlso: [Link]
334 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
IsEnabled(control enabledflag)
IsEnabled BYTE
The IsEnabled property indicates whether the control is enabled or disabled.
A value of one (1) indicates the control is enabled; a zero (0) indicates the
control is disabled. The WebJavaButtonClass uses this property to enable or
disable the Web page button corresponding to the Server BUTTON control.
Implementation: The CreateHtml method sets the value of the IsEnabled property as needed.
SeeAlso: CreateHtml
336 C L A R I O N IBC LIBRARY REFERENCE
WebJavaButtonClass Methods
The WebJavaButtonClass inherits all the methods of the WebButtonClass
from which it is derived.
CreateHtml Writes the HTML code representing the control and its
attributes.
html object The label of the HtmlClass object that writes the HTML
code.
width An integer constant, variable, EQUATE, or expression
indicating the width of the button. If omitted, the
WebJavaButtonClass object uses the Clarion AT attribute
width.
height An integer constant, variable, EQUATE, or expression
indicating the height of the [Link] omitted, the
WebJavaButtonClass object uses the Clarion AT attribute
height.
The CreateHtml method writes the HTML code representing the control
and its attributes, including any image associated with the button.
Implementation: The CreateHtml method sets the button’s width, height, text, image, tooltip,
alignment, enabled/disabled state, and the browser action to take when the
end user presses the button.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
338 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Implementation: The CreateJslData method enables or disables the Web page button that
corresponds to the BUTTON control.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBJAVABUTTONCLASS 339
Example:
[Link] PROCEDURE(*HtmlClass Target,SIGNED Width,SIGNED Height)
CODE
IF (NOT [Link]) THEN RETURN.
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
Example:
[Link] PROCEDURE(*HtmlClass Target,SIGNED Width,SIGNED Height)
CODE
IF (NOT [Link]) THEN RETURN.
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
340 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] FUNCTION
CODE
IF ([Link] = DISABLE:Hide) OR |
(([Link] = DISABLE:OptHide) AND NOT [Link]())
IF NOT [Link]{PROP:enabled}
RETURN FALSE
END
END
RETURN [Link]{PROP:visible}
Example:
[Link] PROCEDURE(*HtmlClass Target)
Filename CSTRING(FILE:MaxFileName)
CODE
Filename = [Link]()
[Link]([Link], 'ClarionImageButton', Width, Height)
[Link]('Picture', Filename)
[Link]('Label', [Link]())
[Link]('Hint', [Link]{PROP:tooltip})
[Link]('Align', [Link]())
IF ([Link](EVENT:Accepted) = Update:Full)
[Link]('Submit', 1)
END
[Link]
SeeAlso: CreateHtml
342 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
WebJavaToolButtonClass Methods
The WebJavaToolButtonClass inherits all the methods of the
WebJavaButtonClass from which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Filename CSTRING(FILE:MaxFileName)
CODE
Filename = [Link]()
[Link]([Link], 'ClarionImageButton', Width, Height)
[Link]('Picture', Filename)
[Link]('Label', [Link]())
[Link]('Hint', [Link]{PROP:tooltip})
[Link]('Align', [Link]())
IF ([Link](EVENT:Accepted) = Update:Full)
[Link]('Submit', 1)
END
[Link]
SeeAlso: [Link]
CHAPTER 9 WEBHTMLIMAGECLASS 345
WebImageClass
The WebImageClass inherits all the properties and methods of the
WebControlClass from which it is derived. It has no additional methods or
properties, but serves as a foundation to its derived classes:
WebHtmlImageClass and WebJavaImageClass.
346 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The SetDescription method sets the value of the AltText property.
SeeAlso: SetDescription
CHAPTER 9 WEBHTMLIMAGECLASS 347
WebHtmlImageClass Methods
The WebHtmlImageClass inherits all the methods of the WebImageClass
from which it is derived.
CreateCellContents
Generates HTML code to display an image.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML to display an image.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Implementation: The SetDescription method sets the value of the Description property.
SeeAlso: Description
CHAPTER 9 WEBJAVAIMAGECLASS 349
Implementation: The CreateHtml method and the CreateJslData method each set the value of
the Filename property as needed.
WebJavaImageClass Methods
The WebJavaImageClass inherits all the methods of the WebImageClass
from which it is derived.
Implementation: The CreateHtml method implements the image’s width, height, and filename.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
352 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBJAVAIMAGECLASS 353
CreateParams Writes all the applet parameters for the IMAGE control.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateParams method writes all the applet parameters for the IMAGE
control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
X SIGNED,AUTO
Y SIGNED,AUTO
Width SIGNED,AUTO
Height SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
[Link] = [Link]([Link]{PROP:tempimage})
IC:GetPositionPixels([Link], X,Y,Width,Height)
[Link]([Link], [Link](), Width, Height)
[Link](Target)
[Link]
354 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
X SIGNED,AUTO
Y SIGNED,AUTO
Width SIGNED,AUTO
Height SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
[Link] = [Link]([Link]{PROP:tempimage})
IC:GetPositionPixels([Link], X,Y,Width,Height)
[Link]([Link], [Link](), Width, Height)
[Link](Target)
[Link]
CHAPTER 9 WEBHTMLLISTCLASS 355
WebListClass Methods
The WebListClass inherits all the properties and methods of the
WebControlClass from which it is derived.
GetBackgroundColor
Returns the background color of the Web page list.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method returns the background color of the Web
page list.
Example:
[Link] PROCEDURE(*HtmlClass Target, BYTE AutoSpotLink)
ForeColor LONG,AUTO
BackColor LONG,AUTO
CODE
GETFONT([Link],,, ForeColor)
BackColor = [Link]()
IF (ForeColor <> 0) AND (ForeColor <> COLOR:None)
[Link]('ForeColor', IC:RGB(ForeColor))
END
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
SeeAlso: CreateColorParameters
356 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlListClass Methods
The WebHtmlListClass inherits all the methods of the WebListClass from
which it is derived.
CreateCellContents
Generates HTML code to represent a list box.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a list
box.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Implementation: The CreateJslData method applies a new selection in the list box.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
358 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The CreateJslData method applies a new selection in the list box.
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
CHAPTER 9 WEBJAVALISTCLASS 359
AutoSpotLink(hypertext links)
AutoSpotLink BYTE, PROTECTED
The AutoSpotLink property indicates whether list text that appears to be a
URL, email address, FTP site, etc., are implemented on the Web page as
“live” hypertext links or plain text. A value of one (1) generates live links; a
value of zero (0) generates plain text.
Implementation: The SetAutoSpotLink method sets the value of the AutoSpotLink property.
SeeAlso: SetAutoSpotLink
Implementation: The Init method creates (allocates memory for) the EventActionQ. The
SetEventAction method sets the values of the EventActionQ property. The
GetEventAction method returns the action for a specified event. The Kill
method disposes of (frees memory for) the EventActionQ.
Implementation: The Init method sets the initial value of the Format property.
SeeAlso: Init
FromQ(LISTdata source)
FromQ &QUEUE
The FromQ property is a reference to the LIST’s FROM attribute. The
WebJavaListClass object uses this property to refer to the LIST’s data source
QUEUE.
Implementation: The SetQueue method sets the value of the FromQ property. The
WebJavaListClass object uses the FromQ property to detect any changes to
the source QUEUE, and to avoid generating new JSL data when there are no
changes.
SeeAlso: SetQueue
CHAPTER 9 WEBJAVALISTCLASS 361
Implementation: The Init method creates (allocates memory for) the QueueActionQ. The
ResetFromQueue method sets the values of the QueueActionQ property. The
Kill method disposes of (frees memory for) the QueueActionQ.
Implementation: The CreateHtml method sets the Started property to False when it generates
code to instantiate the applet; the ResetControl method sets the Started
property to True when the applet first requests data.
WebJavaListClass Methods
The WebJavaListClass inherits all the methods of the WebListClass from
which it is derived.
Implementation: The CreateHtml method writes list attributes including format string, fonts,
colors, text justification, grid lines, scrollbars and more.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
364 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBJAVALISTCLASS 365
CreateParams Writes all the applet parameters for the LIST control.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateParams method writes all the applet parameters for the LIST
control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF (NOT [Link]) THEN RETURN.
IF ([Link] = 0)
GETPOSITION([Link],,,[Link],[Link])
END
[Link]([Link],[Link](),[Link],[Link])
[Link](Target)
[Link]
[Link] = FALSE
[Link]
366 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF (NOT [Link]) THEN RETURN.
IF ([Link] = 0)
GETPOSITION([Link],,,[Link],[Link])
END
[Link]([Link],[Link](),[Link],[Link])
[Link](Target)
[Link]
[Link] = FALSE
[Link]
CHAPTER 9 WEBJAVALISTCLASS 367
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<SELECT' & [Link](Target) & ' SIZE=' & Depth)
IF ([Link])
[Link]([Link](EVENT:Accepted), HTML:SelectChanged,
HTML:SelectValue)
END
[Link]('>')
[Link](IC:GetListboxHtml([Link]))
[Link]('<</SELECT>')
[Link]
SeeAlso: [Link]
368 C L A R I O N IBC LIBRARY REFERENCE
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The [Link] method calls the Init method. The Init
method primes the EventActionQ property with appropriate Clarion events
and their corresponding browser actions.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
SeeAlso: EventActionQ
CHAPTER 9 WEBJAVALISTCLASS 369
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
Example:
[Link] PROCEDURE
Index SIGNED,AUTO
CODE
IF (~[Link] &= NULL)
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
ASSERT(~[Link] &= NULL)
[Link]
END
DISPOSE([Link])
END
370 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
CHAPTER 9 WEBJAVALISTCLASS 371
Implementation: Typically, this method is called during the scroll handling for the LIST. For
example, from the BRWX::ScrollOne ROUTINE for a template generated
BrowseBox.
Example:
IC:CurControl &= [Link](?Browse:1)
IC:[Link](TRUE)
SeeAlso: AutoSpotLink
Implementation: The SetDirty method is available for your use. The IBC Library does not call
it. The CreateJslData method generates JSL data to refresh the Web page list
box if SetDirty was called.
Example:
IC:CurControl &= [Link](?Browse:1)
IC:[Link]
SeeAlso: CreateJslData
CHAPTER 9 WEBJAVALISTCLASS 373
Implementation: EQUATEs for the event parameter are declared in [Link]. Each
event EQUATE is prefixed with EVENT:. Valid events are
EVENT:Accepted
EVENT:Initialize
EVENT:NewSelection
EVENT:AlertKey
EVENT:Locate
EVENT:ScrollTop
EVENT:ScrollBottom
EVENT:PageUp
EVENT:PageDown
EVENT:ScrollUp
EVENT:ScrollDown
EVENT:ScrollDrag
EVENT:Expanding
EVENT:Contracting
EVENT:Expanded
EVENT:Contracted
Example:
[Link] PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
CODE
[Link](Feq, OwnerWindow)
[Link] &= NEW EventActionQueue
[Link] &= NEW QueueActionQueue
[Link] = TRUE
IF ([Link]{PROP:imm})
[Link](EVENT:ScrollDown, Update:Partial)
[Link](EVENT:ScrollUp, Update:Partial)
[Link](EVENT:ScrollTop, Update:Partial)
[Link](EVENT:ScrollBottom, Update:Partial)
[Link](EVENT:ScrollDrag, Update:Partial)
[Link](EVENT:PageUp, Update:Partial)
[Link](EVENT:PageDown, Update:Partial)
[Link](EVENT:Locate, Update:Partial)
END
[Link](EVENT:NewSelection, Update:Partial)
[Link](EVENT:Initialize, Update:Partial)
[Link](EVENT:AlertKey, Update:Partial)
SeeAlso: GetEventAction
CHAPTER 9 WEBJAVALISTCLASS 375
Implementation: The SetQueue method sets the value of the FromQ property. The FromQ
property is a reference to the data source for the LIST control.
SeeAlso: FromQ
376 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The UpdateState method stores the HSCROLL, VSCROLL, and FORMAT
attributes of the LIST.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
Feq SIGNED,AUTO
Properties ANY
CODE
IF (Feq{PROP:hscroll})
IF (Feq{PROP:vscroll})
Properties = Properties & ',HVSCROLL'
ELSE
Properties = Properties & ',HSCROLL'
END
ELSE
IF (Feq{PROP:vscroll})
Properties = Properties & ',VSCROLL'
END
END
[Link]([Link], 'ClarionListBox', [Link], [Link])
[Link](Target, [Link])
[Link]('formatString', [Link]{PROP:format})
[Link]('Events', [Link]([Link],
Update:OnBrowser))
[Link]('Properties', SUB(Properties, 2, -1))
IF ([Link](CurFont))
[Link](CurFont)
END
IF ([Link])
[Link]('AutoSpotLink', [Link])
END
[Link]
[Link] = FALSE
[Link]
CHAPTER 9 WEBHTMLSTRINGCLASS 377
WebStringClass Methods
The WebStringClass inherits all the methods of the WebControlClass from
which it is derived.
SetBreakable (allowwordwrap)
SetBreakable( value ), VIRTUAL
Example:
IC:CurControl &= [Link](?MyString)
IC:[Link](TRUE)
378 C L A R I O N IBC LIBRARY REFERENCE
WebHtmlStringClass Methods
The WebHtmlStringClass inherits all the methods of the WebStringClass
from which it is derived.
CreateCellContents
Generates HTML code to represent a text string.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a text
string.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
380 C L A R I O N IBC LIBRARY REFERENCE
AutoSpotLink(hypertext links)
AutoSpotLink BYTE, PROTECTED
The AutoSpotLink property indicates whether string text that appears to be
a URL, email address, FTP site, etc., is implemented on the Web page as a
“live” hypertext links or plain text. A value of one (1) generates a live link; a
value of zero (0) generates plain text.
Implementation: The SetAutoSpotLink method sets the value of the AutoSpotLink property.
SeeAlso: SetAutoSpotLink
WebJavaStringClass Methods
The WebJavaStringClass inherits all the methods of the WebStringClass from
which it is derived.
Example:
SeeAlso: [Link]
382 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBJAVASTRINGCLASS 383
CreateParams Writes all the applet parameters for the STRING control.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateParams method writes all the applet parameters for the STRING
control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
GetPosition([Link],,,Width,Height)
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
384 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
IF (NOT [Link]) THEN RETURN.
GetPosition([Link],,,Width,Height)
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
CHAPTER 9 WEBCLOSEBUTTONCLASS 385
Init (initializeWebJavaStringClassobject)
Init( control number, owner window ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, and sets the initial
value of the LastText property equal to ‘MagicValue<12>’ so LastText
doesn’t coincidentally match previously blank text.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Example:
IC:CurControl &= [Link](?MyString)
IC:[Link](TRUE)
SeeAlso: AutoSpotLink
CHAPTER 9 WEBCLOSEBUTTONCLASS 387
Height (buttonheight)
Height SIGNED
The Height property indicates height of the WINDOW control.
SeeAlso: Init
Width(buttonwidth)
Width SIGNED
The Width property indicates width of the WINDOW control.
SeeAlso: Init
X (buttonhorizontal position)
X SIGNED
The X property indicates horizontal position of the WINDOW control.
SeeAlso: Init
Y (buttonvertical position)
Y SIGNED
The Y property indicates vertical position of the WINDOW control.
SeeAlso: Init
388 C L A R I O N IBC LIBRARY REFERENCE
WebCloseButtonClass Methods
The WebCloseButtonClass inherits all the methods of the WebControlClass
from which it is derived.
CreateHtml Writes the HTML code representing the control and its
attributes.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateHtml method writes the HTML code representing the control
and its attributes, including any image associated with the button.
Implementation: The CreateHtml method sets the button’s width, height, text, image, tooltip,
and the browser action to take (close) when the end user presses the button.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
390 C L A R I O N IBC LIBRARY REFERENCE
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link]) !write data for all controls
GET([Link], Index) !get next control
IF ([Link]()) !if control is “visible”
[Link](Target) !write its Jsl data
END
END
SeeAlso: [Link]
CHAPTER 9 WEBCLOSEBUTTONCLASS 391
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF [Link]
[Link]([Link], [Link](), [Link], [Link])
[Link](Target)
[Link]
ELSE
[Link]('<<INPUT TYPE=SUBMIT VALUE="Close"')
[Link]([Link](Target))
[Link]('>')
END
392 C L A R I O N IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF [Link]
[Link]([Link], [Link](), [Link], [Link])
[Link](Target)
[Link]
ELSE
[Link]('<<INPUT TYPE=SUBMIT VALUE="Close"')
[Link]([Link](Target))
[Link]('>')
END
CHAPTER 9 WEBCLOSEBUTTONCLASS 393
GetCloneFeq(return buttontomimic)
GetCloneFeq, SIGNED, VIRTUAL
The GetCloneFeq method returns the control number of a similar control so
the WebCloseButtonClass object can mimic its size.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
CloneFeq SIGNED
CODE
[Link] = Feq
[Link] = FEQ:Toolbar
SELF.x = 9999
SELF.y = 2
[Link] = 16
[Link] = 14
[Link] &= OwnerWindow
! Resize the close button to match the control returned from this function
CloneFeq = [Link]()
IF (CloneFeq{PROP:type} <> 0)
GetPosition(CloneFeq,,SELF.y,[Link],[Link])
END
SeeAlso: Init
394 C L A R I O N IBC LIBRARY REFERENCE
Implementation: The GetPosition method returns the values of the Height, Width, X, and Y,
properties.
Implementation: The close button always appears on the Web page because it has been
explicitly requested.
Example:
[Link] PROCEDURE |
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
Init (initializeWebCloseButtonClassobject)
Init( control number, owner window ), VIRTUAL
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method sets the initial value of the Height, Width, X, and Y,
properties. It attempts to provide an intelligent default size and position for
the button.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Example:
[Link] PROCEDURE
NextSubmit &SubmitItemClass
Curfeq SIGNED,AUTO
Index SIGNED,AUTO
CODE
IF ([Link]())
LOOP Index = 1 TO RECORDS([Link]) !preprocess all controls
GET([Link], Index)
[Link]() !preprocess a control
END
END
LOOP !synchronize all controls
NextSubmit &= [Link]() !set next submit item
IF (NextSubmit &= NULL) THEN BREAK. !stop when finished
CurFeq = [Link]
IF ([Link](CurFeq)) !set corresponding control
IF ([Link]) !confirm event exists
IF (NOT CurFeq{PROP:disable}) AND (NOT CurFeq{PROP:readonly})
[Link](NextSubmit)!synchronize the control
. . . .
SeeAlso: [Link]
398 C L A R I O N IBC LIBRARY REFERENCE
WebHotlinkClass Methods
The WebHotlinkClass inherits all the methods of the WebControlClass from
which it is derived.
CreateCellContents
Generates HTML code to represent a hypertext link.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateCellContents method generates HTML code to represent a
hypertext link.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target) !write HTML TABLE CELL header
[Link](Target) !write HTML representing the control
[Link](Target) !write HTML TABLE CELL footer
Text (Webpagetext)
Text CSTRING(1000)
The Text property contains the text to display on the Web page.
SeeAlso: Init
400 IBC LIBRARY REFERENCE
WebLiteralClass Methods
The WebLiteralClass inherits all the methods of the WebControlClass from
which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurItem &HtmlItemClass,AUTO
!procedure data
CODE
!procedure code
LOOP Xindex = 1 TO RECORDS([Link]) !for all controls
GET([Link], Xindex)
CurCell &= [Link]
NumItems = RECORDS([Link])
[Link]('<<TD' & [Link]() & '>') !begin HTML CELL
LOOP Index = 1 TO NumItems !for all CELL items
CurItem &= [Link](Index) !set WebControl object
Style = [Link](Target) !get control attributes
IF (Style)
[Link]('<<P ' & Style & '>') !begin HTML STYLE
END
[Link](Target) !write HTML control
IF (Style)
[Link]('<</P>') !end HTML STYLE
END
END
[Link]('<</TD>') !end HTML CELL
END
SeeAlso: [Link]
CHAPTER 9 WEBNULLCONTROLCLASS 401
Implementation: The GetCellAttributes method always returns a null string because there are
no attributes associated with a WebLiteralClass object.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
402 IBC LIBRARY REFERENCE
WebNullControlClass Methods
The WebNullControlClass inherits all the methods of the WebControlClass
from which it is derived.
SeeAlso: [Link]
CreateJslData (updateWebpagecontrol)
CreateJslData( Jsl manager ), VIRTUAL
SeeAlso: [Link]
CHAPTER 9 WEBNULLCONTROLCLASS 403
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
CHAPTER 9 WEBNULLCONTROLCLASS 405
SeeAlso: [Link]
406 IBC LIBRARY REFERENCE
SeeAlso: [Link]
CHAPTER 10 WEB AREA CLASSES 407
Overview 409
WebAreaClass Concepts ..................................................................................... 409
Relationship to Other Internet Builder Classes ................................................... 409
Internet Connect Template Implementation .........................................................410
Source Files..........................................................................................................410
WebAreaClass Properties 411
Background (area background color) ..................................................................411
BackImage (area wallpaper) ................................................................................411
LocalFont (area font information) ...................................................................... 411
WebAreaClass Methods 412
GetBackgroundColor (return background color) .................................................412
GetCellAttributes (return area attributes) ............................................................413
GetFont (add font information)........................................................................... 414
GetVisible (return control status flag) .................................................................415
Init (initialize the WebAreaClass object) ............................................................ 416
Kill (shut down the WebAreaClass object)........................................................ 417
PushFont (implement area font) ..........................................................................418
SetBackground (set Web page area background) ................................................419
SetFont .................................................................................................................420
SetParentDefaults (confirm parent) .....................................................................421
WebCaptionClass Properties 422
Alignment (text justification)...............................................................................422
WebCaptionClass Methods 423
CreateHtml (write HTML for caption and its attributes) .....................................423
GetCellAttributes (return caption attributes) .......................................................424
GetPosition (get control coordinates) ................................................................. 425
GetText (return caption text) ................................................................................426
GetVisible (return control status flag) .................................................................427
Init (initialize the WebCaptionClass object) ....................................................... 428
WebMenubarClass Methods 429
CreateHtml (write HTML for menubar and its children) ....................................429
GetPosition (get control coordinates) ................................................................. 430
GetVisible (return control status flag) .................................................................431
Init (initialize the WebMenubarClass object) ......................................................432
408 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebAreaClassConcepts
All the classes described in this chapter are derived from the
WebControlClass; therefore, the information and documentation pertaining
to the WebControlClass is directly applicable to these derived classes. Please
see Web Control Class for more information.
WebControlClass
Derived Classes
SourceFiles
[Link] WebAreaClass
WebCaptionClass
WebMenubarClass
WebToolbarClass
WebClientAreaClass
CHAPTER 10 WEBAREACLASS 411
Background(areabackgroundcolor)
Background LONG(COLOR:None)
The Background property indicates the background color of the Web page
area.
Implementation: The SetBackground method sets the value of the Background property.
SeeAlso: SetBackground
BackImage(areawallpaper)
BackImage ANY
The BackImage property indicates the background image (wallpaper) to
apply to the Web page area.
Implementation: The SetBackground method sets the value of the BackImage property.
SeeAlso: SetBackground
Controls within the area inherit the area’s font information, unless
specifically overridden by the control.
WebAreaClass Methods
The WebAreaClass inherits all the methods of the WebControlClass from
which it is derived.
GetBackgroundColor
Returns the background color of the Web page area.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method returns the background color of the Web
page area.
Example:
[Link] PROCEDURE(*HtmlClass Target, BYTE AutoSpotLink)
ForeColor LONG,AUTO
BackColor LONG,AUTO
CODE
GETFONT([Link],,, ForeColor)
BackColor = [Link]()
IF (ForeColor <> 0) AND (ForeColor <> COLOR:None)
[Link]('ForeColor', IC:RGB(ForeColor))
END
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
SeeAlso: CreateColorParameters
CHAPTER 10 WEBAREACLASS 413
GetCellAttributes(return areaattributes)
GetCellAttributes( html object ), STRING, VIRTUAL
Implementation: The GetCellAttributes method returns a text string containing the HTML
definition of the area’s background color, background image (wallpaper) and
font information.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
414 IBC LIBRARY REFERENCE
Implementation: The GetFont method returns the values in the LocalFont property.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
!procedure data
CODE
[Link](Target)
[Link]([Link],[Link](),Width,Height)
[Link](CurFont)
[Link](CurFont)
[Link]
[Link](Target)
SeeAlso: LocalFont
CHAPTER 10 WEBAREACLASS 415
Implementation: An area may be omitted from the Web page for several reasons: it may be
disabled or hidden, or it may be explicitly omitted. For example, a caption or
toolbar may be explicitly excluded from the Web page. See
[Link] and [Link].
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link]())
[Link](Target)
END
END
416 IBC LIBRARY REFERENCE
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method sets the initial value of the Background, BackImage, Feq,
OwnerWindow, and ParentFeq properties.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
Example:
[Link] PROCEDURE
Index SIGNED,AUTO
CODE
IF (~[Link] &= NULL)
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
ASSERT(~[Link] &= NULL)
[Link]
END
DISPOSE([Link])
END
SeeAlso: [Link]
418 IBC LIBRARY REFERENCE
Implementation: If the area has no font information, PushFont implements the WINDOW’s
font information. The PushFont method calls the [Link]
method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Menubar)
[Link](Target)
SeeAlso: [Link]
CHAPTER 10 WEBAREACLASS 419
SetBackground(setWebpageareabackground)
SetBackground( [color] [,image] )
SetBackground Sets the Web page area background color and image.
color An integer constant, variable, EQUATE, or expression
indicating the area color. The area’s child controls inherit
this color unless a specific background color is set for
the control.
image A string constant, variable, EQUATE, or expression
containing a filename. The WebAreaClass object dis-
plays (tiles) the image in the specified file as the back-
ground to the Web page area.
The SetBackground method sets the Web page area background color and
image. Area child controls inherit the background color unless overriden.
Area child controls do not inherit the image.
Implementation: The SetBackground method sets the Background property and the
BackImage property. The GetBackgroundColor method returns the value of
the Background property.
Example:
PrepareProcedure ROUTINE
FilesOpened = True
OPEN(AppFrame)
WindowOpened=True
[Link](WebServer, HtmlManager, AppFrame{PROP:text} & ' (Main)')
[Link] = PROP:above
[Link] = 1
[Link](FEQ:Caption, WebCaption)
[Link](-1, '')
[Link]('', 0, -1)
SetFont
SetFont( [typeface] [,size] [,color] [,style] )
When setting font information you should consider whether the typeface you
specify is likely to reside on the Client machine. The Client browser cannot
display a typeface it doesn’t have, but will usually substitute another
typeface.
Implementation: The SetFont method sets the LocalFont property. The PushFont method
implements the font information on the Web page area. The PopFont method
restores pre-PushFont font information.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebWindowBaseClass OwnerWindow)
CODE
[Link](Feq, OwnerWindow)
[Link] = COLOR:Navy
[Link](,,COLOR:White)
SetParentDefaults (confirmparent)
SetParentDefaults( potential parent, coordinates ), VIRTUAL
Implementation: The SetParentDefaults method does nothing because a Web page area is
never the child of another control. It is always the child of the window.
The coordinates parameter names a GROUP with the same structure as the
Rect GROUP declared in [Link] as follows:
Rect GROUP,TYPE
x SIGNED
y SIGNED
width SIGNED
height SIGNED
END
Example:
[Link] PROCEDURE|
(*WebControlQueue Source, *WebControlClass Other, *Rect ParentPos)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
[Link](Other, ParentPos)
END
SeeAlso: [Link]
422 IBC LIBRARY REFERENCE
WebCaptionClass Methods
The WebCaptionClass inherits all the methods of the WebAreaClass from
which it is derived.
CreateHtml Writes the HTML code representing the titlebar and its
attributes.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateHtml method writes the HTML code representing the titlebar
and its attributes.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link]
[Link]([Link]())
[Link]
[Link](Target)
SeeAlso: [Link]
424 IBC LIBRARY REFERENCE
GetCellAttributes(return captionattributes)
GetCellAttributes( html object ), STRING, VIRTUAL
Implementation: The GetCellAttributes method returns the HTML specifying text alignment,
plus any attributes inherited from the WINDOW.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurCell &LayoutCellClass,AUTO
Index SIGNED,AUTO
NumRows SIGNED,AUTO
Xindex SIGNED,AUTO
Yindex SIGNED,AUTO
CODE
NumRows = RECORDS([Link])
[Link]('<<TABLE' & [Link] & '>')
LOOP Yindex = 1 TO NumRows
GET([Link], Yindex)
[Link]('<<TR>')
LOOP Xindex = 1 TO RECORDS([Link])
GET([Link], Xindex)
CurCell &= [Link]
[Link]('<<TD' & [Link]() & '>')
[Link]('<</TD>')
END
[Link]('<</TR>')
END
[Link]('<</TABLE>')
SeeAlso: [Link]
CHAPTER 10 WEBCAPTIONCLASS 425
Example:
[Link] PROCEDURE(*HtmlItemClass NewItem)
CurCell &LayoutCellClass,AUTO
dx SIGNED,AUTO
dy SIGNED,AUTO
x SIGNED,AUTO
y SIGNED,AUTO
Xpos SIGNED,AUTO
Ypos SIGNED,AUTO
IsNew BYTE,AUTO
CODE
[Link](x, y, dx, dy)
Ypos = [Link](y, dy, IsNew, [Link])
IF (IsNew) THEN [Link](Ypos).
Xpos = [Link](x, dx, IsNew, [Link])
IF (IsNew) THEN [Link](Xpos).
CurCell &= [Link](Xpos, Ypos)
[Link] &= NewItem
ADD([Link])
IF (dx > [Link])
[Link] = dx;
END
IF (dy > [Link])
[Link] = dy;
END
426 IBC LIBRARY REFERENCE
GetText is a VIRTUAL method so that other base class methods can directly
call the GetText virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Implementation: The GetQuotedText method calls the GetText method to retrieve the text.
GetText returns PROP:Text for the WINDOW.
Example:
[Link] FUNCTION
CODE
RETURN IC:QuoteText([Link](), IC:RESET:Text)
Implementation: GetVisible returns one (1) if the WINDOW has titlebar text; zero (0) if it has
no titlebar text.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link]())
[Link](Target)
END
END
428 IBC LIBRARY REFERENCE
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, then sets the initial
value of the Background property.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
WebMenubarClass Methods
The WebMenubarClass inherits all the methods of the WebAreaClass from
which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Menubar)
[Link](Target)
Example:
[Link] PROCEDURE(*HtmlItemClass NewItem)
CurCell &LayoutCellClass,AUTO
dx SIGNED,AUTO
dy SIGNED,AUTO
x SIGNED,AUTO
y SIGNED,AUTO
Xpos SIGNED,AUTO
Ypos SIGNED,AUTO
IsNew BYTE,AUTO
CODE
[Link](x, y, dx, dy)
Ypos = [Link](y, dy, IsNew, [Link])
IF (IsNew) THEN [Link](Ypos).
Xpos = [Link](x, dx, IsNew, [Link])
IF (IsNew) THEN [Link](Xpos).
CurCell &= [Link](Xpos, Ypos)
[Link] &= NewItem
ADD([Link])
IF (dx > [Link])
[Link] = dx;
END
IF (dy > [Link])
[Link] = dy;
END
CHAPTER 10 WEBMENUBARCLASS 431
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link]())
[Link](Target)
END
END
SeeAlso: [Link]
432 IBC LIBRARY REFERENCE
Init is a VIRTUAL method so that other base class methods can directly call
the Init virtual method in a derived class. This lets you easily implement your
own custom version of this method.
Implementation: The Init method calls the [Link] method, then sets the initial
value of the Background property.
Example:
[Link] PROCEDURE(SIGNED Feq, *WebControlClass NewControl)
CODE
ASSERT(~NewControl &= NULL)
[Link](Feq, SELF)
[Link](NewControl)
WebToolbarClass Methods
The WebToolbarClass inherits all the methods of the WebAreaClass from
which it is derived.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Toolbar)
[Link](Target)
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
!procedure data
CODE
[Link](Target)
[Link]([Link],[Link](),Width,Height)
[Link](CurFont)
[Link](CurFont)
[Link]
[Link](Target)
CHAPTER 10 WEBTOOLBARCLASS 435
Example:
[Link] PROCEDURE(*HtmlItemClass NewItem)
CurCell &LayoutCellClass,AUTO
dx SIGNED,AUTO
dy SIGNED,AUTO
x SIGNED,AUTO
y SIGNED,AUTO
Xpos SIGNED,AUTO
Ypos SIGNED,AUTO
IsNew BYTE,AUTO
CODE
[Link](x, y, dx, dy)
Ypos = [Link](y, dy, IsNew, [Link])
IF (IsNew) THEN [Link](Ypos).
Xpos = [Link](x, dx, IsNew, [Link])
IF (IsNew) THEN [Link](Xpos).
CurCell &= [Link](Xpos, Ypos)
[Link] &= NewItem
ADD([Link])
IF (dx > [Link])
[Link] = dx;
END
IF (dy > [Link])
[Link] = dy;
END
436 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Index SIGNED,AUTO
CODE
LOOP Index = 1 TO RECORDS([Link])
GET([Link], Index)
IF ([Link]())
[Link](Target)
END
END
SeeAlso: [Link]
CHAPTER 10 WEBCLIENTAREACLASS 437
WebClientAreaClass Methods
The WebClientAreaClass inherits all the methods of the WebAreaClass from
which it is derived.
CreateHtml Writes the HTML code representing the client area and
its children.
html object The label of the HtmlClass object that writes the HTML
code.
The CreateHtml method writes the HTML code representing the client area
and its children.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link](Target, FEQ:Toolbar)
[Link](Target)
GetBackgroundColor
Returns the background color of the Web page client
area.
default color An integer variable, constant, EQUATE, or expression
containing the color to return if there is no background
color. If omitted, default color defaults to Color:None.
The GetBackgroundColor method returns the background color of the Web
page client area.
Example:
[Link] PROCEDURE(*HtmlClass Target, BYTE AutoSpotLink)
ForeColor LONG,AUTO
BackColor LONG,AUTO
CODE
GETFONT([Link],,, ForeColor)
BackColor = [Link]()
IF (ForeColor <> 0) AND (ForeColor <> COLOR:None)
[Link]('ForeColor', IC:RGB(ForeColor))
END
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
SeeAlso: CreateColorParameters
CHAPTER 10 WEBCLIENTAREACLASS 439
Example:
[Link] PROCEDURE(*HtmlItemClass NewItem)
CurCell &LayoutCellClass,AUTO
dx SIGNED,AUTO
dy SIGNED,AUTO
x SIGNED,AUTO
y SIGNED,AUTO
Xpos SIGNED,AUTO
Ypos SIGNED,AUTO
IsNew BYTE,AUTO
CODE
[Link](x, y, dx, dy)
Ypos = [Link](y, dy, IsNew, [Link])
IF (IsNew) THEN [Link](Ypos).
Xpos = [Link](x, dx, IsNew, [Link])
IF (IsNew) THEN [Link](Xpos).
CurCell &= [Link](Xpos, Ypos)
[Link] &= NewItem
ADD([Link])
IF (dx > [Link])
[Link] = dx;
END
IF (dy > [Link])
[Link] = dy;
END
440 IBC LIBRARY REFERENCE
CHAPTER 11 WEB REPORT CLASS 441
Overview 443
WebReportClass Concepts.................................................................................. 443
Relationship to Other Internet Builder Classes ................................................... 443
Internet Connect Template Implementation .........................................................443
Source Files..........................................................................................................444
WebReportClass Properties 445
Html (HtmlClass object) ..................................................................................... 445
Q (report image files to preview) ........................................................................ 445
NumPages (report page count)............................................................................ 446
Server (WebServerClass object) ..........................................................................446
WebReportClass Methods 447
Init (initialize the WebReportClass object) ..........................................................447
Kill (shut down the WebReportClass object) ..................................................... 447
Preview (send report pages to client browser) .................................................... 448
SetNumPages (set maximum report page count) .................................................448
442 IBC LIBRARY REFERENCE
CHAPTER 11 WEB REPORT CLASS 443
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebReportClassConcepts
The WebReportClass uses the other IBC Library objects to “translate” this
window, including the report preview images, to HTML, and to send the
generated HTML to the Client browser for viewing.
The Internet Connect Templates generate standard report preview code (the
ReportPreview PROCEDURE) into the appna_SF.CLW file. All Clarion
template generated reports use this ReportPreview procedure to preview
reports.
SourceFiles
Html (HtmlClassobject)
Html &HtmlClass
The Html property is a reference to the HtmlClass object that generates the
HTML code that represents the report. The WebReportClass uses this
property to generate HTML code.
Implementation: The Init method sets the value of the Html property—typically to reference a
global instance of the HtmlClass.
SeeAlso: Init
SeeAlso: Init
446 IBC LIBRARY REFERENCE
Implementation: The SetNumPages method sets the value of the NumPages property.
SeeAlso: NumPages
Server (WebServerClassobject)
Server &WebServerClass
The Server property is a reference to the WebServerClass object that
represents the Server application for the WebReportClass object. The
WebReportClass relies on this property to supply information about the
Client browser, to supply appropriate pathnames, to handle events
originating from the Client browser, and to interact with the BrokerClass
object as needed.
Implementation: The Init method sets the value of the Server property—typically to reference
a global instance of the WebServerClass.
SeeAlso: Init
CHAPTER 11 WEB REPORT CLASS 447
Implementation: The Init method sets the initial values of the WebReportClass properties.
Kill is a VIRTUAL method so that other base class methods can directly call
the Kill virtual method in a derived class. This lets you easily implement
your own custom version of this method.
448 IBC LIBRARY REFERENCE
Preview is a VIRTUAL method so that other base class methods can directly
call the Preview virtual method in a derived class. This lets you easily
implement your own custom version of this method.
Implementation: The Preview class uses the Internet Connect window handling technology to
display the report to the end user as a series of print preview windows within
the Client browser.
The Preview method declares a basic report preview WINDOW, then uses
the WebWindowClass to manage an iterative report preview session with the
Client browser. That is, the Preview method sends HTML representing the
initial print preview window, containing the first report page, to the Client
browser. Then it accepts and processes any browser requests for additional
report pages, by refreshing the print preview window and sending HTML to
represent the refreshed window to the Client browser.
With the Preview method, the end user can only manipulate and print the
report as a series of individual pages.
Overview 451
JSLManagerClass Concepts ............................................................................... 451
Relationship to Other Internet Builder Classes ................................................... 452
Internet Connect Template Implementation .........................................................452
Source Files..........................................................................................................452
JSLManagerClass Properties 453
Client (WebClientManagerClass object) ............................................................ 453
Files (WebFilesClass object) .............................................................................. 453
Security (secure or public communication) .........................................................454
Target (TextOutputClass object) ......................................................................... 454
JSLManagerClass Methods 455
Functional Organization—Expected Use ............................................................455
AddQueueEntry (add a Java list row) ..................................................................456
BeginUpdate (write JSL data delimiters).............................................................457
CloseChannel (close output channel and notify Client) ..................................... 458
Init (initialize the JSLManagerClass object) ...................................................... 459
Kill (shut down the JSLManagerClass object) ....................................................459
OpenChannel (open channel for JSL data) ......................................................... 460
RemoveAllQueueEntries (delete all Java list rows).............................................462
RemoveQueueEntries (delete Java list rows).......................................................463
ScrollQueueDown (scroll Java list down)............................................................464
ScrollQueueUp (scroll Java list up) .................................................................... 465
SelectControl (set Java control to update) ...........................................................466
SetAttribute (set Java control attribute—string) ..................................................467
SetAttributeFilename (set Java control attribute—pathname) ............................ 468
SetAttributeLong (set Java control attribute—number).......................................469
SetChecked (set Java check box status) .............................................................. 470
SetIconAttribute (display icon in Java list) ..........................................................471
SetListChoice (highlight HTML list row) .......................................................... 472
SetQueueEntry (replace a Java list row) .................................................................473
SetValue (set Java control contents) .....................................................................474
450 IBC LIBRARY REFERENCE
CHAPTER 12 JSL MANAGER CLASS 451
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
JSLManagerClassConcepts
Some browsers download the entire library the first time the Client runs a
Clarion Web-enabled application. Other browsers download individual
library components as they are needed while running the Web-enabled
application. In either case, the browsers generally cache the library (store it
locally), and do not download it again unless the library is updated.
Many browsers let the end user set caching options which may affect Java
Support Library downloads. For example, some browsers support a no
caching option (not recommended), and many browsers also let you specify
how often to check for newer versions of cached items—from never, to once-
per-session, to every access.
The JSLManagerClass generates protocol and data for the Java Support
Library objects on the Client computer. The JSLManagerClass provides
methods that dynamically update some of the contents of an HTML page
without refreshing the entire page in the browser. In other words, it does very
efficient partial page updates over the internet. The JSLManagerClass
accomplishes partial page updates by sending data (JSL data) only to the
Java applets executing on the Client. The generated HTML page references
the Java applets so they can refresh the browser’s display without redrawing
the entire page.
452 IBC LIBRARY REFERENCE
SourceFiles
[Link] JSLManagerClass
CHAPTER 12 JSL MANAGER CLASS 453
Client (WebClientManagerClassobject)
Client &WebClientManagerInterface, PROTECTED
The Client property is a reference to the WebClientManagerClass object that
represents the Client computer. The JSLManagerClass uses the Client
property to notify the WebClientManagerClass object when JSL data is ready
for transmittal to the Client computer.
Implementation: The Init method sets the value of the Client property.
SeeAlso: Init
Files(WebFilesClassobject)
Files &WebFilesClass, PROTECTED
The Files property is a reference to the WebFilesClass object that manages
directories, pathnames, temporary files, aliases, etcl for the
JSLManagerClass object. The JSLManagerClass uses the Files property to
provide appropriate pathnames for its files.
Implementation: The OpenChannel method sets the value of the Files property.
SeeAlso: OpenChannel
454 IBC LIBRARY REFERENCE
Implementation: The OpenChannel method sets the value of the Security property. EQUATE
values for the Security property are declared in [Link] as follows:
ITEMIZE,PRE(Secure)
Default EQUATE
None EQUATE
Full EQUATE
Last EQUATE(Secure:Full)
END
SeeAlso: OpenChannel
Target (TextOutputClassobject)
Target &TextOutputClass, PROTECTED
The Target property is a reference to the TextOutputClass object that the
JSLManagerClass uses to write the JSL data used to update the Java
controls/applets. See Text Output Class for more information.
Implementation: The Init method instantiates a NEW TextOuputClass object for the Target
property.
SeeAlso: Init
CHAPTER 12 JSL MANAGER CLASS 455
JSLManagerClass Methods
The JSLManagerClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
Occasional Use:
BeginUpdate write JSL data delimiters
AddQueueEntry add a Java list row
RemoveAllQueueEntries delete all Java list rows
RemoveQueueEntries delete Java list rows
ScrollQueueDown scroll Java list down
ScrollQueueUp scroll Java list up
SelectControl set Java control to update
SetAttribute set Java control attribute—string
SetAttributeLong set Java control attribute—number
SetAttributeFilename set Java control attribute—pathname
SetChecked set Java check box status
SetIconAttribute display icon in Java list
SetListChoice highlight Java list row
SetQueueEntry replace a Java list row
SetValue set Java control contents
Virtual Methods
The control parameter identifies the Clarion control that is the data source
for the new Java list row. The position parameter identifies the specific row
to add to the Java list.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
NumActions = RECORDS([Link])
LOOP CurAction = 1 TO NumActions
GET([Link], CurAction)
NumActionItems = [Link]
CASE ([Link])
OF ACTION:Insert
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Replace
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Delete
[Link]([Link], NumActionItems)
OF ACTION:DeleteAll
[Link]
END
END
!procedure code
SeeAlso: SelectControl
CHAPTER 12 JSL MANAGER CLASS 457
Example:
[Link] PROCEDURE(BYTE Which)
CODE
[Link]([Link])
[Link](CHR(Which))
SeeAlso: SelectControl
458 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
!generate whole HTML page
ELSE
[Link]([Link](),[Link])
[Link]([Link])
[Link]
END
[Link]()
Implementation: The Init method sets the Client property to reference the client and
instantiates a NEW TextOutputClass object for the Target property.
Example:
[Link] PROCEDURE |
(*WebDataSinkClass Broker,*BrowserManagerClass Browser)
CODE
[Link] &= NEW JslManagerClass
[Link](SELF)
[Link] &= Broker
[Link] &= Browser
Implementation: The Kill method DISPOSEs the Target property’s TextOutputClass object .
Example:
[Link] PROCEDURE
CODE
IF (NOT [Link] &= NULL)
[Link]
DISPOSE([Link])
END
460 IBC LIBRARY REFERENCE
Implementation: The OpenChannel method sets the value of the Files property based on the
value of the files object parameter. Other JSLManagerClass methods use the
Files property to provide appropriate pathnames whereever they are needed.
The OpenChannel method sets the value of the Security property based on
the value of the security parameter. EQUATEs for the security parameter are
declared in [Link] as follows:
ITEMIZE,PRE(Secure)
Default EQUATE
None EQUATE
Full EQUATE
Last EQUATE(Secure:Full)
END
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
!generate whole HTML page
ELSE
[Link]([Link](),[Link])
[Link]([Link])
[Link]
END
[Link]()
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
NumActions = RECORDS([Link])
LOOP CurAction = 1 TO NumActions
GET([Link], CurAction)
NumActionItems = [Link]
CASE ([Link])
OF ACTION:Insert
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Replace
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Delete
[Link]([Link], NumActionItems)
OF ACTION:DeleteAll
[Link]
END
END
!procedure code
SeeAlso: SelectControl
CHAPTER 12 JSL MANAGER CLASS 463
RemoveQueueEntries
Deletes number rows starting from row position from a
Java list control.
position An integer constant, variable, EQUATE, or expression
containing the number of the first row to delete.
number An integer constant, variable, EQUATE, or expression
containing the number of rows to delete.
The RemoveQueueEntries method deletes number rows starting from row
position in the Java list control set by the SelectControl method.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
NumActions = RECORDS([Link])
LOOP CurAction = 1 TO NumActions
GET([Link], CurAction)
NumActionItems = [Link]
CASE ([Link])
OF ACTION:Insert
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Replace
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,[Link]+(CurRecord-1),[Link])
END
OF ACTION:Delete
[Link]([Link], NumActionItems)
OF ACTION:DeleteAll
[Link]
END
END
!procedure code
SeeAlso: SelectControl
464 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
NumActions = RECORDS([Link])
LOOP CurAction = 1 TO NumActions
GET([Link], CurAction)
NumActionItems = [Link]
CASE ([Link])
OF ACTION:ScrollUp
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,NumRecords-NumActionItems+CurRecord,[Link])
END
OF ACTION:ScrollDown
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,NumActionItems-(CurRecord-1),[Link])
END
!other actions
END
END
!procedure code
SeeAlso: SelectControl
CHAPTER 12 JSL MANAGER CLASS 465
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
NumActions = RECORDS([Link])
LOOP CurAction = 1 TO NumActions
GET([Link], CurAction)
NumActionItems = [Link]
CASE ([Link])
OF ACTION:ScrollUp
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,NumRecords-NumActionItems+CurRecord,[Link])
END
OF ACTION:ScrollDown
LOOP CurRecord = 1 TO NumActionItems
[Link](CurFeq,NumActionItems-(CurRecord-1),[Link])
END
!other actions
END
END
!procedure code
SeeAlso: SelectControl
466 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Filename CSTRING(FILE:MaxFileName),AUTO
CODE
Filename = [Link]{PROP:tempimage}
[Link]([Link])
IF ([Link] <> Filename)
[Link](JSL:Picture, Filename)
[Link] = Filename
END
CHAPTER 12 JSL MANAGER CLASS 467
Implementation: EQUATEs for the attribute parameter are declared in [Link] as follows:
ITEMIZE,PRE(JSL)
ListRecords EQUATE(VAL('R')) !use SetAttributeLong
ListFields EQUATE(VAL('F')) !use SetAttributeLong
ListSelection EQUATE(VAL('S')) !use SetAttributeLong
ListThumb EQUATE(VAL('M')) !use SetAttributeLong
ListHScroll EQUATE(VAL('H')) !use SetAttribute
ListVScroll EQUATE(VAL('V')) !use SetAttribute
ListFormat EQUATE(VAL('A')) !use SetAttribute
ListIcon EQUATE(VAL('I')) !use SetIconAttribute
Picture EQUATE(VAL('P')) !use SetAttributeFilename
Disable EQUATE(VAL('D')) !use SetAttribute
Enable EQUATE(VAL('E')) !use SetAttribute
StringText EQUATE(VAL('T')) !use SetAttribute
END
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CurText ANY
CODE
CurText = [Link]()
IF (CurText <> [Link])
[Link]([Link])
[Link](Jsl:StringText, CurText)
[Link] = CurText
END
SeeAlso: SelectControl
468 IBC LIBRARY REFERENCE
SetAttributeFilename
Sets a Java control attribute to contain a pathname.
attribute An integer constant, variable, EQUATE, or expression
indicating which attribute to set.
filename A string constant, variable, EQUATE, or expression
containing only the filename, with no path prepended.
The SetAttributeFilename method sets a Java control’s attribute to contain
a pathname. The pathname consists of the path concatenated to the filename.
The Files property supplies the appropriate path value.
Implementation: EQUATEs for the attribute parameter are declared in [Link] as follows:
ITEMIZE,PRE(JSL)
ListRecords EQUATE(VAL('R')) !use SetAttributeLong
ListFields EQUATE(VAL('F')) !use SetAttributeLong
ListSelection EQUATE(VAL('S')) !use SetAttributeLong
ListThumb EQUATE(VAL('M')) !use SetAttributeLong
ListHScroll EQUATE(VAL('H')) !use SetAttribute
ListVScroll EQUATE(VAL('V')) !use SetAttribute
ListFormat EQUATE(VAL('A')) !use SetAttribute
ListIcon EQUATE(VAL('I')) !use SetIconAttribute
Picture EQUATE(VAL('P')) !use SetAttributeFilename
Disable EQUATE(VAL('D')) !use SetAttribute
Enable EQUATE(VAL('E')) !use SetAttribute
StringText EQUATE(VAL('T')) !use SetAttribute
END
Example:
[Link] PROCEDURE(*JslManagerClass Target)
Filename CSTRING(FILE:MaxFileName),AUTO
CODE
Filename = [Link]{PROP:tempimage}
[Link]([Link])
IF ([Link] <> Filename)
[Link](JSL:Picture, Filename)
[Link] = Filename
END
Implementation: EQUATEs for the attribute parameter are declared in [Link] as follows:
ITEMIZE,PRE(JSL)
ListRecords EQUATE(VAL('R')) !use SetAttributeLong
ListFields EQUATE(VAL('F')) !use SetAttributeLong
ListSelection EQUATE(VAL('S')) !use SetAttributeLong
ListThumb EQUATE(VAL('M')) !use SetAttributeLong
ListHScroll EQUATE(VAL('H')) !use SetAttribute
ListVScroll EQUATE(VAL('V')) !use SetAttribute
ListFormat EQUATE(VAL('A')) !use SetAttribute
ListIcon EQUATE(VAL('I')) !use SetIconAttribute
Picture EQUATE(VAL('P')) !use SetAttributeFilename
Disable EQUATE(VAL('D')) !use SetAttribute
Enable EQUATE(VAL('E')) !use SetAttribute
StringText EQUATE(VAL('T')) !use SetAttribute
END
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
IF (CurFeq{PROP:imm})
[Link](JSL:ListThumb, CurFeq{PROP:vscrollpos})
END
IF ([Link] <> CurFeq{PROP:hscroll})
[Link](JSL:ListHScroll, CurFeq{PROP:hscroll})
END
IF ([Link] <> CurFeq{PROP:vscroll})
[Link](JSL:ListVScroll, CurFeq{PROP:hscroll})
END
!procedure code
SeeAlso: SelectControl
470 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], [Link]{PROP:checked})
[Link]
END
CHAPTER 12 JSL MANAGER CLASS 471
The SelectControl method sets the list whose icon attribute is set.
Example:
[Link] PROCEDURE(*JslManagerClass Target)
!procedure data
CODE
!procedure code
IF ([Link])
CurIndex = 0
Skipped = 0
LOOP WHILE (Skipped < 2)
NextIconName = [Link](CurFeq{PROP:iconlist, CurIndex})
IF (NextIconName)
[Link](CurIndex, NextIconName)
Skipped = 0
ELSE
Skipped += 1
END
CurIndex += 1
END
[Link] = FALSE
END
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CHOICE([Link]))
[Link]
END
CHAPTER 12 JSL MANAGER CLASS 473
Example:
Example:
[Link] PROCEDURE(*JslManagerClass Target)
CODE
IF ([Link]())
[Link]([Link], CONTENTS([Link]))
[Link]
END
CHAPTER 13 JSL EVENTS CLASS 475
Overview 477
JslEventsClass Concepts ..................................................................................... 477
Relationship to Other Internet Builder Classes ................................................... 478
Internet Connect Template Implementation .........................................................478
Source Files..........................................................................................................478
JslEventsClass Properties 479
EventQ (equivalent Clarion and JSL events) ...................................................... 479
JSLEventsClass Methods 480
Functional Organization—Expected Use ............................................................480
AddEvent (add a Clarion/JSL event pair) ............................................................481
Init (initialize the JSLEventsClass object) ...........................................................482
Kill (shut down JSLEventsClass object)..............................................................483
GetEventNumber (returnClarion event number) .................................................484
GetEventString (return event/action pairs) ......................................................... 485
476 IBC LIBRARY REFERENCE
CHAPTER 13 JSL EVENTS CLASS 477
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequiste to the following material.
JslEventsClassConcepts
The JslEventsClass manages the mapping between Clarion events and Java
Support Library events (JSL events). See JSL Manager Class for more
information on the Java Support Library. This event mapping is primarily
used when handling LISTs. That is, since HTML has no equivalent to a
Clarion LIST and its associated events, Internet Connect relies on a Java list
applet to represent lists and their associated events on a Web page. The
JslEventsClass supports the following standard Clarion events:
EVENT:Accepted
EVENT:Initialize
EVENT:NewSelection
EVENT:AlertKey
EVENT:Locate
EVENT:ScrollTop
EVENT:ScrollBottom
EVENT:PageUp
EVENT:PageDown
EVENT:ScrollUp
EVENT:ScrollDown
EVENT:ScrollDrag
EVENT:Expanding
EVENT:Contracting
EVENT:Expanded
EVENT:Contracted
SourceFiles
[Link] JSLEventsClass
CHAPTER 13 JSL EVENTS CLASS 479
Implementation: The Init method loads the EventQ property by making several calls to the
AddEvent method.
JSLEventsClass Methods
The JSLEventsClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
Occasional Use:
AddEvent add an Clarion/JSL events pair
GetEventNumber returnClarion event number
GetEventString return Clarion-event/Web-action pairs
Virtual Methods
Implementation: The AddEvent method adds items to the EventQ property. It sorts the EventQ
by JSL events.
Example:
[Link] PROCEDURE
CODE
[Link] &= NEW EventInfoQueue
[Link](EVENT:ScrollBottom, 'B')
[Link](EVENT:PageDown, 'C')
[Link](EVENT:ScrollDown, 'D')
[Link](EVENT:Expanding, 'E')
[Link](EVENT:Initialize, 'I')
[Link](EVENT:AlertKey, 'K')
[Link](EVENT:Locate, 'L')
[Link](EVENT:Contracting, 'O')
[Link](EVENT:ScrollDrag, 'M')
[Link](EVENT:NewSelection, 'N')
[Link](EVENT:PageUp, 'R')
[Link](EVENT:ScrollTop, 'T')
[Link](EVENT:ScrollUp, 'U')
[Link](EVENT:Accepted, 'X')
[Link](EVENT:Expanded, 'Y')
[Link](EVENT:Contracted, 'Z')
SeeAlso: EventQ
482 IBC LIBRARY REFERENCE
Implementation: The Init method allocates a new EventQ property and loads it with the
default event pairs with multiple calls to the AddEvent method.
Example:
Broker BrokerClass
HtmlManager HtmlClass
JavaEvents JslEventsClass !declare JavaEvents object
WebServer WebServerClass
WebFilesManager WebFilesClass
ICServerWin WINDOW,AT(-100,-100,0,0)
END
CODE
SetWebActiveFrame
[Link](1, '')
[Link] !initialize JavaEvents object
[Link]('TREE', WebFilesManager)
[Link](WebFilesManager)
[Link](Broker, '', 600, '', WebFilesManager)
IF ([Link]())
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link]
WebMain
BREAK
END
END
END
[Link]
[Link]
[Link]()
[Link] !shut down JavaEvents object
[Link]
Example:
Broker BrokerClass
HtmlManager HtmlClass
JavaEvents JslEventsClass !declare JavaEvents object
WebServer WebServerClass
WebFilesManager WebFilesClass
ICServerWin WINDOW,AT(-100,-100,0,0)
END
CODE
SetWebActiveFrame
[Link](1, '')
[Link] !initialize JavaEvents object
[Link]('TREE', WebFilesManager)
[Link](WebFilesManager)
[Link](Broker, '', 600, '', WebFilesManager)
IF ([Link]())
OPEN(ICServerWin)
ACCEPT
IF (EVENT() = EVENT:OpenWindow)
[Link]
WebMain
BREAK
END
END
END
[Link]
[Link]
[Link]()
[Link] !shut down JavaEvents object
[Link]
484 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(Arguments)
!procedure data
EventNo SIGNED
CODE
!procedure code to set EventPos and EndPos
EventNo = EVENT:Accepted
IF (EventPos < EndPos)
EventNo = [Link](Arguments[EventPos])
END
[Link] = EventNo
ControlId = SUB(Arguments, StartPos, EventPos-StartPos)
[Link] = Arguments[(1):(AssignPos-1)]
[Link] = SUB(Arguments, EventPos+1, AssignPos - (EventPos+1))
[Link] = SUB(Arguments, AssignPos+1, EndPos - (AssignPos+1))
!procedure code
GetEventString(return event/actionpairs)
GetEventString( event action queue, default action ), STRING
Implementation: The WebJavaListClass uses the return string as the Events parameter to the
Java list applet when it generates HTML to represent a Clarion LIST.
The return string is of the form ‘E9|E9’ where E is a JSL event code from the
EventQ property and 9 is the corresponding action code. Standard Web page
actions and their codes are represented by EQUATEs declared in
[Link] as follows:
Update:OnBrowser EQUATE(0)
Update:Partial EQUATE(1)
Update:Full EQUATE(2)
Update:Refresh EQUATE(3)
If a JSL event has no corresponding action in the event action queue, then the
JSL event is paired with the default action, typically Update:OnBrowser.
The event action queue parameter must be a QUEUE of the type declared in
[Link] as follows:
EventActionQueue QUEUE,TYPE
EventNo SIGNED
Action BYTE
END
Example:
[Link] PROCEDURE(*HtmlClass Target)
Properties ANY
CurFont HtmlFontClass
Feq SIGNED,AUTO
CODE
Feq = [Link]
IF (Feq{PROP:column}<>0) THEN Properties = Properties & ',COLUMN'.
IF (Feq{PROP:imm}) THEN Properties = Properties & ',IMM'.
IF (Feq{PROP:vcr}) THEN Properties = Properties & ',VCR'.
[Link](CurFont)
[Link](Target, [Link])
[Link]('formatString', [Link]{PROP:format})
[Link]('Events', |
[Link]([Link], Update:OnBrowser))
[Link]('Properties', SUB(Properties, 2, -1))
IF (([Link] &= NULL) OR ([Link](CurFont)))
[Link](CurFont)
END
SeeAlso: [Link]
CHAPTER 14 WEB FILES CLASS 487
Overview 489
WebFilesClass Concepts ......................................................................................489
Relationship to Other Internet Builder Classes ................................................... 489
Internet Connect Template Implementation .........................................................489
Source Files..........................................................................................................490
WebFilesClass Methods 491
Functional Organization—Expected Use ............................................................491
GetAlias (return HTML alias for file) .................................................................492
GetDirectory (return temporary folder name) .....................................................493
GetFilename (return temporary file pathname) .................................................. 494
GetProgramRef (return HTML program reference) ........................................... 495
GetPublicDirectory (return public folder name) ................................................. 496
GetRelativeFilename (return filename for Broker) .............................................498
GetSeparateSecure (return web server security support).................................... 499
GetTempFilename (return filename for Server) ................................................. 500
Init (initialize the WebFilesClass object) .............................................................501
Kill (shut down the WebFilesClass object)..........................................................502
LoadImage (return linked image filename) ........................................................ 503
RemoveAll (remove temporary files and folders) .............................................. 504
SelectTarget (set public or secure channel) .........................................................505
488 IBC LIBRARY REFERENCE
CHAPTER 14 WEB FILES CLASS 489
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
WebFilesClassConcepts
There are many different types of files that may be referenced during a
session, and the location (pathname) of the files depends on a number of
factors, including the file type/content (.CAB, .ZIP, .CLASS, .HTM, .JSL,
.ICO, .GIF, .JPG, and other image files, etc.), the Appliction Broker type
(.EXE or .DLL), the secure/public status of the transmission, and any aliases
set by the web-server software (such as Microsoft’s Internet Information
Server). See Application Design Considerations—Directory Structures in the
Internet Connect User’s Guide for more information.
The WebFilesClass object manages all the pathname information for the
temporary and permanent files, directories, and aliases, including switching
between public and secure channels as requested by the WebWindowClass.
SourceFiles
[Link] WebFilesClass
CHAPTER 14 WEB FILES CLASS 491
WebFilesClass Methods
The WebFilesClass contains the methods listed below.
Functional Organization—ExpectedUse
Mainstream Use:
GetAlias return HTML alias for file
Occasional Use:
GetDirectory return temporary folder name
GetPublicDirectory return temporary folder name
GetFilename return temporary file pathname
GetProgramRef return HTML program reference
GetRelativeFilename return filename for Broker
GetTempFilename return filename for Server
LoadImage return linked image filename
SelectTarget set public or secure channel
RemoveAll remove temporary files and folders
GetSeparateSecure return web server security support
Virtual Methods
The filename may be a full pathname or a filename with no path. If the path
is omitted, GetAlias searches for the filename in the directories available to
the Server.
GetAlias is required because the Server is running locally and refers to files
by their Windows pathnames (e.g., c:\cwicserv\sv\[Link]), while the
Client is running remotely and must refer to the same files by their alias
names (e.g., sv/[Link]). Typically, aliases are established and
maintained by the internet server software such as Microsoft Personal Web
Server or Internet Information Server.
Example:
[Link] PROCEDURE(STRING param, STRING Filename)
AliasName CSTRING(FILE:MaxFilename)
CODE
IF (Filename)
AliasName = [Link](Filename)
[Link]('<<param name=' & param & ' value="' & |
IC:QuoteText(AliasName,IC:RESET:Value) & '">')
END
CHAPTER 14 WEB FILES CLASS 493
The RemoveAll method deletes the temporary directory and its files.
Example:
[Link] PROCEDURE
CurIndex SIGNED,AUTO
CODE
IF ([Link])
RemoveDirectory([Link](Secure:None))
IF ([Link]())
RemoveDirectory([Link](Secure:Full))
END
END
SeeAlso: RemoveAll
494 IBC LIBRARY REFERENCE
The content parameter determines the filename and extension. The security
parameter determines the file’s path.
Implementation: The GetFilename method calls the GetDirectory method to get the path.
Example:
[Link] PROCEDURE
CODE
IF ([Link])
RemoveDirectory([Link](Dir:Public))
IF ([Link]())
RemoveDirectory([Link](Dir:Secure))
. .
SeeAlso: GetDirectory
CHAPTER 14 WEB FILES CLASS 495
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
CODE
[Link](Target)
[Link](Target, FEQ:ClientArea)
[Link](Target)
IF ([Link])
[Link]('<<CENTER>')
[Link]('<<A HREF="' & [Link]() &|
'">' & SplashContinueText & '<</A>')
[Link]('<</CENTER>')
POST(EVENT:CloseWindow)
END
496 IBC LIBRARY REFERENCE
GetPublicDirectory
Returns the public directory set by the Init method.
security An integer constant, variable, EQUATE, or expression
indicating whether a public or a secure channel is
required. If omitted, security defaults to the current
security status, either Secure:None or Secure:Full.
The GetPublicDirectory method returns the public directory set by the Init
method. If no public directory is specified by Init, the GetPublicDirectory
method returns the public directory created by the Application Broker install
program. See Application Design Considerations—Directory Structures in
the Internet Connect User’s Guide for more information.
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
Filename = [Link]() & '[Link]'
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
END
SeeAlso: Init
498 IBC LIBRARY REFERENCE
GetRelativeFilename
Returns the filename by which the Application Broker
knows the specified filename.
filename A string constant, variable, EQUATE, or expression
containing the (Windows) filename for which to return
the alternative filename. This may be a full pathname or
a filename with no path. If the path is omitted,
GetRelativeFilename searches for the file in the directo-
ries available to the Server.
The GetRelativeFilename method returns the filename by which the
Application Broker references the specified filename. The Broker is unaware
of its parent directories, so those components of the filename are removed.
The BrokerClass calls GetRelativeFilename to provide the correct filename
when communicating with the Application Broker.
The filename may be a full pathname or a filename with no path. If the path
is omitted, GetRelativeFilename searches for the filename in the directories
available to the Server.
Example:
[Link] PROCEDURE(STRING Filename, SIGNED Security, BYTE dontmove)
Command CSTRING(FILE:MaxFilePath)
IsAbsolute BYTE
Flags SIGNED(0)
CODE
Command = [Link](Filename)
IsAbsolute = IC:IsAbsoluteURL(Command)
IF NOT (IsAbsolute OR DontMove)
Command = IC:TranslateFilename(Command)
END
IF IsAbsolute
Flags += RPC:AbsRedirect
ELSIF (dontmove)
Flags += RPC:NoMove
END
IF (Security = Secure:Full)
Flags += RPC:Secure
END
IC:SendPage(Command, Flags)
CHAPTER 14 WEB FILES CLASS 499
Example:
[Link] PROCEDURE
CurIndex SIGNED,AUTO
CODE
IF ([Link])
RemoveDirectory([Link](Secure:None))
IF ([Link]())
RemoveDirectory([Link](Secure:Full))
END
END
500 IBC LIBRARY REFERENCE
The filename may be a full pathname or a filename with no path. If the path
is omitted, GetTempFilename searches for the filename in the directories
available to the Server.
Example:
[Link] PROCEDURE |
(*HttpPageBaseClass HttpPage, SIGNED Status, <STRING Filename>)
CODE
[Link]()
[Link] &= HttpPage
[Link](SELF, status, Filename, [Link](Filename))
[Link]()
CHAPTER 14 WEB FILES CLASS 501
Implementation: The Init method sets the values of various filenames, paths, directories, and
aliases used during this session.
Example:
Orders PROGRAM
!data declarations
WebFilesManager WebFilesClass !declare WebFilesManager object
CODE
[Link](1,'Orders\Temp') !initialize WebFilesManager object
!program code
[Link]
502 IBC LIBRARY REFERENCE
Implementation: The Kill method is one of the few IBC methods you will typically call
directly from your Web-enabled application.
Example:
Orders PROGRAM
!data declarations
WebFilesManager WebFilesClass !declare WebFilesManager object
CODE
[Link](1,'Orders\Temp') !initialize WebFilesManager object
!program code
[Link]
CHAPTER 14 WEB FILES CLASS 503
Example:
[Link] FUNCTION
CODE
RETURN [Link]([Link], PROP:icon)
504 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
CODE
[Link]
IF ([Link])
IF ([Link])
[Link]([Link], Dir:None, FALSE)
ELSE
[Link]([Link](), Dir:None, FALSE)
END
YIELD()
END
[Link]
[Link] = FALSE
CHAPTER 14 WEB FILES CLASS 505
Example:
[Link] PROCEDURE
Client &WebClientManagerClass
Filename CSTRING(FILE:MaxFilePath),AUTO
CODE
Client &= [Link]
[Link]([Link]())
IF ([Link]() OR NOT [Link])
Filename = [Link](Content:Html)
IF ([Link]())
[Link]
[Link]([Link], Filename)
ELSE
[Link]([Link], Filename)
END
[Link](Filename, [Link](), FALSE)
ELSE
[Link]([Link](), [Link])
[Link]([Link])
[Link]
END
[Link]()
506 IBC LIBRARY REFERENCE
CHAPTER 15 LAYOUT HTML CLASS 507
Overview 509
LayoutHtmlClass Concepts ................................................................................ 509
Relationship to Other Internet Builder Classes ................................................... 509
Internet Connect Template Implementation .........................................................510
Source Files..........................................................................................................510
Conceptual Example ............................................................................................510
LayoutHtmlClass Properties 511
SnapX (horizontal grid snap) .............................................................................. 511
SnapY (vertical grid snap) .................................................................................. 511
Style (HTML table style) .....................................................................................511
LayoutHtmlClass Methods 512
Functional Organization—Expected Use ............................................................512
CreateHtml (generate HTML table) ....................................................................513
Init (initialize the LayoutHtmlClass object) ........................................................514
Insert (add control to layout process) ..................................................................515
Kill (shut down the LayoutHtmlClass object) .....................................................516
SetCell (set current control/cell) ......................................................................... 517
508 IBC LIBRARY REFERENCE
CHAPTER 15 LAYOUT HTML CLASS 509
Overview
The LayoutHtmlClass generates an HTML <TABLE> structure to represent
some portion of a Clarion WINDOW, typically a control and its child
controls. Another object, such as a WebWindowClass object, can use the
LayoutHtmlClass to generate an HTML Web page that closely mimics the
appearance and behavior of a Clarion WINDOW.
LayoutHtmlClassConcepts
SourceFiles
[Link] LayoutHtmlClass
Conceptual Example
[Link] PROCEDURE|
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
CHAPTER 15 LAYOUT HTML CLASS 511
Implementation: The Init method sets the value of the SnapX property. The Insert method
aligns the controls by placing them in the same HTML <TABLE
COLUMN>.
Implementation: The Init method sets the value of the SnapY property. The Insert method
aligns the controls by placing them in the same HTML <TABLE ROW>.
Style(HTMLtable style)
Style CSTRING(100)
The Style property specifies the HTML <TABLE STYLE>.
Implementation: The Style property is primarily used to set the border width of the HTML
<TABLE>. The Init method sets the value of the Style property.
SeeAlso: Init
512 IBC LIBRARY REFERENCE
LayoutHtmlClass Methods
The LayoutHtmlClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Occasional Use:
SetCell set current control/cell
Virtual Methods
Example:
[Link] PROCEDURE(*WebControlQueue Source, |
*HtmlClass Target, STRING style, SIGNED SnapX, SIGNED SnapY)
Layout LayoutHtmlClass
CODE
[Link](style, SnapX, SnapY)
[Link](Source, Layout)
[Link](Target)
[Link]
SeeAlso: Insert
514 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*WebControlQueue Source, |
*HtmlClass Target, STRING style, SIGNED SnapX, SIGNED SnapY)
Layout LayoutHtmlClass
CODE
[Link](style, SnapX, SnapY)
[Link](Source, Layout)
[Link](Target)
[Link]
Example:
[Link] PROCEDURE|
(*WebControlQueue Source, *LayoutHtmlClass Layout)
CurIndex SIGNED,AUTO
CODE
LOOP CurIndex = 1 TO RECORDS(Source)
GET(Source, CurIndex)
IF ([Link]())
[Link]([Link])
END
END
SeeAlso: CreateHtml
516 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*WebControlQueue Source, |
*HtmlClass Target, STRING style, SIGNED SnapX, SIGNED SnapY)
Layout LayoutHtmlClass
CODE
[Link](style, SnapX, SnapY)
[Link](Source, Layout)
[Link](Target)
[Link]
CHAPTER 15 LAYOUT HTML CLASS 517
This method has the PROC attribute so you can call it like a procedure and
ignore the return value.
Example:
[Link] PROCEDURE
CurCell &LayoutCellClass,AUTO
CurItem SIGNED,AUTO
Xpos SIGNED,AUTO
Ypos SIGNED,AUTO
CODE
Overview 521
SubmitItemClass Concepts ..................................................................................521
Relationship to Other Internet Builder Classes ................................................... 521
Internet Connect Template Implementation .........................................................521
Source Files..........................................................................................................521
SubmitItem Properties 522
Event (event number) ...........................................................................................522
Extra (other event information) ...........................................................................522
Feq (control number) ...........................................................................................522
Name (new control contents) .............................................................................. 523
NewValue (new control contents) ....................................................................... 523
SubmitItem Methods 524
Reset (set SubmitItem properties)....................................................................... 524
520 IBC LIBRARY REFERENCE
CHAPTER 16 SUBMIT ITEM CLASS 521
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
SubmitItemClassConcepts
SourceFiles
[Link] SubmitItemClass
522 IBC LIBRARY REFERENCE
Implementation: The Reset method sets the value of the Event property. The WebControlClass
uses this property to POST the appropriate event to the control in the Server
(Web-enabled Clarion application).
SeeAlso: Reset
Implementation: The Reset method sets the value of the Extra property. The WebControlClass
uses this property to update the control in the Server (Web-enabled Clarion
application).
SeeAlso: Reset
Feq(control number)
Feq SIGNED
The Feq property contains the control number of the control updated in the
client browser.
Implementation: The Reset method sets the value of the Feq property. The WebControlClass
uses this property to update the control in the Server (Web-enabled Clarion
application).
SeeAlso: Reset
CHAPTER 16 SUBMIT ITEM CLASS 523
Implementation: The Reset method sets the value of the Name property.
SeeAlso: Reset
NewValue(newcontrol contents)
NewValue ANY
The NewValue property contains the value entered into the client browser.
Implementation: The Reset method sets the value of the NewValue property. The
WebControlClass uses this property to update controls in the Server (Web-
enabled Clarion application).
For entry fields, the NewValue property typically contains a string value. For
LISTs and SHEETs, NewValue typically contains a numeric positioning
value.
SeeAlso: Reset
524 IBC LIBRARY REFERENCE
SubmitItem Methods
SubmitItemClass contains only one method.
Implementation: The Reset method converts the browser (HTML) field name to a Clarion
Field Equate number.
Example:
[Link] PROCEDURE
AssignPos SIGNED
EndPos SIGNED
EventNo SIGNED
EventPos SIGNED
StartPos SIGNED
NIL &SubmitItemClass
CODE
StartPos = [Link]
[Link] = EndPos + 1
RETURN [Link]
SeeAlso: [Link]
CHAPTER 17 HTML CLASS 525
HTML CLASS
Overview 527
HtmlClass Concepts ............................................................................................ 527
Relationship to Other Internet Builder Classes ................................................... 527
Internet Connect Template Implementation .........................................................527
Source Files..........................................................................................................528
HtmlClass Properties 529
AppletCount (Java applets on this HTML page) .................................................529
Browser (browser manager object) ......................................................................529
Client (client manager object)............................................................................. 529
Files (file manager object) .................................................................................. 530
FirstControl (first input control) ..........................................................................530
FirstSelectable (first input control select all flag) ................................................530
JavaLibraryCab (Java Support Library cabinet name)........................................ 531
JavaLibraryZip (Java Support Library zip name) ................................................531
Option (web page scale information).................................................................. 532
UseFonts (use Windows fonts on Web page) .......................................................532
HtmlClass Methods 533
Functional Organization—Expected Use ............................................................533
CreateOpen (start new HTML page) .................................................................. 535
GetFontChanged (return font changed flag) ........................................................536
GetFontStyle (return HTML STYLE string) .......................................................537
GetPixelsX (convert horizontal dialog units to pixels) ........................................538
GetPixelsY (convert vertical dialog units to pixels) ............................................539
GetControlReference (return control HREF) ......................................................540
Init (initialize the HtmlClass object) ................................................................... 541
Kill (shut down the HtmlClass object)................................................................ 541
PopFont (restore pre-PushFont font) .................................................................. 542
PushFont (set current font) ................................................................................. 543
TakeNewControl (set first control) ......................................................................544
WriteAppletDimParameter (write Java applet dim parameter) .......................... 545
WriteAppletFilenameParameter (write Java applet filename parameter) ............546
WriteAppletFontParameter (write Java applet font parameter) .......................... 547
WriteAppletFooter (end Java applet) ...................................................................548
WriteAppletHeader (begin Java applet) ...............................................................549
526 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts in the preceding chapter. This short topic
contains information and terms that are prerequisite to the following
material.
HtmlClassConcepts
The HtmlClass class writes HTML and other source code specified by
various IBC Library objects.
SourceFiles
[Link] TextOutputClass
[Link] HtmlClass
CHAPTER 17 HTML CLASS 529
Implementation: The CreateOpen method sets the value of the Browser property.
SeeAlso: CreateOpen
Implementation: The CreateOpen method sets the value of the Client property.
SeeAlso: CreateOpen
530 IBC LIBRARY REFERENCE
Files(filemanager object)
Files &WebFilesClass, PROTECTED
The Files property is a reference to the WebFilesClass object that provides
all the file, directory, alias, and path information for the HtmlClass object.
The HtmlClass object uses this property to supply appropriate filenames and
pathnames within the generated HTML.
Implementation: The Init method sets the value of the Files property.
SeeAlso: Init
The HtmlClass object uses this property to generate HTML code that mimics
Windows behavior with regard to initial control focus on input forms.
Implementation: The TakeNewControl method sets the value of the FirstControl property. The
FirstControl property is only effective for entry fields and text fields under
NetScape browsers.
SeeAlso: TakeNewControl
Implementation: The TakeNewControl method sets the value of the FirstSelectable property.
Entry fields are block selectable; text fields are not block selectable.
Implementation: The CreateOpen method sets the value of the JavaLibraryCab property.
Implementation: The CreateOpen method sets the value of the JavaLibraryZip property.
Implementation: The CreateOpen method sets the value of the Option property. These scaling
factors come from the Internet Options extension template Advanced tab:
HTML Scaling - Pixels Per Character.
Implementation: The Init method sets the UseFonts property to True. The UseFonts property
is only effective if the Client’s Web browser does not support style sheets.
HtmlClass Methods
The HtmlClass inherits all the methods from the TextOutputClass from
which it is derived. See TextOutputClass Methods for more information.
In addition to (or instead of) the inherited methods, the HtmlClass contains
the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which other IBC Library objects call fairly
routinely, can be further divided into the following categories:
Mainstream Use:
Occasional Use:
CreateOpen start new HTML page
GetFontChanged return font changed flag
GetFontStyle return HTML STYLE string
GetPixelsX convert dialog units to pixels
GetPixelsY convert dialog units to pixels
GetControlReference return control HREF
PopFont restore pre-PushFont font
PushFont set current font
TakeNewControl set first control
WriteAppletDimParameter write Java applet dim parameter
WriteAppletFilenameParameterwrite Java applet filename parameter
WriteAppletFontParameter write Java applet font parameter
WriteAppletFooter end Java applet
WriteAppletHeader begin Java applet
WriteAppletOptParameter write Java applet parameter
WriteAppletParameter write Java applet parameter
WriteAppletUAID write Java applet UAID parameter
WriteChildAppletFooter end child Java applet
WriteChildAppletHeader begin child Java applet
WriteContainerAppletHeader begin container applet
534 IBC LIBRARY REFERENCE
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Implementation: The CreateOpen method sets the initial values of the Client, Browser, Option,
AppletCount, JavaLibraryCab, and JavaLibraryZip properties. The
CreateOpen method calls the [Link] method to
initialize a new output file.
Example:
[Link] PROCEDURE(*HtmlClass Target,STRING HtmlFilename)
CODE
[Link](HtmlFilename,[Link],SELF.| !start new HTML page
[Link],[Link])
[Link](Target) !page header
[Link](Target,0,[Link]) !page body
[Link](Target) !page footer
[Link] !finish page
[Link] = TRUE !prepare for next page
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
ParentControl GROUP(WebControlRefGroup).
CODE
[Link](CurFont) !get current control font
IF ([Link](CurFont)) !if different than Web page font
[Link](CurFont) !apply new font to Web control
END
Example:
[Link] PROCEDURE(*HtmlClass Target)
Result CSTRING(255)
CODE
Example:
[Link] PROCEDURE|
(STRING AppletName,STRING ClassName,SIGNED Width,SIGNED Height)
CODE
IF (Width = 0) THEN Width = 1.
IF (Height = 0) THEN Height = 1.
[Link]('<<applet NAME="'&AppletName&'" CODEBASE="/" CODE='&ClassName&'.class')
[Link](' ARCHIVE="' & [Link] & '" MAYSCRIPT')
[Link](' WIDTH=' & [Link](Width)) !convert width to pixels
[Link](' HEIGHT=' & [Link](Height)) !convert height to pixels
[Link]('>')
[Link]('cabbase',[Link])
[Link]('USID',[Link]())
SeeAlso: Option
CHAPTER 17 HTML CLASS 539
Example:
[Link] PROCEDURE|
(STRING AppletName,STRING ClassName,SIGNED Width,SIGNED Height)
CODE
IF (Width = 0) THEN Width = 1.
IF (Height = 0) THEN Height = 1.
[Link]('<<applet NAME="'&AppletName&'" CODEBASE="/" CODE='&ClassName&'.class')
[Link](' ARCHIVE="' & [Link] & '" MAYSCRIPT')
[Link](' WIDTH=' & [Link](Width)) !convert width to pixels
[Link](' HEIGHT=' & [Link](Height)) !convert height to pixels
[Link]('>')
[Link]('cabbase',[Link])
[Link]('USID',[Link]())
SeeAlso: Option
540 IBC LIBRARY REFERENCE
GetControlReference
Returns the HTML HREF value for a control.
control An integer constant, variable, EQUATE, or expression
containing the control number. This is typically the field
equate for the control.
The GetControlReference method returns the HTML HREF value for a
control.
Implementation: The HREF value for a control determines what the Client browser does when
the end user manipulates or accepts the Web control. For example, the
following HREF value causes the Client browser to send the string
‘X30003=Ohio’ to the Server at [Link]
HREF=’[Link]
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>')
[Link]('<<A HREF="' & [Link]([Link]) & '">')
[Link]([Link]() & '<</A>')
[Link]('<</NOBR><<BR>')
SeeAlso: [Link]
CHAPTER 17 HTML CLASS 541
Implementation: The Init method sets the value of the Files property.
Example:
!data
CODE
[Link](1, '')
[Link](WebFilesManager)
!program code
[Link]
[Link]
SeeAlso: Files
Example:
!data
CODE
[Link](1, '')
[Link](WebFilesManager)
!program code
[Link]
[Link]
542 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link])
SeeAlso: PushFont
CHAPTER 17 HTML CLASS 543
PushFont Makes the control’s font the current one for use by other
HtmlClass methods.
font The label of the HtmlFontClass object that contains the
font information for the control.
control An integer constant, variable, EQUATE, or expression
containing the control number of the control whose font
to make current. This is typically the field equate for the
control.
The PushFont method makes the control’s font the current one for use by
other HtmlClass methods. Appropriate use of PushFont and PopFont allow
child controls to correctly inherit or override parent control font information.
Appropriate use simply means pairing a call to PushFont with a subsequent
call to PopFont.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
CODE
[Link](CurFont)
[Link](CurFont, [Link])
SeeAlso: PopFont
544 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link], FALSE) !tell HtmlClass object a Text control
!is being processed
[Link]('<<TEXTAREA WRAP=VIRTUAL')
[Link]([Link](Target))
[Link](' COLS="' & INT(([Link]{PROP:width} + 2)/4) & '"')
[Link](' ROWS="' & INT(([Link]{PROP:height} + 4)/8) & '"')
[Link]('>')
[Link](IC:QuoteText(CLIP(CONTENTS([Link])), IC:RESET:Text))
[Link]('<</TEXTAREA>')
[Link]
WriteAppletDimParameter
Writes the HTML to set an applet “Dim” parameter.
x An integer constant, variable, EQUATE, or expression
containing the applet’s horizontal position in dialog
units.
y An integer constant, variable, EQUATE, or expression
containing the applet’s vertical position in dialog units.
width An integer constant, variable, EQUATE, or expression
containing the applet’s width in dialog units.
height An integer constant, variable, EQUATE, or expression
containing the applet’s height in dialog units.
The WriteAppletDimParameter method writes the HTML to set an applet
“Dim” parameter. The “Dim” parameter determines the position and size
coordinates for the applet.
SeeAlso: WriteAppletParameter
546 IBC LIBRARY REFERENCE
WriteAppletFilenameParameter
Writes the HTML to set an applet parameter equal to a
pathname.
parameter A string constant, variable, EQUATE, or expression
containing the name of the applet parameter to receive
the filename.
filename A string constant, variable, EQUATE, or expression
containing the filename to assign to the applet param-
eter.
The WriteAppletFilenameParameter method writes the HTML to set an
applet parameter equal to a pathname.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Filename CSTRING(FILE:MaxFileName)
CODE
Filename = [Link]()
[Link]('Picture', Filename)
[Link]('Label', [Link]())
[Link]('Hint', [Link]{PROP:tooltip})
[Link]('Align', [Link]())
IF ([Link](EVENT:Accepted) = Update:Full)
[Link]('Submit', 1)
END
SeeAlso: WriteAppletParameter
CHAPTER 17 HTML CLASS 547
WriteAppletFontParameter
Writes the HTML to set an applet font parameter.
font The label of the HtmlFontClass object that contains the
font information to apply.
The WriteAppletFontParameter method writes the HTML to set an applet
font parameter.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
CODE
[Link](CurFont)
[Link] = [Link]()
[Link](Target, [Link])
[Link]('Text', [Link])
[Link]('Align', [Link]())
[Link](CurFont)
IF ([Link])
[Link]('Wrap', '1')
END
IF ([Link])
[Link]('AutoSpotLink', [Link])
END
SeeAlso: WriteAppletParameter
548 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
GetPosition([Link],,,Width,Height)
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
SeeAlso: WriteAppletHeader
CHAPTER 17 HTML CLASS 549
WriteAppletHeader
Writes the HTML writes the HTML code (JavaScript) to
begin a Java applet.
control An integer constant, variable, EQUATE, or expression
containing the control number of the Window control
corresponding to the Java applet. This is typically the
field equate for the control.
class A string constant, variable, EQUATE, or expression
containing the name of the Java Support Library (JSL)
class instantiated by the applet.
width An integer constant, variable, EQUATE, or expression
containing the width of the Window control correspond-
ing to the Java applet.
hieght An integer constant, variable, EQUATE, or expression
containing the height of the Window control correspond-
ing to the Java applet.
The WriteAppletHeader method writes the HTML code (JavaScript) to
begin a Java applet. End the Java applet with the WriteAppletFooter method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
Height SIGNED,AUTO
Width SIGNED,AUTO
CODE
GetPosition([Link],,,Width,Height)
[Link]([Link],[Link](),Width,Height)
[Link](Target)
[Link]
SeeAlso: WriteAppletFooter
550 IBC LIBRARY REFERENCE
WriteAppletOptParameter
Writes the HTML to set an applet parameter.
parameter A string constant, variable, EQUATE, or expression
containing the name of the applet parameter to receive
the value.
value A string constant, variable, EQUATE, or expression
containing the value to assign to the applet parameter.
The WriteAppletOptParameter method writes the HTML (JavaScript) to
set an applet parameter.
Implementation: The WriteAppletOptParameter method only writes the HTML if value is not
null. The WriteAppletOptParameter method calls the WriteAppletParameter
method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CurFont HtmlFontClass
CODE
[Link](CurFont)
[Link] = [Link]()
[Link](Target, [Link])
[Link]('Text', [Link])
[Link]('Align', [Link]())
[Link](CurFont)
IF ([Link])
[Link]('Wrap', '1')
END
IF ([Link])
[Link]('AutoSpotLink', [Link])
END
SeeAlso: WriteAppletParameter
CHAPTER 17 HTML CLASS 551
WriteAppletParameter
Writes the HTML to set an applet parameter.
parameter A string constant, variable, EQUATE, or expression
containing the name of the applet parameter to receive
the value.
value A string constant, variable, EQUATE, or expression
containing the value to assign to the applet parameter.
The WriteAppletParameter method writes the HTML (JavaScript) to set an
applet parameter.
Implementation: Use the WriteAppletParameter method when value is not null. Use the
WriteAppletOptParameter method when value may be null.
Example:
[Link] PROCEDURE(*HtmlClass Target)
ForeColor LONG,AUTO
BackColor LONG,AUTO
CODE
GETFONT([Link],,, ForeColor)
BackColor = [Link]()
IF (ForeColor <> 0) AND (ForeColor <> COLOR:None)
[Link]('ForeColor', IC:RGB(ForeColor))
END
IF (BackColor <> COLOR:None)
[Link]('BackColor', IC:RGB(BackColor))
END
SeeAlso: WriteAppletOptParameter
552 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE |
(SIGNED Feq,STRING AppletName,STRING ClassName,SIGNED Width,SIGNED Height)
CODE
[Link](AppletName,'ClarionLoader',Width,Height)
[Link]('className',ClassName)
[Link](Feq)
SeeAlso: WriteAppletParameter
CHAPTER 17 HTML CLASS 553
Example:
[Link] PROCEDURE(*WebControlQueue TabControls,|
*HtmlClass Target,SIGNED Alignment,SIGNED SelectedTabFeq)
!data declarations
CODE
NumRecords = RECORDS(TabControls)
IF (NumRecords > 0)
[Link](Target)
TabNum = 1
[Link]([Link], 'ClarionTabControl', MaxX, MaxY)
LOOP CurIndex = 1 TO NumRecords
GET(TabControls, CurIndex)
ThisControl &= [Link]
IF ([Link]())
[Link]('tab' & TabNum, [Link])
[Link](Target)
[Link]
TabNum = TabNum + 1
END
END
[Link]
[Link](Target)
END
WriteChildAppletHeader
Writes the HTML code to begin a nested Java applet.
name A string constant, variable, EQUATE, or expression
containing the name of the applet.
control An integer constant, variable, EQUATE, or expression
containing the control number of the Window control
corresponding to the Java applet. This is typically the
field equate for the control.
The WriteChildAppletHeader method writes the HTML code to begin a
nested Java applet within a container applet. A container applet can contain
other Java applets. Container applets and their children require less HTML
code and load quicker than a corresponding set of individual applets.
Example:
[Link] PROCEDURE(*WebControlQueue TabControls,|
*HtmlClass Target,SIGNED Alignment,SIGNED SelectedTabFeq)
!data declarations
CODE
NumRecords = RECORDS(TabControls)
IF (NumRecords > 0)
[Link](Target)
TabNum = 1
[Link]([Link], 'ClarionTabControl', MaxX, MaxY)
LOOP CurIndex = 1 TO NumRecords
GET(TabControls, CurIndex)
ThisControl &= [Link]
IF ([Link]())
[Link]('tab' & TabNum, [Link])
[Link](Target)
[Link]
TabNum = TabNum + 1
END
END
[Link]
[Link](Target)
END
WriteContainerAppletHeader
Writes the HTML code to begin a container applet.
control An integer constant, variable, EQUATE, or expression
containing the control number of the Window control
corresponding to the Java applet. This is typically the
field equate for the control.
class A string constant, variable, EQUATE, or expression
identify the JSL container class.
width An integer constant, variable, EQUATE, or expression
containing the width of the applet in dialog units.
height An integer constant, variable, EQUATE, or expression
containing the height of the applet in dialog units.
The WriteContainerAppletHeader method writes the HTML code to begin
a container applet. A container applet can contain other Java applets.
Container applets and their children require less HTML code and load
quicker than a corresponding set of individual applets.
Example:
[Link] PROCEDURE(*WebControlQueue TabControls,|
*HtmlClass Target,SIGNED Alignment,SIGNED SelectedTabFeq)
!data declarations
CODE
NumRecords = RECORDS(TabControls)
IF (NumRecords > 0)
[Link](Target)
TabNum = 1
[Link]([Link], 'ClarionTabControl', MaxX, MaxY)
LOOP CurIndex = 1 TO NumRecords
GET(TabControls, CurIndex)
ThisControl &= [Link]
IF ([Link]())
[Link]('tab' & TabNum, [Link])
[Link](Target)
[Link]
TabNum = TabNum + 1
END
END
[Link]
[Link](Target)
END
SeeAlso: WriteAppletFooter
556 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link] !write HTML for caption control header
[Link]([Link]()) !write HTML for caption control text
[Link] !write HTML for caption control footer
[Link](Target)
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link](Target)
[Link] !write HTML for caption control header
[Link]([Link]()) !write HTML for caption control text
[Link] !write HTML for caption control footer
[Link](Target)
WriteEventHandler
Writes the HTML code that defines what happens when
the end user changes the contents of a control with the
Web browser.
action An integer constant, variable, EQUATE, or expression
indicating the action to take when the change event
occurs. Typically, the GetEventAction method supplies
this value.
event handler A string constant, variable, EQUATE, or expression
naming the browser JavaScript event handler associated
with the HTML control.
return value A string constant, variable, EQUATE, or expression
indicating the JavaScript parameter value to return to the
Server for the updated control.
The WriteEventHandler method writes the HTML code that defines the
handling for a Web page control when the end user changes the contents of
the control with the Web browser.
Typically, the HTML code calls a JavaScript function that submits a request
to the Server. The request includes the control’s new value, an associated
event code, and optionally, a request to refresh the HTML page.
The “this” qualifier identifies the current control object for Java enabled
browsers.
The WriteEventHandler method wrote just the black code in the following
HTML code examples:
<TD><INPUT TYPE=TEXT VALUE="00003" NAME="X30003" SIZE="10"
onChange="icSubmitForm()" OnFocus="[Link]()"></TD>
This Server generated HTML code defines two different controls with
different event handling behavior. On a change to the X30003 control, the
browser executes the icSubmitForm() function; on a change to the X30005
control, the browser executes the changed() function.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<INPUT TYPE=CHECKBOX VALUE="1"')
IF ([Link]{PROP:checked})
[Link](' CHECKED')
END
[Link]([Link](Target))
[Link]|
([Link](EVENT:Accepted),HTML:CheckChanged,HTML:CheckValue)
[Link]('>')
[Link]([Link]())
Example:
[Link] PROCEDURE(*HtmlClass H)
CODE
[Link]([Link])
[Link]([Link])
[Link]([Link])
SeeAlso: WriteFontHeader
Example:
[Link] PROCEDURE
CODE
IF (NOT [Link] AND [Link])
IF (RECORDS([Link]) > 0)
[Link]([Link])
END
END
SeeAlso: WriteFontFooter
560 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link]*1000,[Link])
[Link] !end the form
[Link]
[Link](Target)
[Link]('<</BODY>')
[Link]('<</HTML>')
SeeAlso: WriteFormHeader
WriteFormHeader
Writes the HTML code to begin an HTML FORM.
attr A string constant, variable, EQUATE, or expression
containing the attribute to the HTML FORM. If omitted,
the method writes no attribute.
The WriteFormHeader method writes the HTML code to begin an HTML
FORM. End the FORM with the WriteFormFooter method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<HTML>')
[Link]('<<HEAD>')
[Link]('<<TITLE>')
[Link](Target)
[Link]('<</TITLE>')
[Link]('<</HEAD>')
[Link]('<<BODY')
[Link](' onLoad="setuptimer()" onUnload="killtimer()"')
[Link]('>')
[Link]() !begin the form
[Link](Target)
SeeAlso: WriteFormFooter
CHAPTER 17 HTML CLASS 561
For Java enabled browsers, the HTML code that defines the Web page can
execute these functions upon certain HTML events, such as onLoad,
onUnload, onFocus, onChange, onSubmit, etc.
HTML code can associate these functions with specific HTML events, so
that the function is called when the event occurs. For example, the
WriteEventHandler method associates either the icSubmitForm() or the
changed() function with an “accepted” event for an HTML control.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link]*1000, [Link])
[Link]
[Link] !write shared JavaScript functions
[Link](Target)
[Link]('<</BODY>')
[Link]('<</HTML>')
SeeAlso: WriteEventHandler
562 IBC LIBRARY REFERENCE
WriteOnFocusHandler
Writes the HTML code that defines what happens when
the end user selects the control.
action A string constant, variable, EQUATE, or expression
containing the text of the function call to execute when
the control is selected. If omitted, the browser calls the
[Link]() function.
The WriteOnFocusHandler method writes the HTML code that defines the
handling for a Web page control when the end user selects the control with
the Web browser.
Typically, the HTML code calls the [Link]() function. The “this” qualifier
identifies the current control object for Java enabled browsers. The select()
function implements standard control selection behavior.
The WriteOnFocusHandler method wrote just the black code in the following
HTML code example:
<TD><INPUT TYPE=TEXT VALUE="00003" NAME="X30003" SIZE="10"
onChange="icSubmitForm()" OnFocus="[Link]()"></TD>
This Server generated HTML code defines a control such that, when the
control is selected (gains focus), the browser executes the [Link]()
function.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link], TRUE)
[Link]('<<INPUT TYPE=TEXT')
[Link](' VALUE="')
[Link]([Link]())
[Link]('"')
[Link]([Link](Target))
[Link](' SIZE="' & INT(([Link]{PROP:width} + 2)/4) & '"')
[Link]|
([Link](EVENT:Accepted),HTML:EntryChanged,HTML:EntryValue)
[Link] !set up gain focus handling
[Link]('>')
CHAPTER 17 HTML CLASS 563
WriteRefreshTimer
Writes the HTML code that defines an automatic timed
page refresh.
delay An integer constant, variable, EQUATE, or expression
containing the number of seconds to delay before
refreshing the HTML page.
The WriteRefreshTimer method writes the HTML code that defines an
automatic timed page refresh. The HTML code requests a new page from the
same Server instance that generated the current page.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<HTML>')
IF ([Link] = Update:Refresh)
[Link]([Link])
END
[Link]('<<HEAD>')
!more page header code
564 IBC LIBRARY REFERENCE
Implementation: The WriteSpace method writes number non-breaking HTML spaces. The
HTML symbol for these spaces (across all browsers) is  .
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>')
[Link](([Link]()-1)*2)
[Link]([Link]())
[Link]('<</NOBR><<BR>')
CHAPTER 17 HTML CLASS 565
WriteSubmitApplet
Writes the HTML code that defines an applet to coordi-
nate communication between the Application Broker and
the Java controls on the page.
timer An integer constant, variable, EQUATE, or expression
containing the milliseconds between browser timer
events (the speed of the browser timer). This is typically
a function of the value of the
[Link] property. If omitted,
timer defaults to zero (0).
action An integer constant, variable, EQUATE, or expression
indicating the action to invoke when the timer period
expires. This is typically the value of the
[Link] property. If omitted,
action defaults to zero (0).
The WriteSubmitApplet method writes the HTML code that defines an
applet to coordinate communication between the Application Broker and the
Java controls on the page
Implementation: The WriteSubmitApplet method wrote the following HTML code fragment:
<<applet NAME="AppSubmit" CODEBASE="/" CODE=[Link] ARCHIVE="/
[Link]" MAYSCRIPT WIDTH=2 HEIGHT=2>
<param name=cabbase value="/[Link]">
<param name=USID value="/PUBLIC/ORDERS/[Link].1389494281">
<param name=className value="ClarionCOM">
<param name=UAID value="524289">
<param name=NumListBoxes value="0">
</applet>
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]([Link]*1000,[Link])
[Link]
[Link]
[Link](Target)
[Link]('<</BODY>')
[Link]('<</HTML>')
WriteTableFooter (endHTMLTABLE)
WriteTableFooter
The WriteTableFooter method writes the HTML code to end an HTML
TABLE started by the WriteTableHeader method.
Example:
SeeAlso: WriteTableHeader
WriteTableHeader
Writes the HTML code to begin an HTML TABLE.
attr A string constant, variable, EQUATE, or expression
containing the attribute to the HTML TABLE. If omit-
ted, the method writes no attribute.
The WriteTableHeader method writes the HTML code to begin an HTML
TABLE. End the TABLE with the WriteTableFooter method.
Example:
SeeAlso: WriteTableFooter
CHAPTER 17 HTML CLASS 567
WriteTableNewCol
Writes the HTML code to begin an HTML TABLE
CELL.
attr A string constant, variable, EQUATE, or expression
containing the attribute to the HTML TABLE CELL. If
omitted, the method writes no attribute.
The WriteTableNewCol method writes the HTML code to end the previous
TABLE CELL and begin a new CELL. End the CELL with the
WriteTableNewCol, WriteTableNewRow, or WriteTableFooter method.
Example:
WriteTableNewRow
Writes the HTML code to begin an HTML TABLE
ROW.
attr A string constant, variable, EQUATE, or expression
containing the attribute to the HTML TABLE ROW. If
omitted, the method writes no attribute.
The WriteTableNewRow method writes the HTML code to end the previous
ROW and begin a new ROW. End the ROW with the WriteTableNewRow or
WriteTableFooter method.
Example:
SeeAlso: WriteTableFooter
568 IBC LIBRARY REFERENCE
Implementation: The WriteSpace method writes HTML to represent text by translating ASCII
carriage return characters within text to their HTML equivalent: <<BR>.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
IF ([Link])
[Link]([Link]())
ELSE
[Link]('<<NOBR>')
[Link]([Link]())
[Link]('<</NOBR>')
END
CHAPTER 18 TEXT OUTPUT CLASS 569
Overview 571
TextOutPutClass Concepts ..................................................................................571
Relationship to Other Internet Builder Classes ................................................... 571
Internet Connect Template Implementation .........................................................571
Source Files..........................................................................................................571
TextOutputClass Methods 572
Functional Organization—Expected Use ............................................................572
Close (close the file) ........................................................................................... 573
CreateOpen (create and open the file) .................................................................574
GetSize (return file size) ......................................................................................575
Open (open the file) .............................................................................................576
Write (write text) ................................................................................................ 577
Writeln (write text and newline marker)..............................................................578
570 IBC LIBRARY REFERENCE
CHAPTER 18 TEXT OUTPUT CLASS 571
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
TextOutPutClassConcepts
SourceFiles
[Link] TextOutputClass
572 IBC LIBRARY REFERENCE
TextOutputClass Methods
The TextOutputClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which other IBC Library objects call fairly
routinely, can be further divided into three categories:
Mainstream Use:
CreateOpen create and open the file
Open open the file
GetSize return file size
Write write text
Writeln write text and newline marker
Close close the file
Occasional Use:
Virtual Methods
Close(closethefile)
Close
The Close method closes the text file.
Implementation: The Close method calls the Writeln method to write any buffer contents to
disk and add a trailing carriage return.
Example:
[Link] PROCEDURE(*HtmlClass Target,STRING HtmlFilename)
CODE
[Link](HtmlFilename,[Link], | !open text file
[Link],[Link])
[Link](Target)
[Link](Target,0,[Link]())
[Link](Target)
[Link] !close text file
[Link] = TRUE
SeeAlso: Writeln
574 IBC LIBRARY REFERENCE
CreateOpen(create andopenthefile)
CreateOpen( filename )
TargetFile FILE,DRIVER('DOS'),NAME(TargetFilename),PRE(TGT),THREAD,CREATE
RECORD RECORD,PRE()
TextLine CSTRING(MAXTARGETLEN+1)
END
END
Example:
[Link] PROCEDURE
Protocol CSTRING(20)
ErrorNum CSTRING(5)
ErrorMsg CSTRING(30)
CODE
[Link]([Link]) !open text file
Protocol = [Link]('HttpProtocol')
ErrorNum = [Link]('ErrorNum')
ErrorMsg = [Link]('ErrorMsg')
[Link](Protocol & ' ' & ErrorNum & ' ' & ErrorMsg)
[Link]()
[Link]()
[Link]() !close text file
CHAPTER 18 TEXT OUTPUT CLASS 575
Example:
[Link] PROCEDURE
CODE
IF ([Link])
[Link] = [Link]([Link]) !get file size
ASSERT([Link]<>0)
IC:RemoveFile([Link])
IC:RenameFile([Link], [Link])
[Link]('Content-length', '' & [Link])
ELSE
[Link] = [Link]
END
[Link] = IC:GetStrDateTime(TODAY(), CLOCK())
[Link] = [Link]
[Link]()
[Link]()
576 IBC LIBRARY REFERENCE
Open(openthefile)
Open( filename )
Implementation: The CreateOpen method offers to GPF (halt) the program if the file does not
exist. You (or the end user) may allow the program to continue, but
subsequent attempts to access the file will fail.
Example:
[Link] PROCEDURE
CODE
Implementation: The maximum line length is determined by the file definition, typically
supplied by the CreateOpen method.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>') !begin line
[Link]([Link]()) !extend line
[Link]('<</NOBR>') !end line
Implementation: The Writeln method provides error checking for each write.
Example:
[Link] PROCEDURE(*HtmlClass Target)
CODE
[Link]('<<NOBR>') !begin line
[Link]([Link]()) !extend line
[Link]('<</NOBR>') !end line
!end line
SeeAlso: Write
CHAPTER 19 HTTP CLASSES 579
HTTP CLASSES
Overview 581
HttpClass Concepts ............................................................................................. 581
HttpPageBaseClass Concepts ............................................................................. 581
Relationship to Other Internet Builder Classes ................................................... 582
Internet Connect Template Implementation .........................................................582
Source Files..........................................................................................................582
HttpClass Properties 583
Arguments (incoming field data) ........................................................................ 583
BrowserInfo (Web browser properties) .............................................................. 584
Cookies (information stored on Client) .............................................................. 585
Files (WebFilesClass object) .............................................................................. 586
HttpPage (HttpPageBaseClass object) .................................................................586
ProgName (server name) .................................................................................... 587
ProcName (password protected Web page) ........................................................ 587
ServerInfo (outgoing http information) ...............................................................588
HttpClass Methods 589
Functional Organization—Expected Use ............................................................589
FinishPage (prepend http to outgoing transmission) ...........................................591
GetArguments (return incoming field data).........................................................591
GetAuthorizedInfo (get client password) ............................................................592
GetBrowserProperty (return browser property) ...................................................593
GetCookie (return cookie value) ......................................................................... 594
GetServerProperty (return outgoing http information) ........................................595
Init (initialize the HttpClass object) .....................................................................596
Kill (shut down the HttpClass object) ..................................................................596
PreparePage (prime ServerInfo for next transmission) ...................................... 597
PreparePageForBrowser (prime ServerInfo for HTML transmission) ............... 598
PreparePageForJava (prime ServerInfo for JSL transmission) ...........................599
PrepareUnauthorized (prime ServerInfo for password challenge) ......................600
ProcessHeader (process incoming http) .............................................................. 601
SendCookies (update cookies on client) ..............................................................601
SetBrowserProperty (set browser property) ....................................................... 602
SetCookie (set cookie value) .............................................................................. 603
SetProgName (set server name) ...........................................................................604
580 IBC LIBRARY REFERENCE
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
HttpClassConcepts
Hyper-Text Transfer Protocol (http) is the protocol that web servers use to
transmit HTML pages to internet browsers. Conversely, internet browsers
use http to transmit their requests to web servers.
Not surprisingly, then, the IBC Library’s HttpClass class has two http related
jobs:
• To process incoming http headers sent from the Client to the
Server. Specifically, it extracts the browser type, any
authorization information, and any cookies (Server information
stored on the Client) from the incoming http.
• To build http headers for outgoing HTML and Java Support
Library (JSL) data, including cookies, demands for
authorization, error messages, content size, etc.
HttpPageBaseClassConcepts
The HttpPageBaseClass prepares and writes the outgoing http headers for
HttpClass objects.
The BrokerClass creates and manages a single instance of the HttpClass. The
BrokerClass relies on this HttpClass object to do both jobs described above.
That is, to process incoming http headers, and to build http headers for
outgoing HTML and JSL data.
SourceFiles
The HttpClass source code is installed by default to the \LIBSRC folder. The
specific class declarations are in the following files and their method
definitions are in the corresponding .CLW files.
[Link] HttpClass
CHAPTER 19 HTTPCLASS 583
Implementation: The Arguments property contains a list of field assignments of the form
‘field1=value1&field2=value2&fieldN=valueN’. The SubmitItemClass
manages a single field assignment within this string.
The ProcessHeader method sets the value of the Arguments property based
on the incoming http which contains something like the following http
fragment:
GET /PUBLIC/[Link].1043595275?X30003=OH&X30005=Ohio&X30006=OK HTTP/1.0
Cookies(informationstoredonClient)
Cookies&CookesQueue
The Cookies property is a reference to a structure that contains information
stored on the Client machine (cookies) at the request of the Server.
A server can send data to a client which the client stores locally. This is
known as a cookie. A cookie contains a range of URLs for which it is valid.
When the client returns to a URL within that range, the server can query the
cookie and use its data. A server cannot query a cookie from another server.
Cookies are machine and browser specific so a client who accesses a site
from more than one machine or uses more than one browser will need to
provide the cookie information once for each machine and browser.
The GetCookie method returns a specific cookie item from the Client. The
SetCookie method sets a specific cookie item to send to the Client. The
SendCookies method updates the cookies on the Client machine.
Implementation: The Cookies property is inherited from the HttpBaseClass class. It contains
information (cookies) extracted from the incoming http header by the
ProcessHeader method. The information is stored in a queue with the same
structure as the CookiesQueue declared in [Link] as follows:
CookiesQueue QUEUE,TYPE
Name CSTRING(40)
Value CSTRING(255)
Path CSTRING(255)
ExpireDate LONG
ExpireTime LONG
Modified BYTE
END
Files(WebFilesClassobject)
Files &WebFilesClass
The Files property is a reference to the WebFilesClass object that provides
all the filenames, pathnames, directories, and aliases required by the
HttpClass object.
Implementation: The Init method sets the value of the Files property.
SeeAlso: Init
HttpPage (HttpPageBaseClassobject)
HttpPage &HttpPageBaseClass, PROTECTED
The HttpPage property is a reference to the HttpPageBaseClass object that
prepares and writes the outgoing http headers for the HttpClass object.
Implementation: The PreparePage method sets the value of the HttpPage property. The
HttpPage property inputs the final pieces of information into the ServerInfo
property, then extracts all the outgoing http information in the proper
sequence from the ServerInfo property, and prepends it to the outgoing
HTML or JSL data.
Implementation: The HttpClass object uses the ProgName property to identify the Server for
password protected areas and for cookies.
Implementation: The ServerInfo property is inherited from the HttpBaseClass class. This
property contains information set by the HttpClass object. The information is
stored in a queue with the same structure as the HttpInfoQueue declared in
[Link] as follows:
HttpInfoQueue QUEUE,TYPE
Name CSTRING(40)
Value CSTRING(255)
Special SIGNED
END
HttpClass Methods
The HttpClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
GetCookie return cookie value
SetCookie set cookie value
SetProcName set protected area name
SetProgName set server name
Occasional Use:
ProcessHeader process incoming http
GetArguments return incoming field data
GetAuthorizedInfo get Client password
PreparePageForBrowserprime ServerInfo for HTML page
PreparePageForJava prime ServerInfo for JSL page
PrepareUnauthorized prime ServerInfo for password page
FinishPage prepend http to outgoing page
590 IBC LIBRARY REFERENCE
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Implementation: The FinishPage method extracts http information from the ServerInfo
property, formats it to HTTP/1.0 standards, then prepends it to the outgoing
transmission.
Example:
[Link] PROCEDURE(STRING Filename,SIGNED Security,BYTE dontmove)
CODE
[Link](200, Filename)
[Link]()
[Link](Filename,Security,dontmove)
Example:
[Link] PROCEDURE
CODE
RETURN [Link]()
SeeAlso: Arguments
592 IBC LIBRARY REFERENCE
GetAuthorizedInfo
Gets the Client’s (end user) username and password.
username A string variable to receive the Client’s username.
password A string variable to receive the Client’s password.
The GetAuthorizedInfo method gets the Client’s (end user) username and
password.
Example:
[Link] PROCEDURE(STRING AreaName,*STRING User,*STRING Password)
CODE
[Link](AreaName)
[Link](User, Password)
GetBrowserProperty
Returns the specified browser property.
property A string constant, variable, EQUATE, or expression
identifying the property to return.
The GetBrowserProperty method returns a browser property that was set
by the SetBrowserProperty method.
Implementation: The GetBrowserProperty method gets the information from the BrowserInfo
property.
Example:
[Link] PROCEDURE
BrowserType STRING(100)
CODE
BrowserType = [Link]('User-Agent')
IF (INSTRING('MSIE 4.', BrowserType, 1, 1))
[Link] &= IE40
ELSIF (INSTRING('MSIE 3.', BrowserType, 1, 1))
[Link] &= IE30
ELSIF (INSTRING('Mozilla/4.', BrowserType, 1, 1))
[Link] &= Mozilla4
ELSIF (INSTRING('Mozilla/3.', BrowserType, 1, 1))
[Link] &= NetScape3x
END
Implementation: The GetCookie method gets the information from the Cookies property. The
Cookies property may contain cookie values that came from the Client (set
by the ProcessHeader method) as well as cookie values set by the Server (set
by the SetCookie method) to send to the Client.
Example:
PrepareProcedure ROUTINE
DefaultCity = [Link]('City')
ProcedureReturn ROUTINE
[Link]('City', DefaultCity)
GetServerProperty
Returns the specified outgoing http information.
item A string constant, variable, EQUATE, or expression
identifying the item to return.
The GetServerProperty method returns an information item that was set by
the SetServerProperty method. The returned information is typically used to
build the outgoing http headers.
Implementation: The GetServerProperty method gets the information from the ServerInfo
property.
Example:
[Link] PROCEDURE
Protocol CSTRING(20)
ErrorNum CSTRING(5)
ErrorMsg CSTRING(30)
CODE
[Link]([Link])
Protocol = [Link]('HttpProtocol')
ErrorNum = [Link]('ErrorNum')
ErrorMsg = [Link]('ErrorMsg')
[Link](Protocol & ' ' & ErrorNum & ' ' & ErrorMsg)
[Link]()
[Link]()
[Link]()
IF ([Link])
[Link]([Link], [Link], [Link], TRUE)
ELSE
[Link]()
END
Implementation: The Init method sets the value of the Files property. It also instantiates the
BrowserInfo, Cookies, and ServerInfo properties.
Example:
[Link] PROCEDURE(STRING ProgramName, WebFilesClass Files)
CODE
[Link] &= Files
[Link] &= NEW HttpClass !instantiate new HttpClass object
[Link](Files) !and initialize it
[Link](ProgramName)
Implementation: The Kill method DISPOSEs the BrowserInfo, Cookies, and ServerInfo
properties.
Example:
[Link] PROCEDURE
CODE
[Link]
IF (NOT ([Link] &= NULL))
[Link] !shut down HttpClass object
DISPOSE([Link])
END
CHAPTER 19 HTTPCLASS 597
Implementation: The PreparePage method prepares for the transmission by DISPOSEing the
HttpPage property and the ServerInfo property. Then it calls the
[Link] method to prime the ServerInfo property
with http settings for the next transmission.
Typically, the filename parameter names the file containing HTML code or
JSL data prepared by the WebWindow class object. The BrokerClass object
passes the filename to the HttpClass object, which passes it on to the
HttpPageBaseClass object.
Example:
[Link] PROCEDURE(SIGNED status, <STRING Filename>)
HttpPage &HttpPageBaseClass
CODE
HttpPage &= NEW HttpPageBrowserClass
[Link](HttpPage, status, Filename)
PreparePageForBrowser
Primes the ServerInfo property with http information
pertaining to the next outgoing HTML transmission.
status An integer constant, variable, EQUATE, or expression
containing the status code to send to the Client. The
status codes indicates the Server’s response to the
Client’s request.
filename A string constant, variable, EQUATE, or expression
containing the name of the file to send to the Client. If
omitted, ...
The PreparePageForBrowser method primes the ServerInfo property with
http information pertaining to the next outgoing HTML transmission.
Example:
[Link] PROCEDURE(<STRING Filename>)
HttpPage &HttpPageBaseClass
CODE
[Link](401, Filename) !prepare password challenge page
[Link]('WWW-authenticate','basic realm="'&[Link]&'"')
PreparePageForJava
Primes the ServerInfo property with http information
pertaining to the next outgoing JSL data transmission.
status An integer constant, variable, EQUATE, or expression
containing the status code to send to the Client. The
status codes indicates the Server’s response to the
Client’s request.
filename A string constant, variable, EQUATE, or expression
containing the name of the file to send to the Client. If
omitted, ...
The PreparePageForJava method primes the ServerInfo property with http
information pertaining to the next outgoing JSL data transmission.
Implementation: The PreparePageForJava method calls the PreparePage method to prime the
ServerInfo property with http settings for the transmission.
Example:
[Link] PROCEDURE(STRING Filename, SIGNED Security)
CODE
[Link](200, Filename)
[Link]()
[Link](Filename, Security, TRUE)
PrepareUnauthorized
Primes the ServerInfo property with http information
pertaining to a password protected area.
filename A string constant, variable, EQUATE, or expression
containing the name of the file to send to the Client. If
omitted, ...
The PrepareUnauthorized method primes the ServerInfo property with http
information pertaining to a password protected HTML page.
Implementation: The PrepareUnauthorized method calls the PreparePage method to prime the
ServerInfo property with http settings for the transmission.
Example:
[Link] PROCEDURE(STRING Filename, SIGNED Security)
CODE
[Link](Filename)
IF ([Link])
[Link]('Pragma', 'no-cache')
END
[Link]()
[Link](Filename, Security, TRUE)
ProcessHeader (processincominghttp)
ProcessHeader( http text )
Implementation: The ProcessHeader method clears and reloads the Arguments, BrowserInfo,
and Cookies properties.
Example:
[Link] PROCEDURE(STRING HeaderText)
CODE
[Link](HeaderText)
SendCookies(update cookiesonclient)
SendCookies, VIRTUAL
The SendCookies method primes the ServerInfo property with cookie
information for the next outgoing transmission.
Implementation: The SendCookies method extracts current cookie information from the
Cookies property, and calls the SetServerProperty method to add the cookie
information to the ServerInfo property. The FinishPage method includes the
ServerInfo information (including the cookies) in the outgoing http.
Example:
[Link] PROCEDURE
CODE
[Link]()
[Link]()
SetBrowserProperty
Sets the value of the specified browser property.
property A string constant, variable, EQUATE, or expression
identifying the property whose value to set.
value A string constant, variable, EQUATE, or expression
containing the contents of the property.
The SetBrowserProperty method sets the value of the specified browser
property. The GetBrowserProperty method returns values set by the
SetBrowserProperty method.
Example:
[Link]('HttpProtocol', 'HTTP/1.0')
The GetCookie method returns cookie values set by the SetCookie method or
by the ProcessHeader method.
Implementation: The SetCookie method updates the Cookie property. The FinishPage method
includes the contents of the Cookie property in the outgoing http header.
Example:
PrepareProcedure ROUTINE
DefaultCity = [Link]('City')
ProcedureReturn ROUTINE
[Link]('City', DefaultCity)
The name parameter typically contains the name of the program as launched
by the Application Broker; however, it may contain any value that
appropriately identifies the Server.
Implementation: The SetProgName method sets the value of the ProgName property. The
HttpClass object uses the ProgName property to identify the Server for
password protected areas and for cookies.
Example:
[Link](‘Net Orders’)
The name parameter typically contains the name of the procedure that
generates the protected Web page; however, it may contain any value that
appropriately identifies the password protected area to end users, because
this is the name end users see when the Client browser prompts for the
password.
Implementation: The SetProcName method sets the value of the ProcName property. The
HttpClass object uses the both the ProgName and ProcName properties to
identify password protected Web pages.
Example:
[Link] PROCEDURE(STRING AreaName,*STRING User,*STRING Password)
CODE
[Link](AreaName)
[Link](User, Password)
SetServerProperty
Sets the value of the specified outgoing http item.
name A string constant, variable, EQUATE, or expression
identifying the property whose value to set.
value A string constant, variable, EQUATE, or expression
containing the contents of the item.
special An integer constant, variable, EQUATE, or expression
indicating whether the item requires special handling. If
omitted, special defaults to zero(0).
multiple An integer constant, variable, EQUATE, or expression
indicating whether the item replaces other items with the
same name. A value of one(1) allows multiple items with
the same name; a value of zero(0) allows only one item
with the same name. If omitted, multiple defaults to
zero(0). For example, there may be more than one “Set-
Cookie” item, but there is only one “Server” item.
The SetServerProperty method sets the value of the specified outgoing http
item. The GetServerProperty method returns values set by the
SetServerProperty method.
Implementation: The SetServerProperty method adds items to the ServerInfo property. The
FinishPage method includes these items in the outgoing http header.
Example:
[Link] PROCEDURE
NumCookies SIGNED,AUTO
ExtendedValue CSTRING(1000)
DateTime CSTRING(100)
I SIGNED,AUTO
CODE
NumCookies = RECORDS([Link])
LOOP I = 1 TO NumCookies
GET([Link], I)
ExtendedValue = [Link]&'="'&[Link]&'"'
[Link]('Set-Cookie', ExtendedValue, FALSE, TRUE)
END
ExpireDateTime (transmissionexpirationtimestamp)
ExpireDateTime STRING(100), PROTECTED
The ExpireDateTime property contains the date and time the transmitted
page expires or is no longer valid.
Implementation: The PreparePage method sets the value of the ExpireDateTime property. The
HttpClass object includes this timestamp in the http header it sends to the
Client browser. The browser determines how the timestamp is actually used.
SeeAlso: PreparePage
FileHandler (TextOutputClassobject)
FileHandler &TextOutputClass, PROTECTED
The FileHandler property is a reference to the TextOutputClass object that
handles basic file handling, such as creating, opening, writing, and closing,
for the HttpPageBaseClass object.
Implementation: The Init method instantiates a new FileHandler for the HttpPageBaseClass
object.
FileLen(transmissionsize)
FileLen ULONG, PROTECTED
The FileLen property contains the size of the entire transmission, including
the http header information. The HttpPageBaseClass includes the
transmission size in the outgoing http header.
Implementation: The PreparePage method sets the value of the FileLen property.
SeeAlso: PreparePage
Implementation: The Init method sets the value of the GotHtmlBody property.
SeeAlso: Init
CHAPTER 19 HTTPPAGEBASECLASS 609
HtmlFilename (HTML/JSLtransmissionfile)
HtmlFilename CSTRING(FILE:MaxFileName), PROTECTED
The HtmlFilename property identifies the temporary file that contains only
the body of the transmission—that is, the file that contains the HTML code
or JSL data, but does not contain the http header information.
Implementation: The Init method sets the value of the HtmlFilename property.
SeeAlso: Init
Http (HttpClassobject)
Http &HttpBaseClass, PROTECTED
The Http property is a reference to the (parent) HttpClass object that handles
both incoming and outgoing http headers.
Implementation: The Init method sets the value of the Http property. The HttpPageBaseClass
object uses the Http property to access the http information (ServerInfo)
already collected by and resident in the Http property. The
HttpPageBaseClass object also uses some of the Http property’s methods
(SetServerProperty) to add the final pieces of http information before
assempling the http header.
NowDateTime (transmissiontimestamp)
NowDateTime STRING(100), PROTECTED
The NowDateTime property contains the date and time on the server
machine when the transmitted file was created. The HttpPageBaseClass
object uses this property to calculate the ExpireDateTime property.
Implementation: The PreparePage method sets the value of the NowDateTime property.
Implementation: The Init method sets the value of the PageFilename property.
SeeAlso: Init
CHAPTER 19 HTTPPAGEBASECLASS 611
Implementation: The Init method sets the value of the Status property. The HandleStatusCode
and SetupHttpStatus methods set a corresponding message. Valid status
codes and messages include:
Code Message
200 'OK'
201 'Created'
202 'Accepted'
204 'No Content'
300 'Multiple Choices'
301 'Moved Permanently'
302 'Moved Temporarily'
304 'Not Modified'
400 'Bad Request'
401 'Unauthorized'
403 'Forbidden'
404 'Not Found'
500 'Internal Server Error'
501 'Not Implemented'
502 'Bad Gateway'
503 'Service Unavailable'
other 'UNKNOWN!'
SeeAlso: HandleStatusCode, Init, SetupHttpStatus
612 IBC LIBRARY REFERENCE
HttpPageBaseClass Methods
The HttpPageBaseClass contains the methods listed below.
Functional Organization—ExpectedUse
The primary interface methods, which you are likely to call fairly routinely
from your program, can be further divided into three categories:
Mainstream Use:
Occasional Use:
SetupHttpStatus set outgoing http status indicators
Virtual Methods
Typically you will not call these methods directly—the Primary Interface
methods call them. However, we anticipate you will often want to override
these methods, and because they are virtual, they are very easy to override.
These methods do provide reasonable default behavior in case you do not
want to override them.
Implementation: The AppendDefaultBody method creates HTML to display the status code
(Status property) for the Client’s request. The GotHtmlBody property
indicates whether the expected HTML is present or absent.
Example:
[Link] PROCEDURE
CODE
!procedure code
Example:
[Link] PROCEDURE !derived class FinishPage method
CODE
[Link]()
[Link]() !calls [Link]
HandleStatusCode(processstatuscode)
HandleStatusCode, VIRTUAL, PROTECTED
The HandleStatusCode method performs all required status code
processing, including setting a corresponding status message, and any other
http items that are status code dependent.
Example:
[Link] PROCEDURE
CODE
IF ([Link])
[Link] = [Link]([Link])
IC:RemoveFile([Link])
IC:RenameFile([Link], [Link])
[Link]('Content-length', '' & [Link])
ELSE
[Link] = [Link]
END
[Link]()
[Link]() !set status message & other status dependent http
Implementation: The Init method sets the value of the GotHtmlBody, HtmlFilename, Http,
PageFilename, and Status properties, and instantiates a new TextOutputClass
object for the FileHandler property.
Example:
[Link] PROCEDURE |
(*HttpPageBaseClass HttpPage,SIGNED Status,<STRING Filename>)
CODE
[Link]()
[Link] &= HttpPage
[Link](SELF,status,Filename,[Link](Filename))
[Link]()
Example:
[Link] PROCEDURE
CODE
[Link]()
IF (NOT [Link] &= NULL)
[Link]()
DISPOSE([Link])
END
SeeAlso: FileHandler
Implementation: Among other things, the PreparePage method calls the PreparePageBody and
HandleStatusCode methods to add the final outgoing http information to the
[Link] property.
Example:
[Link] PROCEDURE |
(*HttpPageBaseClass HttpPage, SIGNED Status, <STRING Filename>)
CODE
[Link]()
[Link] &= HttpPage
[Link](SELF,status,Filename,[Link](Filename))
[Link]() !wrap up outgoing http information
Example:
[Link] PROCEDURE
CODE
IF ([Link])
[Link] = [Link]([Link])
IC:RemoveFile([Link])
IC:RenameFile([Link], [Link])
[Link]('Content-length', '' & [Link])
ELSE
[Link] = [Link]
END
[Link] = IC:GetStrDateTime(TODAY(), CLOCK())
[Link] = [Link]
[Link]()
[Link]()
SeeAlso: [Link]
CHAPTER 19 HTTPPAGEBASECLASS 619
Implementation: The SetupHttpStatus method sets the HttpProtocol, ErrorNum, and ErrorMsg
outgoing http items. These are the initial items interpreted by the Client
browser. The ErrorNum and ErrorMsg values depend on the Status property.
Example:
[Link] PROCEDURE
CODE
[Link]([Link])
SeeAlso: Status
620 IBC LIBRARY REFERENCE
Example:
[Link] PROCEDURE
Protocol CSTRING(20)
ErrorNum CSTRING(5)
ErrorMsg CSTRING(30)
CODE
[Link]([Link])
Protocol = [Link]('HttpProtocol')
ErrorNum = [Link]('ErrorNum')
ErrorMsg = [Link]('ErrorMsg')
[Link](Protocol & ' ' & ErrorNum & ' ' & ErrorMsg)
[Link]()
[Link]()
IF ([Link])
[Link]([Link], [Link], [Link], TRUE)
ELSE
[Link]()
END
SeeAlso: [Link]
Friends of the IBC Library 621
Overview
If you have not already done so, please take a moment to read Internet
Connect Terms and Concepts. This short topic contains information and
terms that are prerequisite to the following material.
Friend Concepts
The WebFrame Class provides methods to “merge” these global toolbar and
menu controls onto the Web pages representing the application’s child
windows. Finally, WebFrame Class provides methods to handle any events
associated with the merged controls.
SourceFiles
Data
The contains the data items listed below.
FrameWindow
FrameWindow &WINDOW
The FrameWindow property is a reference to the program’s APPLICATION
(main window). The WebFrameClass uses the FrameWindow property to
reference the program’s main window.
Friends of the IBC Library 625
Procedures
The contains the procedures listed below.
GetWebActiveFrame ()
GetWebActiveFrame
The GetWebActiveFrame procedure returns a reference to the active
WebFrameClass object. They are used to tell the system when a frame
window has been opened, and closed, and to find out what the current
frame is. If you had more than one frame window, then
SetWebActiveFrame would be called more than once during the
program's lifetime.
Implementation: The .
Example:
SeeAlso: SetWebActiveFrame
SetWebActiveFrame ()
SetWebActiveFrame( WebFrameClass )
The SetWebActiveFrame procedure returns a reference to the active
WebFrameClass object. They are used to tell the system when a frame
window has been opened, and closed, and to find out what the current
frame is. If you had more than one frame window, then
SetWebActiveFrame would be called more than once during the
program's lifetime.
Implementation: The .
Example:
SeeAlso: GetWebActiveFrame
WebControlFactory ()
WebControlFactory( type )
The WebControlFactory procedure returns a reference to the active
WebFrameClass object. They are used to tell the system when a frame
window has been opened, and closed, and to find out what the current
frame is. If you had more than one frame window, then
626 IBC Library Reference
Implementation: The .
Example:
SeeAlso: GetWebActiveFrame
Friends of the IBC Library 627
628 IBC Library Reference
Friends of the IBC Library 629
630 IBC Library Reference
INDEX 631
WebButtonClassMethods ......................................................328
INDEX WebControlClassMethods ....................................................227
WebHtmlCheckClassMethods..............................................271
BeginUpdate
A JSLManagerClassMethods...................................................457
BodyFooter
ActionOnAccept WebWindowClassMethods .......................................................170
WebControlClassProperties ................................................. 221 BodyHeader
Active WebWindowClassMethods .......................................................171
WebServerClassProperties .....................................................66 BorderWidth
AddControl WebHtmlGroupClassProperties............................................279
WebWindowClassMethods....................................................... 167 WebHtmlOptionClassProperties...........................................291
AddControlsToLayout WebHtmlSheetClassProperties ............................................304
WebControlListClassMethods.............................................. 135 WebWindowBaseClassProperties........................................141
WebWindowClassMethods....................................................... 169 Broker.................................................................................................32
AddEvent WebClientManagerClassProperties .................................... 94
JSLEventsClassMethods...................................................... 481 WebServerClassProperties.....................................................66
AddQueueEn try BrokerClass.......................................................................................41
JSLManagerClassMethods .................................................. 456 BrokerClassMethods ......................................................................46
aliases .................................................................................. 489 CloseChannel ...................................................................................47
Alignment GetAuthorizedInfo.......................................................................48
WebCaptionClassProperties................................................. 422 GetClient................................................................................. 49
AllowJava GetRequestArguments ..................................................................50
WebWindowBaseClassProperties....................................... 140 Init ...................................................................................... 51
AltText Kill..................................................................................52
WebHtmlImageClassProperties ........................................ 346 OpenChannel....................................................................................53
AppendDefaultBody ProcessHttpHeader.........................................................................54
HttpPageBaseClassMethods ................................. 613 SetClient ................................................................................. 55
AppletCount SetClientBrowser........................................................................55
HtmlClassProperties........................................................... 529 TakeFile...............................................................................................56
Application Broker.............................................................................32 TakeHtmlPage.........................................................................................57
ArgIndex TakeJslData.......................................................................................58
WebServerClassProperties .....................................................66 TakeUnauthorized............................................................................59
Arguments BrokerClassProperties............................................................... 44
HttpClassProperties ........................................................... 583 Client ....................................................................................... 44
Authorize Files......................................................................................... 45
WebWindowClassProperties................................................ 162 Http .................................................................................... 44
AuthorizeArea ServerName......................................................................................45
WebWindowClassProperties................................................ 163 BrokerClasssynopsis ......................................................................35
AutoSpotLink Browser
WebJavaListClassProperties ................................................ 359 HtmlClassProperties...........................................................529
WebJavaStringClassProperties............................................ 380 WebClientManagerClassProperties .................................... 94
BrowserInfo
B HttpClassProperties............................................................584
BrowserManagerClass ......................................................................109
Background
BrowserManagerClassMethods.................................................112
WebAreaClassProperties ...................................................... 411
Init .................................................................................... 112
WebWindowBaseClassProperties....................................... 140
BrowserManagerClassProperties...........................................110
BackImage
Kind ....................................................................................... 110
WebAreaClassProperties ...................................................... 411
SetNoCache..............................................................................110
WebWindowBaseClassProperties....................................... 140
SubmitFromJava ................................................................................. 111
BeforeResetControl
SupportsStyleSheets...............................................................111
632 IBC LIBRARY REFERENCE
C CreateChildHtml
WebWindowBaseClassMethods.............................................153
cachingoptions......................................................................... 451 WebWindowClassMethods .......................................................172
ClassLibraries .............................................................................31 CreateClose
Client.............................................................................................32 WebWindowBaseClassProperties........................................142
BrokerClassProperties ..............................................................44 CreateColorParameters
HtmlClassProperties........................................................... 529 WebControlClassMethods .................................................. 229
JSLManagerClassProperties................................................ 453 CreateDummyHtmlPage
WebServerClassProperties .....................................................67 WebWindowClassMethods ..................................................... 173
Close CreateForeColorParameter
ShutDownClassMethods..........................................................90 WebControlClassMethods .................................................. 230
TextOutputClassMethods...................................................... 573 CreateHtml
CloseChannel LayoutHtmlClassMethods ................................................... 513
BrokerClassMethods.................................................................47 WebCaptionClassMethods....................................................423
JSLManagerClassMethods .................................................. 458 WebClientAreaClassMethods ...............................................437
CloseImage WebCloseButtonClassMethods............................................388
WebWindowBaseClassProperties....................................... 141 WebControlClassMethods ....................................................231
CommandLine WebControlListClassMethods ..............................................136
WebServerClassProperties .....................................................68 WebHtmlGroupClassMethods..................................................280
Connect WebHtmlMenuClassMethods...............................................288
WebServerClassMethods ........................................................74 WebHtmlOptionClassMethods .............................................292
Container WebHtmlSheetClassMethods...............................................305
WebControlClassProperties ................................................. 222 WebHtmlTabClassMethods.......................................................315
Container Applet ....................................................................... 555 WebJavaButtonClassMethods .............................................337
Conventions WebJavaImageClassMethods..................................................350
documentation.............................................................................37 WebJavaListClassMethods ...................................................362
Cookies WebJavaStringClassMethods...............................................381
HttpClassProperties ........................................................... 585 WebLiteralClassMethods................................................... 400
CopyControlsToWindow WebMenubarClassMethods......................................................429
WebFrameClassMethods ..................................................... 120 WebNullControlClassMethods .............................................402
CopyControlToWindow WebToolbarClassMethods ....................................................433
WebFrameClassMethods ..................................................... 122 CreateHtmlExtra
CreateCaption WebControlClassMethods .................................................. 232
WebWindowBaseClassProperties....................................... 141 WebHtmlRegionClassMethods ............................................302
CreateCellContents CreateHtmlPage
WebControlClassMethods.................................................... 227 WebWindowClassMethods ..................................................... 174
WebHotlinkClassMethods..................................................... 398 CreateJslData
WebHtmlButtonClassMethods............................................. 332 WebCloseButtonClassMethods............................................390
WebHtmlCheckClassMethods............................................. 272 WebControlClassMethods ....................................................232
WebHtmlEntryClassMethods ............................................... 276 WebHtmlCheckClassMethods..............................................273
WebHtmlImageClassMethods ............................................. 347 WebHtmlEntryClassMethods................................................277
WebHtmlItemClassMethods................................................. 284 WebHtmlListClassMethods...................................................357
WebHtmlListClassMethods .................................................. 356 WebHtmlOptionClassMethods .............................................293
WebHtmlMenuClassMethods .............................................. 287 WebHtmlTabClassMethods.......................................................316
WebHtmlPromptClassMethods ............................................... 298 WebHtmlTextClassMethods......................................................327
WebHtmlRadioClassMethods.............................................. 300 WebJavaButtonClassMethods .............................................339
WebHtmlStringClassMethods .............................................. 378 WebJavaImageClassMethods..................................................352
WebHtmlTextClassMethods ..................................................... 325 WebJavaListClassMethods ...................................................364
CreateCellFooter WebJavaStringClassMethods...............................................382
WebControlClassMethods.................................................... 228 WebNullControlClassMethods .............................................402
CreateCellHeader WebWindowClassMethods .......................................................175
WebControlClassMethods.................................................... 228 CreateOpen
INDEX 633
I
IBCLibrary ......................................................................30,
31
IBCLibrary Reference.................................................................... 30
IC:CurControl.................................................................................. 220
[Link]............................................................................................42
[Link]...............................................................93,
109
[Link]...........................................................270,
410
[Link]..........................................................................................478
[Link]..........................................................................................490
[Link]..........................................................................................528
[Link]..................................................................................................582
[Link] ............................................................................................. 452
[Link]............................................................220,
510
[Link] ...................................................... 444
[Link] ...............................................................................................444
[Link] ............................................................64,
521
[Link]...........................................................................................64
[Link] ...........................................................528,
571
[Link]................................................117, 133, 220
[Link]...............................................................................................133
638 IBC LIBRARY REFERENCE
J
Java events ..................................................................................... 477
Java Support Library...................................................................32
Java SupportLibrary (JSL) ..........................................................451
Java-enabled browser......................................................................32
JavaLibraryCab
HtmlClassProperties........................................................... 531
INDEX 639
PageBackground R
WebWindowBaseClassProperties....................................... 149
PageFilename RealParentFeq
HttpPageBaseClass Properties ............................... 610 WebControlClassProperties..................................................224
PageImage RefreshDisabled
WebWindowBaseClassProperties....................................... 149 WebControlClassMethods.....................................................252
PageToReturnTo RemoveAll
WebServerClassProperties .....................................................70 WebFilesClassMethods .........................................................504
ParentFeq RemoveAllQueueEntries
WebControlClassProperties ................................................. 224 JSLManagerClassMethods...................................................462
Partial PageUpdates ....................................................................451 RemoveQueueEntries
persistent communication....................................................................33 JSLManagerClassMethods...................................................463
PopFont Reports ...................................................................................... 443
HtmlClassMethods............................................................. 542 Reset
WebControlClassMethods.................................................... 250 SubmitItem Methods ...........................................................524
PreparePage ResetControl
HttpClassMethods.............................................................. 597 WebButtonClassMethods ......................................................331
HttpPageBaseClassMethods ................................. 617 WebCloseButtonClassMethods............................................397
PreparePageBody WebControlClassMethods.....................................................253
HttpPageBaseClassMethods ................................. 618 WebHtmlButtonClassMethods..............................................334
PreparePageForBrowser WebHtmlCheckClassMethods..............................................275
HttpClassMethods.............................................................. 598 WebHtmlEntryClassMethods ................................................278
PreparePageForJava WebHtmlItemClassMethods..................................................286
HttpClassMethods.............................................................. 599 WebHtmlListClassMethods...................................................358
PrepareUnauthorized WebHtmlOptionClassMethods..............................................296
HttpClassMethods.............................................................. 600 WebHtmlSheetClassMethods...............................................311
Preview WebHtmlTabClassMethods.......................................................323
WebReportClassMethods..................................................... 448 WebHtmlTextClassMethods......................................................327
ProcessHeader WebJavaButtonClassMethods..............................................342
HttpClassMethods.............................................................. 601 WebJavaListClassMethods ...................................................370
ProcessHttpHeader ResetFromControls
WebWindowClassMethods .......................................................200
INDEX 641
ResetFromQueue SetCentered
WebControlClassMethods.................................................. 254 WebWindowClassMethods .......................................................202
WebJavaListClassMethods................................................... 371 SetChecked
JSLManagerClassMethods...................................................470
S SetChildDefaults
WebControlClassMethods ....................................................256
ScrollQueueDown WebHtmlImageClassMethods..............................................348
JSLManagerClassMethods .................................................. 464 WebHtmlSheetClassMethods...............................................313
ScrollQueueUp WebWindowClassMethods .......................................................202
JSLManagerClassMethods .................................................. 465 SetClient
Security BrokerClassMethods.................................................................55
JSLManagerClassProperties................................................ 454 SetClientBrowser
SelectControl BrokerClassMethods.................................................................55
JSLManagerClassMethods .................................................. 466 SetCookie
SelectTarget HttpClassMethods..............................................................603
WebFilesClassMethods......................................................... 505 SetDescription
SendCookies WebControlClassMethods ....................................................257
HttpClassMethods.............................................................. 601 WebHtmlImageClassMethods..............................................348
SentHtml SetDialogPageBackground
WebWindowClassProperties................................................ 164 WebServerClassMethods........................................................83
Server ...........................................................................................32 SetDialogWinBackground
WebReportClassProperties .................................................. 446 WebServerClassMethods........................................................84
WebWindowBaseClassProperties....................................... 149 SetDirty
ServerInfo WebJavaListClassMethods ...................................................372
HttpClassProperties ........................................................... 588 SetEventAction
ServerName WebControlClassMethods ....................................................258
BrokerClassProperties ..............................................................45 WebJavaListClassMethods ...................................................373
SetAttribute SetFont
JSLManagerClassMethods .................................................. 467 WebAreaClassMethods .........................................................420
SetAttributeFilename SetFormatOptions
JSLManagerClassMethods .................................................. 468 WebWindowClassMethods .......................................................203
SetAttributeLong SetHelpDocument
JSLManagerClassMethods .................................................. 469 WebWindowClassMethods .......................................................204
SetAutoSpotLink SetHelpURL
WebControlClassMethods.................................................... 255 WebWindowClassMethods .......................................................205
WebJavaListClassMethods................................................... 372 SetIconAttribute
WebJavaStringClassMethods .............................................. 386 JSLManagerClassMethods...................................................471
SetBackground SetListChoice
WebAreaClassMethods......................................................... 419 JSLManagerClassMethods...................................................472
WebWindowClassMethods....................................................... 201 SetNewPageDisable
SetBorderWidth WebServerClassMethods........................................................86
WebControlClassMethods.................................................... 255 SetNextAction
WebHtmlGroupClassMethods ................................................. 283 WebServerClassMethods........................................................87
WebHtmlOptionClassMethods............................................. 297 SetNoCache
WebHtmlSheetClassMethods.............................................. 312 BrowserManagerClassProperties.........................................110
SetBreakable SetNumPages
WebControlClassMethods.................................................... 256 WebReportClassMethods .....................................................448
WebStringClassMethods....................................................... 377 SetPageBackground
SetBrowserProperty WebWindowClassMethods .......................................................206
HttpClassMethods.............................................................. 602 SetParentDefaults
SetCell WebAreaClassMethods .........................................................421
LayoutHtmlClassMethods..................................................... 517 WebControlClassMethods ....................................................260
642 IBC LIBRARY REFERENCE
TimerAction BeforeResetControl.......................................................................328
WebWindowBaseClassProperties....................................... 151 GetHasHotkey.................................................................................330
TimerDelay GetVisible ............................................................................. 331
WebWindowBaseClassProperties....................................... 151 Init .................................................................................... 333
TitleContents ResetControl..............................................................................331
WebWindowClassMethods....................................................... 215 WebCaptionClassMethods..........................................................423
toolbar merging .............................................................................. 117 CreateHtml.................................................................................423
ToolbarFeq GetCellAttributes.......................................................................424
WebFrameClassProperties................................................... 119 GetPosition ................................................................................425
WebWindowBaseClassProperties....................................... 152 GetText..................................................................................................... 426
GetVisible ............................................................................. 427
U Init .................................................................................... 428
WebCaptionClassProperties.......................................................422
UpdateCopyChoice Alignment...................................................................................422
WebControlClassMethods.................................................... 261 WebClientAreaClassMethods....................................................437
UpdateCopyUse CreateHtml.................................................................................437
WebControlClassMethods.................................................... 262 GetBackgroundColor....................................................................438
UpdateState GetPosition ................................................................................439
WebJavaListClassMethods................................................... 376 WebClientManagerClass....................................................................93
UseFonts WebClientManagerClassMethods ........................................... 96
HtmlClassProperties .......................................................... 532 Feq2Id...........................................................................................97
Using the IBCLibrary ................................................................. 32 Init ...................................................................................... 98
Kill..................................................................................99
V NextHtmlPage ................................................................................100
ValidatePassword TakeFile.............................................................................................100
WebWindowClassMethods....................................................... 216 TakeHtmlPage...................................................................................... 101
TakeJslData.....................................................................................103
W TakeUnauthorized..........................................................................105
WebClientManagerClassProperties ......................................... 94
wallpaper...........................................................159, 181, Broker ...........................................................................................94
192 Browser ........................................................................................94
Web-enable applications............................................................ 31 IP ...................................................................................95
Web-enabled applications.......................................................... 30 Jsl....................................................................................... 95
Web-enabledClarion application.................................................. 32 WebClientManagerClass synopsis...............................................35
WebAreaClass..................................................................................... 409 WebCloseButtonClassMethods .................................................388
WebAreaClassMethods .............................................................. 412 CreateHtml.................................................................................388
GetBackgroundColor................................................................... 412 CreateJslData............................................................................390
GetCellAttributes ...................................................................... 413 CreateParams ................................................................................391
GetFont............................................................................................. 414 GetAppletType................................................................................392
GetVisible............................................................................. 415 GetCloneFeq...................................................................................393
Init .................................................................................... 416 GetPosition ................................................................................394
Kill................................................................................ 417 GetVisible ............................................................................. 395
PushFont ......................................................................................... 418 Init .................................................................................... 396
SetBackground ........................................................................ 419 ResetControl..............................................................................397
SetFont....................................................................................... 420 WebCloseButtonClassProperties ...........................................387
SetParentDefaults.................................................................... 421 Height.................................................................................... 387
WebAreaClassProperties ........................................................... 411 Width..................................................................................... 387
Background .............................................................................. 411 X ...................................................................... 387
BackImage...................................................................................... 411 Y ...................................................................... 387
LocalFont................................................................................... 411 WebControlClass.................................................................................219
WebButtonClassMethods ........................................................... 328 WebControlClassDerivedClasses .........................................263
WebControlClassMethods ..........................................................225
644 IBC LIBRARY REFERENCE
GetHelpHandler..............................................................................157 CreateJslData............................................................................175
GetHelpReference................................................................... 158 CreatePageFooter.........................................................................176
GetHelpTarget.................................................................................158 CreatePageHeader.......................................................................176
GetMenubarFeq.............................................................................158 CreateUnauthorizedPage ...........................................................177
GetPageImage ...............................................................................159 GetAuthorized ...........................................................................179
GetShowMenubar...............................................................................159 GetBackgroundColor....................................................................180
GetShowToolbar..................................................................................159 GetBackgroundImage..................................................................181
GetToolbarFeq................................................................................160 GetButtonInClientArea.............................................................182
GetToolbarMode ............................................................................160 GetChildren................................................................................183
GetWebActiveFrame..........................................................................161 GetControl..................................................................................184
WebWindowBaseClassProperties............................................. 140 GetControlInfo...........................................................................186
AllowJava......................................................................................... 140 GetCreateClose........................................................................188
Background .............................................................................. 140 GetFirstChild..............................................................................187
BackImage...................................................................................... 140 GetHelpHandler..............................................................................189
BorderWidth.............................................................................. 141 GetHelpReference ...................................................................190
CloseImage............................................................................... 141 GetHelpTarget.................................................................................192
CreateCaption........................................................................... 141 GetMenubarFeq.............................................................................191
CreateClose.............................................................................. 142 GetPageImage...............................................................................192
CreateToolbar ................................................................................ 142 GetShowMenubar............................................................................... 194
DefaultButton ............................................................................ 143 GetShowToolbar.................................................................................. 194
DefaultButtonNeeded............................................................. 143 GetTableAttributes .........................................................................195
DisabledAction.......................................................................... 144 GetTargetSecurity..........................................................................195
Files ...................................................................................... 144 GetToolbarFeq................................................................................196
FormatBorderWidth...................................................................... 145 GetToolbarMode ............................................................................199
GroupBorderWidth ....................................................................... 145 GetWebActiveFrame ......................................................................... 198
HelpDocument............................................................................... 145 Init .................................................................................... 200
HelpEnabled ............................................................................. 146 Kill ..........................................................................200, 201
HelpRelative.............................................................................. 146 ResetFromControls.......................................................................200
HelpStyle ................................................................................... 146 SetBackground.........................................................................201
HtmlOption ................................................................................ 147 SetCentered ..............................................................................202
IsSplash..................................................................................... 147 SetChildDefaults .......................................................................202
MenubarFeq ................................................................................... 148 SetFormatOptions....................................................................203
MenubarType................................................................................. 148 SetHelpDocument .........................................................................204
OptionBorderWidth....................................................................... 148 SetHelpURL.....................................................................................205
PageBackground.......................................................................... 149 SetPageBackground ....................................................................206
PageImage ..................................................................................... 149 SetPassword ...................................................................................207
Server......................................................................................... 149 SetSplash...................................................................................208
SheetBorderWidth ........................................................................ 150 SetTimer.....................................................................................209
SnapX ............................................................................. 150 SuppressControl ............................................................................210
SnapY ............................................................................. 150 TakeCreatePage ................................................................................. 211
TimerAction............................................................................... 151 TakeEvent............................................................................................... 212
TimerDelay...................................................................................... 151 TakeRequest......................................................................................... 213
ToolbarFeq...................................................................................... 152 TakeUnknownSubmit......................................................................... 214
WebWindowClass .............................................................................. 131 TitleContents .............................................................................215
WebWindowClassMethods............................................................. 165 ValidatePassword ..........................................................................216
AddControl ................................................................................ 167 WebWindowClassProperties ......................................................162
AddControlsToLayout.................................................................. 169 Authorize ....................................................................................162
BodyFooter...................................................................................... 170 AuthorizeArea............................................................................163
BodyHeader ................................................................................... 171 HtmlTarget........................................................................................163
CreateChildHtml....................................................................... 172 IsCentered .................................................................................163
CreateDummyHtmlPage..................................................................173 IsSecure .....................................................................................164
CreateHtmlPage............................................................................ 174 SentHtml.....................................................................................164
648 IBC LIBRARY REFERENCE
NOTES
650 C L A R I O N IBC LIBRARY REFERENCE
NOTES 651
652 C L A R I O N IBC LIBRARY REFERENCE
NOTES 653
654 C L A R I O N IBC LIBRARY REFERENCE