eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
160 stars 109 forks source link

ui:repeat with begin and end continuous increment #5150

Closed enjanjoe closed 1 year ago

enjanjoe commented 2 years ago

Description

Submitting the following form causes the repeat component to run two more times every time.

<h:form>
    <ui:repeat begin="1" end="5" varStatus="row">
        #{row.index}
    </ui:repeat>
    <br/>
    <h:commandButton value="Test"/>
</h:form>

Output on page load 0 1 2 3 4

Output on 1st submit 0 1 2 3 4 5 6

Output on 2nd submit 0 1 2 3 4 5 6 7 8

and it goes on.. using the step attribute with value > 1 causes even more erratic behavior.

Tested with WildFly 18.0.0.Final and Glassfish 5.0.1

melloware commented 2 years ago

Here is a runnable reproducer: mojarra-5150.zip

mvn clean jetty:run -Pmojarra23 and then navigate to http://localhost:8080/primefaces-test/test.xhtml

BalusC commented 1 year ago

Sorry, I created branch and fixed all 2 weeks ago but forgot to create PR.

BalusC commented 1 year ago

Merged into 2.3 and upmerged into 3.0 / 4.0