0

I have a page that have 2 ui:repeat to iterate a complex collection. I need add commandlinks that will update some of the data on the page without refresh the whole page. The code is like the following:

<h:panelGroup id="panel1">
#{backBean.getNumber()}
</h:panelGroup>
<h:form>
    <a4j:commandlink action="#{backBean.increaseNumber()}" reRender="panel1" />
</h:form>
<ui:repeat value="#{masterlist}" var="list">
    <ui:repeat value="#{list}" var="element">
        #{element.description}
    </ui:repeat>
</ui:repeat>

I can see the increaseNumber() method is called and the number is updated, but panel1 is not re-rendered. If I remove one ui:repeat tag and then it will work. I did research online and it seems there are issues with nested ui:repeat, but I couldn't find any solution.

Aritz
  • 30,971
  • 16
  • 136
  • 217
  • An easy alternative would be to change your `{masterlist}` and let be an only list in order of list of lists (using auxiliar list if you need it). Another chance is to try it using `c:foreach`. – Aritz May 01 '13 at 16:06
  • I tried replacing one or both ui:repeat with c:foreach and it didn't work. If possible I'd like to avoid changing masterlist to be one layered list as the actual display of data is much more complicated than I illustrated here. – Pruedence He May 01 '13 at 19:34

1 Answers1

0

I figured it out. Replace ui:repeat with a4j:repeat worked.