At once I will say that I use SpEL on JSP, to select the necessary data for display.
Suppose we have:
public class Foo {List<Bar> listBar;...} Somewhere in the controller:
List<Foo> listFoo = ... model.addAttribute("listFoo", listFoo); How to write SpEL to get a List<Bar> from the entire collection? Can be obtained from a single item:
<spring:eval expresson = "foo.listBar"/> You can get a List<List<Bar>> :
<spring:eval expresson = "listFoo.![listBar]"/> but it is a two-dimensional array. And it is necessary to glue these collections together, getting one-dimensional, as if we used the addAll(Collection c) method for the new collection.
Is it possible to do this somehow?