[
https://issues.apache.org/jira/browse/MYFACES-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Andraschko resolved MYFACES-4774.
----------------------------------------
Resolution: Fixed
> UIData/UIRepeat lose per-row input state on a later re-render with errors
> -------------------------------------------------------------------------
>
> Key: MYFACES-4774
> URL: https://issues.apache.org/jira/browse/MYFACES-4774
> Project: MyFaces Core
> Issue Type: Bug
> Reporter: Thomas Andraschko
> Assignee: Thomas Andraschko
> Priority: Major
> Fix For: 5.0.0, 4.1.5
>
>
> Per the UIData.encodeBegin() javadoc, saved per-row state of child inputs
> must be discarded “unless it is needed to rerender the current page with
> errors”. It includes submittedValue, localValue, localValueSet and valid.
> MyFaces does keep this state (_rowStates) within the request in which
> validation failed. But UIData.saveState() and UIRepeat.saveState() leave
> _rowStates out when they run in RENDER_RESPONSE, which is when the view state
> is written. So it is lost for the next request. This has been the case since
> MYFACES-4048.
> Example: a validation error is followed by an ajax request that re-renders
> the table with ERROR or FATAL messages but doesn’t execute it. The row inputs
> then show the model values instead of the values the user typed. Mojarra
> keeps the typed values here, and the Faces 5.0 TCK is going to test for this.
> Fix: also save _rowStates in RENDER_RESPONSE. encodeBegin() already clears it
> when there are no ERROR/FATAL messages, so it is empty in the normal case and
> doesn’t make the view state bigger. _rowTransientStates stays request-scoped.
> Mojarra counterpart and reproducer: eclipse-ee4j/mojarra#6110 (see
> eclipse-ee4j/mojarra#6110 (Kommentar))
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)