Template Object Properties

Please refer to the following table for detailed description of Objects and their properties for use with Template Tags.

 

I. Objects

Project Description
CTRL Control Object
PROJ Project Object
DB Database Object
TABLE Table Object
FIELD Field Object
LANG Language Object

Note:
You can view the object properties by opening your Project File with a text editor. Project file is an XML file, each object is represented by an XML node in the project file. The object properties are saved as attributes of the node. The property name is same as the attribute name.

 

II. Properties

You can use the standard dot notation to access properties of the objects.

Example

<!--##=PROJ.ProjName##-->

This line will write the project name in the output file.

CTRL Object

Property Description Data Type
CtrlId ID (e.g. list, summary, crosstab, etc.) String

 

PROJ Object

Property Description Data Type
ProjName Project Name String
Cache Allow Cache Boolean
OutputNameType

Output File Name Type:
"" - None
"Prefix" - Prefix
"Suffix" - Suffix

String
OutputNameExt Output File Name Prefix or Suffix String
OutputNameLCase Output File Name in lowercase Boolean
Template Template File location String
Destination Output Destination Folder location String
DefaultDateFormat

Default Date Format:
0 - General Date (System)
1 - Long Date (System)
2 - Short Date (System)
3 - Long Time (System)
4 - Short Time (System)
5 - "yyyy/mm/dd"
6 - "mm/dd/yyyy"
7 - "dd/mm/yyyy"
9 - "yyyy/mm/dd hh:mm:ss"
10 - "mm/dd/yyyy hh:mm:ss"
11 - "dd/mm/yyyy hh:mm:ss"

Integer
DateSeparator Date Separator: /, -, . String
AutoSync Auto Synchronize when open project Boolean
CreateVDir Create Virtual Directory Boolean
AutoBrowse Browse after Generation Boolean
OtherGen Generate Other Scripts Boolean
OtherOverwrite Overwrite Other Scripts Boolean
PromptOnOverwrite Prompt on Overwrite Boolean
DynamicLoadDB Load Database Dynamically Boolean
AppRootFolder Application root folder String

 

DB Object

Property Description Data Type
DBName Database Name String
DBHost Host String
DBPort Port Integer
DBUID User ID String
DBPwd Password String
DBQuoteS Database Start Quote Character String
DBQuoteE Database End Quote Character String

 

TABLE Object

Property Description Data Type
TblSeq Table ordering sequence Integer
TblName Table Name String
TblType Table Type (TABLE/VIEW/CUSTOMVIEW) String
TblKey Table Key String
TblGen Table Generate Boolean
TblCaption Table Caption String
TblVar

Table Variable Name

String
TblFilter Table Filter String
TblOverwrite Overwrite Table Scripts Boolean
TblLoaded Table is Loaded Boolean
TblCustomSQL Table Custom SQL (Custom View) String
TblCustomError Error loading Custom View / Report String
TblRowCustomFunction Custom function to customize a row (as XML element) String
TblCustomFunction Custom function to format the XML document String

 

FIELD Object

Property Description Data Type
FldSeq Field ordering sequence Integer
FldName Field Name String
FldType Field Data Type Integer
FldSupport Field Supported Boolean
FldSize Field Size Integer
FldUniqueIdx Field has unique index Boolean
FldReq Field Required Boolean
FldAutoIncrement Field is Auto Increment Boolean
FldAttribute Field ADO Attributes Long
FldGenerate Field Allow Generate Boolean
FldList Field Allow List Boolean
FldSearch Field Allow Search Boolean
FldCaption Field Caption String
FldVar Field Variable String
FldViewTag Field View Tag String
FldFmtType Field Format Type:
"Currency" - format as currency
"Date/Time" - format as Date/Time
"Number" - format as number
"Percent" - format as percent
"String" - format as string
String
FldDtFormat Field Date Format:
See Project/DefaultDateFormat for details
Integer
FldNumDigits Field number of digits after decimal Integer
FldIncLeadDigit Field include leading digit Integer
FldUseParen Field use parenthesis for negative Integer
FldGpDigits Field group digits Integer
FldHrefFld Field Hyperlink to field String
FldStrFunc Field String Function String
FldQuoteS Field Start Quote Character String
FldQuoteE Field End Quote Character String
FldOrderBy Field Ordering Sequence Integer
FldOrder Field Order Type (ASC/DESC) String
FldMemoMaxLength Memo field max. length in list page Integer
FldAsElement Field output as XML element Boolean
FldAsAttribute Field output as XML attribute Boolean
FldIsCDATA Field output as XML CDATA Boolean
FldAsElementValueType

0 - Original
1 - Formatted

Integer
FldAsAttributeValueType 0 - Original
1 - Formatted
Integer
FldNullValue String representation of null value String
FldNullHandleType 0 - Empty
1 - Omit
2 - Null Value
3 - XML Schema
Integer
FldFmtFunction Custom function format the field value String
FldCustomFunction Custom function to customize the field (as XML element) String

 

LANG Object

Method Description Data Type
Phrase Method to retrieve a phrase in the language file String

 

Note that this object is different from above objects. There is only one method, no properties. To get a language phrase, use the following syntax:

LANG.Phrase(phraseid)

Example

<!--##=LANG.Phrase("BackToFile")##-->

This is equivalent to:

<!--##@BackToList##-->

This line outputs the phrase "BackToList" as defined in the lang.xml. If the lang.xml file contain the node:

<phrase id="BackToList" value="Back to List"/>

The line write "Back to List" to the output file.

 

 


 ©2008 e.World Technology Ltd. All rights reserved.