Nested ui:repeat element miscounts
Nested ui:repeat element miscounts
Environment Details
- GlassFish Version (and build number): glassfish-6.1.0
- JDK version: openjdk-17.0.3+7
- OS: Win10
- Database:
Problem Description
A nested ui:repeat within another ui:repeat element does add 1 to the end at each loop.
Steps to reproduce
<div style="display: flex; flex-direction: row; flex-wrap: nowrap;">
<ui:repeat begin="0" end="5" step="1" var="x">
<div style="display: flex; flex-direction: column; flex-wrap: nowrap;">
<ui:repeat begin="0" end="5" step="1" var="y">
<div> [#{x}|#{y}] </div>
</ui:repeat>
</div>
</ui:repeat>
</div>
output:

Minimal Example
... a maven/netbeans-project. URL: http://localhost:8080/uirepeat-example/index.xhtml
Impact of Issue
Please prepare MCVE.
I added a minimal example project to the bug-report. It is attached too.
Regards
On 06.01.23 11:24, Piotrek Żygieło wrote:
Please prepare MCVE https://stackoverflow.com/help/minimal-reproducible-example.
— Reply to this email directly, view it on GitHub https://github.com/eclipse-ee4j/glassfish/issues/24224#issuecomment-1373441602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT3B7UE3UFNCZPHYHBZQM4DWQ7XF7ANCNFSM6AAAAAATS2QKYQ. You are receiving this because you authored the thread.Message ID: @.***>
I added a minimal example project
Reproduced the same with GF 7.0.0.
For me it seems to be something around https://github.com/eclipse-ee4j/glassfish/blob/be8cf0734686a7f7023c4e9c4a373d341d809a1a/impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java#L99-L114
As GF integrates Mojarra - I think this issue should be transferred there, to continue discussion in the upstream. (@arjantijms @m0mus @edbratt - I'm not privileged to do that.)
It looks that handling of begin, end (perhaps step as well) is incorrect.
MyFaces 3.0.2 implementation works with nested repeats with begins and ends just fine.
As GF integrates Mojarra - I think this issue should be transferred there, to continue discussion in the upstream.
@arjantijms @m0mus @edbratt - maybe it was fixed in mojarra already?
As GF integrates Mojarra - I think this issue should be transferred there, to continue discussion in the upstream.
@arjantijms @m0mus @edbratt - maybe it was fixed in mojarra already?
I do remember something like this being addresses. @balusc
Was you thinking of https://github.com/jakartaee/faces/issues/1713? Not sure if related but I haven't worked on anything else ui:repeat related recently.
This issue has been marked as inactive and old and will be closed in 7 days if there is no further activity. If you want the issue to remain open please add a comment
7.0.15 produces:
which I believe is fine.
Magic.