[ 
https://issues.apache.org/jira/browse/MYFACES-4222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435864#comment-16435864
 ] 

Paulo Cristovão de Araújo Silva Filho commented on MYFACES-4222:
----------------------------------------------------------------

Changed slightly your solution to put the setStep on the first if emptyModel 
branch (to pollute less the code).

Added a unit test that fails as described by [~paul.nicolucci] when the patch 
is not applied. Made a single patch with the 4 unit tests and the fix. Tested 
snapshot in a jsf/tomee application without issues.

The merged patch: [^MYFACES-4222-withtests.patch]

> MYFACES-4203 regresses ui:repeat , can't update the step
> --------------------------------------------------------
>
>                 Key: MYFACES-4222
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4222
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-372
>    Affects Versions: 2.3.0
>            Reporter: Paul Nicolucci
>            Assignee: Paul Nicolucci
>            Priority: Major
>             Fix For: 2.3.1
>
>         Attachments: MYFACES-4222-withtests.patch, MYFACES-4222.patch, 
> patch_4222_tests.diff
>
>
> For instance something like this would fail to work correctly if the step 
> were 2 it seems the step will always be 1. The initial page works as step is 
> initialized to 1 in the backing bean. However if you update the step to two 
> and submit the page it is still 1.
> {code:java}
> step: <h:inputText id="stepInput" value="#{iterationBean.step}"/>
>         <p/>
>         <h:panelGroup id="panel1">
>             <ui:repeat value="#{iterationBean.testList}" var="x" 
> begin="#{iterationBean.begin}" end="#{iterationBean.end}" 
> step="#{iterationBean.step}">
>                 #{x}
>             </ui:repeat>
>         </h:panelGroup>
>         <p/>
>         <h:commandButton id="button1" value="Test">
>             <f:ajax execute="@all" render="panel1" />
>         </h:commandButton>
> {code}
> Or removing ajax:
> {code:java}
> step: <h:inputText id="stepInput" value="#{iterationBean.step}"/>
>         <p/>
>         <h:panelGroup id="panel1">
>             <ui:repeat value="#{iterationBean.testList}" var="x" 
> begin="#{iterationBean.begin}" end="#{iterationBean.end}" 
> step="#{iterationBean.step}">
>                 #{x}
>             </ui:repeat>
>         </h:panelGroup>
>         <p/>
>         <h:commandButton id="button1" value="Test">
>         </h:commandButton>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to