 |
|
|
|
| |
|
|
| Meta Templates |
|
|
| |
|
| |
|
| |
|
| |
|
| |
Node attributes available to
the meta-template |
|
|
|
|
 |
When the zeroCode HTML emitter expands
a meta-template to create HTML, it uses a data structure that represents
the entire UDM tree. The root of this data structure is referred to as root,
and all its descendants are accessible via its attributes. For example,
the expression root.children[“0”].descriptiondenotes (at meta-template expansion
time) the printable description of the first child of the root. |
| |
|
| |
The following is a list
of all the attributes available for each node. You can use any of these
attributes in your meta-templates, using them to access meta-information
about the nodes that you retrieve information from at the time of template
expansion.
|
| |
|
| |
UDM-level attributes |
|
| |
| |
udmName |
Name of the UDM, not including its path |
| |
udmFullName |
Full UDM name, including path |
| |
udmAction |
The action verb associated with the UDM: either editAction or deleteAction |
| |
hasBlobAttribute |
Set to “1” if there is some UDM node corresponding to a modifiable blob in the database. This is needed because such a UDM needs a form with the multipart/form-data encoding. |
| |
hasUpdateNodes |
Set to “1” if the UDM contains at least one modifiable node (i.e., node with write mode). |
| |
deleteNodes |
List of UDM nodes that have delete mode enabled. |
| |
root |
The data model for the root node of the UDM tree. |
| |
zeroCodeVersion |
A string identifying the zeroCode version of the expansion engine. |
| |
| |
Node level Attributes |
| |
| |
id |
The
node ids |
| |
name |
The
node name |
| |
description |
Description
(i.e., printable form) |
| |
type |
Java
data type of the node |
| |
tagName |
Tag
name (the magic name with dashes in it, used for the input tag if one is
produced for this node) |
| |
listElementName |
The
name that should be used in the "as" clause of a FreeMarker list
tag, if this node is a vector node |
| |
fullyQualifiedName |
The
"fully qualified" name of the node, e.g., "addUser.user.name"
-- the names of the node and its ancestors, strung out in order from the
root |
| |
isVector |
"1"
if this node is a vector node, “0” otherwise |
| |
displayType |
The
display type: a string which has one of these values (case sensitive):
|
none |
textbox |
radioGroup |
|
dropDownList |
bulletList |
table |
|
hiddenField |
plainText |
checkbox |
|
textArea |
dateOnly |
timeOnly |
|
| |
extendedType |
[Added October
3rd, 2000] The “extended” type of this node, if this node has
a primitive data type. Currently the value is one of the following:
|
none |
text |
integer |
|
decimal |
date |
money |
|
US phone |
US zip code |
US soc sec no |
|
internationalPhone |
|
|
|
|
tableName |
The
database table name from which the value is obtained, if this node (or its
parent, if this node is an attribute) uses the database as its data port |
|
isPrimaryKey |
“1”
if this is node represents the primary key of its parent’s table; undefined
otherwise |
|
kind |
Defined if
this node is for a database element, as one of three literal strings (case
sensitive):
|
primaryKey |
If this node is
the primary key |
|
foreignKey |
If this node is
a foreign key |
|
attribute |
f it is neither
primary key nor foreign key |
|
reverseKey |
If this is a reverse
foreign key (used only in the list and browse-by UDMs) |
|
|
attributeChildren |
List
of attribute children of this node |
|
nonLeafChildren |
List
of non-leaf children of this node |
|
nonAttrLeafChildren |
List
of leaf children that are not attributes if this node |
|
children |
List
of all children |
|
parent |
Attributes
of this node’s parent (Added Aug 21, 2000) |
|
hasVectorAncestor |
"1" (For non-attribute nodes only) if this node has a vector ancestor, undefined otherwise |
|
vectorAncestorId |
(For non-attribute nodes only) The node number of the lowest vector ancestor if this node has a one, undefined otherwise |
|
childByName |
Hashtable
of all children, allowing access to children via name rather than via index.
For example, root.childByName[“Book”] refers to the root child with name
“Book” if there is one. The expression is undefined if there is no such
child. |
|
dataPortClassName |
The Java class name of the data port for this node, if any. |
|
dataPortName |
The name of the data port used for this node, if any. |
|
expressionString |
If the node uses the expression data port, this value is the expression associated with the node. Otherwise, this value is not defined. |
|
whereClause |
Contains the node |
|
filters |
Provides a list of filters used at this node, if the node uses the database data port. Each filter is represented in this list by the values name (the name of the filter), whereClause (the where clause associated with the filter, not including any group-by or having clauses), and sqlString (the full SQL string for the filter including any group-by or having clauses). For example, if x is a node reference in the FreeMarker meta-template, the following code produces the full retrieval condition for x:
$ {x.whereClause} <if x.whereClause> <assign and = “and”> </if>
<list x.filters as f> $ {and} $ {f.whereClause} <assign and = “and”></list> |
|
|
|
If this node is an attribute |
|
|
|
maxchars |
The
max # chars in the database representation of this attribute |
|
precision |
The
number of digits after the decimal point in the database representation.
This attribute is defined only for those database fields that have a non-zero
precision (typically ‘money’ fields). [Added August 21, 2000.] |
|
isNullable |
"1"
if this attribute is nullable, "0" otherwise |
|
isPrimaryKey |
"1"
if this node represents the primary key of its parent node's table |
|
isPartOfPrimaryKey |
"1"
if this node is part of the (composite primary key of the) parent node’s table; undefined otherwise |
|
foreignKeyToTable |
If
this node is a foreign key, the name of the table to which the key points;
undefined otherwise |
|
isReverseKey |
"1"
if this is a reverse foreign key. This is only meaningful in the standard
UDMs for list and browse-by |
|
hasReadMode |
"1" if this node has ‘read’ mode; undefined otherwise |
|
hasWriteMode |
"1" if this node has ‘write’ mode; undefined otherwise |
|
hasAddMode |
(only for non-leaf nodes) "1" if this node has ‘add’ mode; undefined otherwise |
|
hasDeleteMode |
(only for non-leaf nodes) "1" if this node has ‘delete’ mode; undefined otherwise |
|
isStorageDependee |
(only for leaf nodes) "1" if there is some other node in the UDM tree that has a storage dependence on this node |
|
sqlType |
The SQL type of the attribute node as declared in the site’s schema (e.g., NUMERIC or VARCHAR2). This makes sense only for attribute nodes. |
|
|
|
|
If this node is a non-leaf
representing a database table |
|
|
|
|
primaryKeyName |
The
name of the primary key column of the table |
| |
|
If this node represents a foreign key |
| |
|
derefValueNodeId |
The node id of the node containing the dereferenced value for this foreign key. |
|
derefTypeIsNumeric |
“1” if the dereference column (the column from the parent table being used to represent the foreign key) is numeric |
|
|
|
| |
|
| |
|
| |
|