You can wrapper your list with DecoratedCollection.
public List<TripImage> getExpImage() {
return expImage;
}
public void setExpImage(List<TripImage> expImage) {
this.expImage = expImage;
}
public DecoratedCollection<TripImage> getExtImage() {
if(this.expImage!=null) {
return new DecoratedCollection<>(this.expImage);
}
return null;
}
and in view:
{{#trip}}{{#extImage}}
{{index}}
{{#value}}{{imageId}}{{/value}}
{{/extImage}}{{/trip}}
or {{first}} {{last}}
Vào 23:22:58 UTC+7 Thứ Năm, ngày 17 tháng 5 năm 2018, Vinícius Carneiro đã viết: