1

I have a code that is similar to the following

<ui:repeat value="#{bean.listOfA}" var="a">
    ...
    <ui:repeat value="#{a.listOfB}" var="b">
        ...
    </ui:repeat>
</ui:repeat>

The problem is that the items are displayed randomly each time .. I would like them to be in the same order every time I load it.

any ideas?

LaurentG
  • 11,128
  • 9
  • 51
  • 66
sara.elkady
  • 29
  • 1
  • 7
  • What is the Java type of `bean.listOfA`? is it really a `List`? – LaurentG Feb 12 '14 at 12:03
  • 1
    The `` in the view is in the context of this question merely the presenter of the model. Your concrete problem is definitely not caused by ``, but by the way how you prepared the model. Perhaps you used `HashSet` instead of `LinkedHashSet` to collect the values? This is a classic beginner's mistake as to collecting the values in a desired order. – BalusC Feb 12 '14 at 12:12
  • ok thanks, u guys are right. I just forgot about that – sara.elkady Feb 24 '14 at 08:40

0 Answers0