I\'m having some trouble with this...
I have code like this:
Market market = new market();
List list = marketService.getMarketItemList
If you cannot create a map, so if you need to work with a list, you can check the previous value.
You can create a variable containing the previous value and check for that:
${type eq previousType ? '-same-' : type}
Or, you could use the index using the varStatus
attribute:
${status.index gt 0 and types[status.index - 1] eq types[status.index] ? '-same-' : type}
Here you could also use not status.first
instead of status.index gt 0
.
Both will output:
fruit
-same-
vegetable