2
<ui:repeat value="#{cmsBean.cmsVo.attributesList}" var="attribute">

<ul>
    <li>
       <div>"#{attribute.name}"</div>

    </li>
</ul>

</ui>

Now I have to create separate lists from attributeList , <ul> based on value of #{attribute.attributeType} , how can I use do it.

1 Answers1

1

Simply do the same thing as you have done before, but now using the new attribute as the "name" property of the ui:repeat.

<ui:repeat value="#{cmsBean.cmsVo.attributesList}" var="attribute">
    <ui:repeat value="#{attribute.newList}" var="newList">
    </ui:repeat>
</ui:repeat>

A similar question along with a sample code can be found here: How to use <ui:repeat> to iterate over a nested list?

Simply do the same thing as you have done before, but now using the new attribute as the "name" property of the ui:repeat.

<ui:repeat value="#{cmsBean.cmsVo.attributesList}" var="attribute">
    <ui:repeat value="#{attribute.newList}" var="newList">
    </ui:repeat>
</ui:repeat>

A similar question along with a sample code can be found here: How to use <ui:repeat> to iterate over a nested list?

If you want to create a new html unordered list:

  1. Inside the same ui:repeat: simply begin it again, and you will have a nested unordered list.

    • item1
      • item2
  2. Outside the ui:repeat: you should save the list with the values in another variable inside the managed bean in order to access it (through a getter) as the property value of the second ui:repeat.

Community
  • 1
  • 1
andriosr
  • 481
  • 4
  • 12
  • hi @andriosr, thanks for answer. but I don't have multiple list , I have to create multiple multiple
      based on a field of var attribute , and attribute is a java list
    – user3664751 May 27 '14 at 13:02
  • I updated the answer, check if it is what you are looking for. – andriosr May 27 '14 at 15:40