myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-4036) UIData state is not restorable when rowStatePreserved is set to true
Date Fri, 27 May 2016 02:30:12 GMT


Leonardo Uribe commented on MYFACES-4036:

After doing some test I have found this problem could have more considerations to do.

In JSF 2.1, it was introduced an interface called TransientStateHolder. According to the javadoc,
the idea of this API is:

"... This interface is implemented by classes that need to save state that is expected to
be available only within the scope of the current request. ..."

This API is used in very, very few cases (only used once in JSF 2.2 core to hold FaceletState
temporally), but in portlet case, it is expected that when you call saveState(...) over the
component on a phase different than render response phase, this transient state should be
saved with the component state too.

This behavior was not originally thought (because in the JSF EG we never went that far to
consider portlets) but it has a lot of sense, and in the "spirit" to make things just work,
I think we need a new issue for this behavior too. 

> UIData state is not restorable when rowStatePreserved is set to true
> --------------------------------------------------------------------
>                 Key: MYFACES-4036
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.10-SNAPSHOT
>         Environment: WebSphere Liberty, MyFaces 2.2.8, IBM JSF Portlet Bridge
>            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

View raw message