Dynamic Label (Document Template)

Last update: Edit

1 Introduction

A dynamic label is used for the same kind of attributes as a text box from the page editor. It can be used to display a text value.

2 Appearance Properties

2.1 Style

For details, see Style.

2.2 Render XHTML

If you set the property ‘Render XHTML’ to true, the attribute connected to this label is assumed to contain XHTML and will be rendered as such. This is useful when you want to incorporate rich text in a document template. This property can only be true for attributes of type String.

The contents MUST be valid XHTML to render without errors.

Default: False

2.3 Decimal Precision (Only for Decimal Attributes)

The precision of a value is defined by the number of digits that is used to express that value. This property indicates the number of decimal places (the number of digits following the decimal point) that will be rendered in the widget.

Default: 2

2.4 Group Digits (Only for Numeric Attributes)

For ease of reading, numbers with many digits in front of the decimal separator may be divided into groups using a delimiter. This property defines whether the end-user will see these groups, or not.

Default: False

2.5 Date Format (Only for Attributes of Type Date and time)

The date format determines whether the date part, the time part or both are shown. How the date and time parts are formatted depends on the localization of the user using the application.

These are the possible values:

  • Date (default)
  • Time
  • Date and time
  • Custom (see below for more details)

2.6 Custom Date Format (Only for Attributes of Type Date and time)

If you choose Custom as the date format (see above), this property determines how the attribute value is formatted. The custom date format is a string that allows for any combination of symbols found in the table below. Any punctuation will be rendered literally.

All examples are for 30th December 2014, at 00:27:16.789

Symbol Example Description
G AD The era
y, yyy, yyyy, etc. 2014 Year
yy 14 Year
Y, YYY, YYYY, etc. 2015 Week year, use in combination with w for week number formatting
YY 15 Week year, use in combination with w for week number formatting
M, MM* 12 Month number
MMM Dec Month abbreviation
MMMM December Month name
w, ww* 1 Week of year, use for week number formatting
d, dd* 30 Day of month
D, DD, DDD 364 Day of year
a AM AM or PM
h, hh* 12 Hour (1-12)
H, HH* 00 Hour (0-23)
k, kk* 24 Hour (1-24)
K, KK* 00 Hour (0-11)
m, mm* 27 Minute
s, ss* 16 Second
S, SS, SSS 789 Milliseconds
E, EE 05 Day of week number
EEE Tue Day of week abbreviation
EEEE Tuesday Day of week name
X 08:00 Time zone parsed
Z, ZZ, ZZZ -04:00 Time zone offset
ZZZZ GMT-04:00 Time zone offset and standard

*Two characters pads with zero

These are some examples:

Format Example Output
EEEE d MMMM yyy G, h:mm a ss's' Tuesday 30 December 2014 AD, 12:27 AM 16s
h:mm a 12:27 AM
yyy D KK:mm 2014 364 00:27
EEEE MMMM d yyy Tuesday December 30 2014
EEE, MMM dd, ''yy Tue, Dec 30, ‘14
EEEE, 'week' ww YYYY Tuesday, week 01 2015

3 Common Properties


The internal name of the widget. You can use this to give sensible names to widgets. The name property also appears in the generated HTML: the widget DOM element automatically includes the class mx-name-{NAME}, which can be useful for Selenium testing.

4 Data Source Properties

4.1 Attribute (Path)

The attribute (path) property specifies which attribute will be shown in the dynamic label.