The Component Reference - Basic Concepts
From a heitml programming point of view, a component used on a page is a call of a constructor that creates a heitml object. For each component kind there is a component class definition, contained somewhere in the heitml library. For example counter is defined in the file cocounter.hei library. This means components behave just like ordinary user defined heitml tags:
Component Live Time
When heitml processes a page that contains a component < comp > heitml will call the constructor method of the class named comp. This creates a heitml object of the comp class, or in short a comp-object. The comp class will then display the component (by generating the appropriate HTML code and exit). In the simplest case the comp object vanishes after this processing and so is not visible on the outside. An example is <counter>.
heitml features so called interactive components that accept user input. Examples for interactive components are a counter with reset button or a dbform. In the Internet context user input is sent to the Web server as a subsequent page request. For example the dbform is shown in a first page request. Then the user fills out the form and presses the submit button. This causes the browser to send the form data and another page request to the server. Interactive components remain active from the first page request until this second page request. Before the second page is processed by the server, the still existing interactive components process the information provided by the browser and perform the desired action. For example a dbform would store the data entered into the database.
Additionally there are so called persistent components. A persistent component is created the first time its page is displayed. It then stays active until it is explicitly deleted or until it becomes too old and expires. The iaContainer is such a persistent component, as is a dbform. A dbform keeps the field values. Even if the user goes to another page and comes back the dbform will still display the same data (unless explicitly triggered to display something else).
The functionality of certain components can be altered by adding own methods, called hooks. For example a checkrecord method can be added to a dbform to check the consistency of the data entered. iaButton and iaLink need a process method, that performs a user-defined action when the button or link is pressed.
The extend button of RADpage can be used to program these hook methods. When the extend button is pressed RADpage adds a new class definition to the page. The new class inherits from the component class. Then methods for the new class that override the default methods of the component class can be defined.
For example suppose there is a dbform on a page. Pressing extend adds a class definition
The component reference contains a list and descriptions of all available component hooks for each component.
© 1996-2021 H.E.I. All Rights Reserved.