(Quick Reference)

collect

目的
Purpose

Uses the Groovy JDK collect method to iterate over each element of the specified object transforming the result using the expression in the closure

使用例
Examples

Books titles:
<g:collect in="${books}" expr="it.title">
    <p>Title: ${it}</p>
</g:collect>

詳細
Description

属性

Attributes
  • in - The object to iterative over
  • expr - A GPath expression