How to repeat output of text via simple for loop in Facelets without model?

后端 未结 2 1455
轻奢々
轻奢々 2021-01-30 17:48

How to repeat output of some content in JSF using only standard tags (ui:, h: etc) ? In other words - how to do equivalent to PHP code below in JSF ? I immediat

2条回答
  •  野的像风
    2021-01-30 18:42

    Since it needs a collection, you can make a collection (containing as much elements as the number of time you want to output the divs) in the backing bean:

    public class MyBean {
      private List list = new ArrayList

    and then:

    
      
    content

    ..which would output as many divs as the size of the list property.

提交回复
热议问题