Search code examples
formsofbiz

How to check empty list in Forms Ofbiz?


I'm using service to generate a List Object and set to a field in Froms, but how to check this list empty or not ?. In this case, I want to check it in use-when attribute of another field.

Thanks!


Solution

  • You can actually invoke Java methods inside use-when directive that return a boolean true/false with something like:

    use-when="mylist.isEmpty()"