
|
WaterWare Reference & User Manual |
WaterWare On-line Manuals
| Release Level | 6.2 |
Release Date | 2010 05 |
Revision Level | 1.0 |
|
|
Document was last modified on:
Monday, 20-Jul-09 14:05 CEST
|
Object TEMPLATE PARSER
The display and editing of OBJECTS is controlled by TEMPLATES;
In the TEMPLATE, DESCRIPTORs are referenced and displayed by a set of simple "tags"
that are parsed when the OBJECT is instantiated through the TEMPLATE
from the data base. The parser "language" also supports simple calculations.
- \text(DESCRIPTOR_NAME)
creates a textfield with the given DESCRIPTOR_NAME and tries to
fetch the stored VALUE from the DATA Table.
If the DESCRIPTOR has a symbolic RANGE definition it creates a pulldown-menu
with the symbolic values.
- \value(DESCRIPTOR_NAME)
fetches and displays the value of the DESCRIPTOR from the DATA-Table
- \name(DESCRIPTOR_NAME)
fetches and displays the display-name from the DESCRIPTOR-definitions
- \unit(DESCRIPTOR_NAME)
fetches and displays the unit of the DESCRIPTOR from the DESCRIPTOR-definitions
- \ask(DESCRIPTOR_NAME)
creates a trigger for the ASKBOX. When leaving the ASKBOX with the SAVE-Button,
the value is directly stored to the DATA Table (HOW TO DEFINE AN ALTERNATIVE ?)
- \askDate(DESCRIPTOR_NAME)
Provides a calendar box from which a date value can be set for the DESCRIPTOR parameter.
The date format is YYYY-MM-DD.
A null value DESCRIPTOR will display the string "undefined".
- \textarea(DESCRIPTOR_NAME)
creates a textarea input field;
The textarea will show the current value of DESCRIPTOR as a string.
The DESCRIPTOR (if defined in the KnowledgeBase must be of type VARIABLE,
or undefined (only in the RBO DATA TABLES).
The size, format and other properties can be set using the
\style(..css_format..) function call.
- \include(FILE)
includes the given FILE. PATH is relative to RBO/
- \style(STYLE)
adds the given STYLE (eg:width:100px;) to the next command (like \text or \textarea)
Any valid Custom Style Sheet (CSS) formating text can be used as argument
and formats the subsequent object accordingly.
- \format(\value(DESCRIPTOR); type)
Will format the value of the given DESCRIPTOR to the format type, where type is any legal floating
point format. eg. \format(\value(DESCRIPTOR);%.1f) returns a numeric value of the DESCRIPTOR to the
first decimal place.
- readonly
Marks a text field, text area, variable or any such component as not editable.
readonly uses no parameters.
Example: <input type="text" name="readonlyTextName" value="readonlyTextValue" readonly>
- \execute(CGI_FILE)
This will enable the caller to execute the functions?| embedded in the .cgi file parameter, the
results of which is used in the parser.
- \executeParsed(CGI_FILE)
This will generate dynamic .html files from the .cgi document and
then parse the function calls within it.
- \sum(\value(DESCRIPTOR); \value(DESCRIPTOR2); ...;...)
Returns the sum of any number of (numerical) DESCRIPTOR values.
- \mul(\value(DESCRIPTOR); \value(DESCRIPTOR2))
returns the result of multiplying the values of the given DESCRIPTOR parameters
- \sub(\value(DESCRIPTOR); \value(DESCRIPTOR2))
will subtract the value of DESCRIPTOR2 from DESCRIPTOR
- \div(\value(DESCRIPTOR); \value(DESCRIPTOR2))
will divide the value of DESCRIPTOR by DESCRIPTOR2, can be used for normalising Descriptors
(e.g., X per capita etc.)

| print page
|