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

Leonardo Uribe commented on MYFACES-4029:
-----------------------------------------

The behavior of c:forEach tag has been studied for a long time. See:

- MYFACES-3811
- MYFACES-3570
- MYFACES-3389
- MYFACES-3329

Partial State Saving (PSS) algorithm relies on the fact that you can build the 
view in the same way as the first request. c:forEach serialize the values 
because that is a necessary requeriment to restore the view correctly, there is 
no workaround for that. 

Historically, jsp implementation of c:forEach serialize the values, but in 
facelets 1.1.x, the implementation forgot that important detail. 

The problem here is the old code that comes from facelets 1.1.x is not a good 
implementation, because that implementation breaks the view state. There are 
plenty of use cases we have found where the use of that implementation breaks 
the view state and then we can see a lot of different exceptions.

Please remember that MyFaces Core wants to be a fully JSF compliant 
implementation but that does not mean to be "bug compatible" with Mojarra. 

The new implementation in MyFaces 2.2.x is fully aligned with PSS algorithm, 
which means the view state size is the smallest possible. The old 
implementation required to restore the content fully. 

The best we could do is add a web config param to use the 2.1.x version, but 
the default implementation will not be changed.

> Updating a value within c:forEach not possible when using MyFaces and Spring 
> Webflow
> ------------------------------------------------------------------------------------
>
>                 Key: MYFACES-4029
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4029
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.9
>            Reporter: Johannes Grimm
>            Assignee: Leonardo Uribe
>         Attachments: faces-webflow-repeater-test.zip, 
> faces_(mojarra)-webflow-repeater-test.zip
>
>
> In a Spring Webflow project that uses MyFaces as view technology the update 
> of MyFaces from 2.1.17 to 2.2.9 breaks the update of a bound value within a 
> c:forEach tag.
> A complete example will be provided as attachment.
> Steps to reproduce the error:
> # Ensure the selected {{myfaces.version}} in the {{pom.xml}} is *2.2.9*
> # Start the application and open the respective website
> # Select _c:forEach (non-ajax)_
> # Activate the checkbox
> # Click _Apply_
> The value should change from _false_ to _true_ (or vice versa if it was 
> _true_ before) but nothing happens.
> The ajaxified c:forEach example doesn't work either. Only the ui:repeat 
> version works as expected.
> With _MyFaces 2.1.17_ all examples work as expected.
> I thought this might be a duplicate of MYFACES-4019 but that ticket has been 
> fixed for _MyFaces 2.2.9_ whereas the problem described above is still 
> present even with version _2.2.9_.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to