0

Java List type does not have a getSize() method. Is there a way to tell reference the size() method in EL instead? I've tried #{aList.size > 10} but that is not working.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
eastwater
  • 4,624
  • 9
  • 49
  • 118

1 Answers1

1

Simply do #{aList.size() > 10} (suffix the method with parentheses).

Jasper de Vries
  • 19,370
  • 6
  • 64
  • 102
  • 1
    Noted should be that this requires a minimum of EL 2.2, but based on OP's question history OP is already using that. See also https://stackoverflow.com/q/3284236 – BalusC Jul 14 '22 at 08:08