Documentation
Getting Started
New Features
Component Guide
Programming
    Language Guide
    Language Ref.
    Component Ref.
    Class Library
    User Components
    Tryout Form
    Tutorial
    heitml 1
User Guide
Registration
Frame
    

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:

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

<mylogo l="logo">
resulting output:

Mylogo

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:

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

<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 heitml
© 1996-2008 H.E.I. All Rights Reserved