Creating your own Components

Creating a component in heitml does not differ much from programming a user-defined tag. In addition a component must inherit the class SimpleComponent or SimpleInlineComponent.

Example 1:

<def mylogo l; inherit SimpleInlineComponent; 
   ><b><i>My</i><? l></b><

<mylogo l="logo" />
resulting output:


The mylogo defined in the example above will be displayed with handles in the browser. It can be edited, as can any other component.

The component will not show up in the Insert menu of RADpage. Instead we recommend creating a page that contains prototypes of all user-defined components. If this page is displayed in another window, user components can easily be copied into the user pages.

Sometimes it is not useful to put the component handles around the component but it is better to place them somewhere inside. Then the class SimpleComponent can be inherited. The component body then must use the <_marker> tag to explicitly display the handles:

Example 2:

<defenv note nr; inherit SimpleComponent; 
   ><p><_marker><b>Note <? nr>:</b><defbody></_marker></p><

<note nr=55>This is an example.</note>
resulting output:

Note 55:This is an example.

We encourage you to browse through the heitml component libraries to see how components for RADpage are made.

You probably will notice that these components use the classes Component and InlineComponent instead of SimpleComponent and SimpleInlineComponent. This is because RADpage knows explicitly about these components from a component description file. These files are located in the control/comps directory. They contain parameter definitions and documentation of the component. For testing purposes you may create your own component description files, but be aware, that this is no official interface yet and probably will change in future versions.

This page was dynamically generated by the web application development tool RADpage of H.E.I.
© 1996-2017 H.E.I. All Rights Reserved.

Component Guide
  Language Guide
  Language Ref.
  Component Ref.
  Class Library
  User Components
  Tryout Form
  New Features
  heitml 1
User Guide
Discussion Group