Small refactor.
This commit is contained in:
parent
d2ffdec65f
commit
3b3931a9f6
@ -18,11 +18,7 @@ class Each extends DelegatingWebViewComponent {
|
|||||||
protected View getDelegate() {
|
protected View getDelegate() {
|
||||||
return { Writer w ->
|
return { Writer w ->
|
||||||
def cw = new DefaultComponentWriter(w, this.context.renderContext, this.context)
|
def cw = new DefaultComponentWriter(w, this.context.renderContext, this.context)
|
||||||
if (items instanceof Collection) {
|
if (items instanceof Collection || items instanceof Map) {
|
||||||
items.each {
|
|
||||||
cw << (transform ? transform(it) : it)
|
|
||||||
}
|
|
||||||
} else if (items instanceof Map) {
|
|
||||||
items.each {
|
items.each {
|
||||||
cw << (transform ? transform(it) : it)
|
cw << (transform ? transform(it) : it)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user