0

While trying to render first element of set using quarkus qute template engine it is throwing the below xception.

io.quarkus.qute.TemplateException: Rendering error in template [index.html] line 93: Property "0" not found on the base object "java.util.LinkedHashSet" in expression {appDetails.imageUrls.0}

Code used to render

<img src="{appDetails.imageUrls[0]}" />
pvrforpranavvr
  • 2,708
  • 2
  • 24
  • 34

1 Answers1

0

Since as mentioned in the error imageUrls is of type Set. So use iterator().next() method to get the first element.

 <img src="{appDetails.imageUrls.iterator().next()}" />
pvrforpranavvr
  • 2,708
  • 2
  • 24
  • 34