Expression Utilities
Thymeleaf will offer us a set of utility objects that will help us perform common tasks in our expressions.
- #dates : utility methods for java.util.Date objects: formatting, component extraction, etc.
- #calendars : analogous to #dates , but for java.util.Calendar objects.
- #numbers : utility methods for formatting numeric objects.
- #strings : utility methods for String objects: contains, startsWith, prepending/appending, etc.
- #objects : utility methods for objects in general.
- #bools : utility methods for boolean evaluation.
- #arrays : utility methods for arrays.
- #lists : utility methods for lists.
- #sets : utility methods for sets.
- #maps : utility methods for maps.
- #aggregates : utility methods for creating aggregates on arrays or collections.
- #messages : utility methods for obtaining externalized messages inside variables expressions, in the same way as they would be obtained using #{…} syntax.
- #ids : utility methods for dealing with id attributes that might be repeated (for example, as a result of an iteration).
Hinweis: Siehe Seite 74++ im PDF-Dokument für Beispiele mit den verschiedenen utilities.