ATTRIB

ATTRIB defines an attribute. It also controls databinding between an existing attribute in a tag being edited and the user interface in a Tag Editor or Tag Inspector. Also serves as input for Tag Insight and Tag Tips.

The following subjects are covered in this document:


Related information about VTML and WIZML:

Tutorial
The Visual Tool Markup Language (VTML)
Reference
VTML reference - overview
Context
ATTRIBUTES Section
Container for
ATTRIBOPTION
Related tags
CONTROL
CONTAINER

top

Tools

ATTRIB plays a role in the following VTML-driven tools:

  1. Tag Editor
  2. Tag Inspector
  3. Tag Insight
  4. Tag Tip

top


Location

The ATTRIB tag can occur only inside the ATTRIBUTES section.

top


Function

The ATTRIB tag has several functions:

  1. The combination of NAME and CONTROL creates the data binding between an existing attribute of a tag being edited and the display of that attribute value in a CONTROL in a Tag Editor.
  2. VTML 2NAME also creates the data binding between the attribute value and the display of that value in the property sheet of the Tag Inspector.
  3. VTML 2NAME creates an entry in the list of possible attributes in a Tag Tip.
  4. VTML 2TYPE controls the data type in Tag Inspector; this data type determines how the value can be edited here. For instance, a TYPE of Flag will result in a check box while TYPE Enumerated will result in a dropdown combobox (i.e., unlike a DropDown control which is not editable unless the EDITABLE flag is defined, the Tag Inspector dropdown is always editable).

In most cases, this is an empty tag. The exception is for TYPE Enumerated: in that case the tag is a container and must contain one or more ATTRIBOPTION tags to sum up the possible values.

top


Syntax and Attributes

Defaults indicated in bold.

<ATTRIB .../> or <ATTRIB ... TYPE="Enumerated"> </ATTRIB>
NAME The name of the attribute as it appears in HTML or VTML
CONTROL The name of the control in the visual editor to be associated with the attribute's value.
VTML 2TYPE The data type of the attribute in Tag Inspector.
Possible values:
  • Text (default)
  • Style
  • Color
  • Font
  • Filepath
  • Directory
  • Filename
  • Relativepath (see Usage Notes)
  • Flag
  • Enumerated
  • Queryname (CFS only)
  • Expression (CFS only)
VTML 2CACHEFAMILY (Optional) Will cause values already used (typed) to be cached in a class by this name so they can be re-displayed as an option.
There is a set of built-in classes:
  • Colors
  • FontFaces
  • FilePaths
  • Styles
  • Images
  • URLs
  • EventHandlers
  • QueryNames (CFS only)
  • CFExpressions (CFS only)
  • VerityCollections (CFS only)
  • DataSources (CFS only)
  • CFIncludes (CFS only)
Apart from that, any name can be used to create your own class.
Currently, caching works only for Tag Inspector, not for the controls in a Tag Editor or the dropdown lists in Tag Insight.
DEFAULT Obsolete.

top


Usage Notes

TYPE="Relativepath"
Tag Insight will always show a dropdown list with a hard-coded set of possible values. (Tag Inspector does the same but only for the HREF attribute in an A tag.) This list consists of a complete set of possible protocols to be used for a HREF attribute of the A tag or a SRC attribute of an IMG tag, as well as a "#" which can be used for a reference to a local anchor. Neither of these are actually relative  references in the strict sense. You can get round this behavior by either using the default Text type (no dropdown list) or using TYPE="Enumerated" and providing your own list.
Tag Inspector will allow the option of browsing local or remote file systems to determine the URL where TYPE="Relativepath" is defined, as will a Tag Editor; if a local path is chosen, the resulting reference will indeed be relative.

top