[
https://issues.apache.org/jira/browse/MYFACES-4036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298713#comment-15298713
]
Leonardo Uribe commented on MYFACES-4036:
-----------------------------------------
Thinking about this issue and reading the comments, I have realized there is
something wrong in the current UIData implementation.
The problem is call saveState(...) and restoreState(...) at the end on invoke
application phase could lead to inconsistencies. The reason is there is some
information in _rowStates that is not saved with the state, so when the state
is restored in the render request, that information is lost, which means the
input values are not persisted when validation fails.
In other words, UIData state saving algorithm must be stable under this
scenario (action request - render request). I need some time to think about it
and fix it, so I'll answer the question about how to do it properly when I have
solved this issue.
> UIData state is not restorable when rowStatePreserved is set to true
> --------------------------------------------------------------------
>
> Key: MYFACES-4036
> URL: https://issues.apache.org/jira/browse/MYFACES-4036
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.2.10-SNAPSHOT
> Environment: WebSphere Liberty 8.5.5.8, MyFaces 2.2.8, IBM JSF
> Portlet Bridge 1.0
> Reporter: Hank Ibell
> Priority: Minor
>
> A JSF portlet with input fields inside a h:dataTable component will lose
> their local values if validation fails, even when rowStatePreserved is set to
> true.
> The IBM JSF portlet bridge calls processSaveState() on UIViewRoot so that the
> bridge can restore the view state on their RENDER request. After looking at
> UIData, it looks like _initialDescendantFullComponentState is lost between
> Portal's ACTION and RENDER requests (a new UIData object is created on the
> RENDER request). Unfortunately, UIData's _rowDeltaStates will not be restored
> without its initial state.
> It looks like UIData should also save/restore
> _initialDescendantFullComponentState in its saveSate()/restoreState() methods
> since it may be needed to restore _rowDeltaStates.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)