28

I can't find on the tutorial the difference between this two instructions.

th:field="${something}" and th:field="*{something}"

Can anyone show me some example?

NeptuneZ
  • 608
  • 1
  • 10
  • 23
Dave
  • 1,428
  • 4
  • 31
  • 49

1 Answers1

70

Reference site

Five types:

  • ${...} : Variable expressions. These are OGNL expressions (or Spring EL if you have spring integrated)

  • *{...} : Selection expressions. Same as above, excepted it will be executed on a previously selected object only

  • #{...} : Message (i18n) expressions. Used to retrieve locale-specific messages from external sources

  • @{...} : Link (URL) expressions. Used to build URLs
  • ~{...} : Fragment expressions. Represent fragments of markup and move them around templates
Anand Rockzz
  • 6,072
  • 5
  • 64
  • 71