0

I have a table and I want to change a column, the column contains a string. For example: "this is my string" --> "this is my...". I try to do this whith abbreviate().

<td th:text="${#strings.abbreviate( ${fgp.explanation}, 10)}"></td>

But I receive this error : EL1043E: Unexpected token. Expected 'rparen())' but was 'lcurly({)'. S{fgp.explanation} contains the string

abc
  • 494
  • 1
  • 8
  • 27

1 Answers1

2

Your syntax needs to be corrected.

The general case is: ${#strings.abbreviate(str,10)} so you would want:

<td th:text="${#strings.abbreviate(fgp.explanation, 10)}">[this is my...]</td>

riddle_me_this
  • 8,575
  • 10
  • 55
  • 80