Contact | Privacy | Datenschutzerklärung | Impressum

defenv and defbody Tag

Format: <defenv TagName [ FormalParameterlist ] > heitml </defenv>
Format: <defenv TagName [ FormalParameterlist ] >< inherit ClassName1, ... > heitml </defenv>
Format: <defbody>

Purpose: The defenv tag defines a method (format 1) or class (format 2) that can be called by an environment tag, i.e. an HTML/XML like element with a content and an end tag or an empty element tag. The defenv tag can contain any mixture of HTML and heitml Tags including the special defbody tag.

When a tag named TagName occurs within a page, the body of the defenv tag is called and executed. As soon as the defbody tag is reached, the content of the TagName tag is called. defbody can be called zero, one, or many times.

The content of the call has the same local variables as the procedure containing the environment call. Using the defbody Tag inside the source code of the environment calls the content. Therefore defbody can so be used several times at any place inside the defenv, also within a loop or within other environments.

Unless defautoclose is used, the actual call must have an end-tag (e.g. <br>..</br>) or must be an empty- element-tag.(e.g. <br/>).

If there are multiple definitions for the same TagName, the textually last definition is active.

Parameter passing and redefinitions work as described in Methods. Output parameters are copied to the caller, each time the content is called and when the environment finally returns.

See Also: For a description of the inherit tag, see the inherit tag.

For example, environments are useful for defining Web Page layouts, etc. that control the "look and feel" of an application or module. A sample environment definition is as follows:

Example:

<defenv BODY>
  <ShowLogo>
  <ShowSlogan>
  <defbody>
  <ShowEmailAddress>
  <ShowCopyrightMessage>
</defenv>

Now that the environment has been defined, it can be called as follows:

Example:

<BODY>
  <Procedure1>
  <Procedure2>
  <ProcedureN>
</BODY>

When the environment is called as in the above example, it begins by issuing calls to the <ShowLogo> and <ShowSlogan> procedures, then continues by executing Procedures1,2,N which are called automatically by the defbody Tag contained within the environment definition. After the last Procedure has been executed, the environment issues calls to the <ShowEmailAddress> and <ShowCopyrightMessage> procedures before exiting.

Note: The defenv Tag is Case Sensitive, which means heitml will not recognize it if you use capital letters (e.g. <DEFENV IdName>).

This page was dynamically generated by the web application development tool RADpage of H.E.I. See "Was ist AJAX? " (in German). In Germany H.E.I. provides Webdesign in Mannheim and Web Programming (Programmierung).
© 1996-2024 H.E.I. All Rights Reserved.



Homepage
Intro/Features
Component Guide
Programming
  Language Guide
  Language Ref.
    General Design
    Lexical Structure
    Expressions
    Objects
    Methods
    Classes
    heitml Tags
      ? Tag
      assign Tag
      break Tag
      callenv Tag
      dbdatabase Tag
      dbquery Tag
      dbupdate Tag
      def Tag
      defautoclose Tag
      defbody Tag
      defclass Tag
      defcontpara Tag
      defenv Tag
      defhtml Tag
      definpara Tag
      defpara Tag
      defremovecdata Tag
      deftranspara Tag
      defwysiwyg Tag
      for Tag
      forin Tag
      forsep Tag
      if Tag
      elsif Tag
      else Tag
      include Tag
      includeonce Tag
      inherit Tag
      let Tag
      mail Tag
      return Tag
      shell Tag
      while Tag
      writefile Tag
      \ Tag
    heitml Functions
    Advanced Functions
    Database Access
    Global Variables
    Form Fields
    Server Variables
    Sessions
    heitml Syntax
  Component Ref.
  Class Library
  User Components
  Tutorial
  New Features
  heitml 1
User Guide
Services
Privacy
Datenschutz
 
Contact / Impressum