myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3855) Make the Facelets State Management accessible
Date Fri, 14 Feb 2014 18:40:20 GMT

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

Leonardo Uribe commented on MYFACES-3855:
-----------------------------------------

I have checked the patch and I can understand the intention behind it. The problem is that
part is considered an implementation detail and it should not be exposed in that way. Instead,
there is a class inside myfaces called org.apache.myfaces.application.TreeStructureManager
used by StateManager that already has the code. DefaultFaceletsStateManagementStrategy has
a copy that resembles the code in TreeStructureManager, but it is used in the context of PSS,
so it was copied intead or reused, because in that context what we need is apply full state
saving in some branches of the tree.

In my personal opinion, I think it is safer to copy that code, because the way how it works
will not fundamentally change. You only need to worry about it between mayor versions of JSF,
and the most painful part was already done.

The code that is used when PSS is set to false (full state saving) really is in org.apache.myfaces.application.StateManagerImpl

In JSF 2.2 there was some changes to deal with resource library contracts, but all additional
changes has been done to update the context in effect of the restore, but the restore algorithm
itself has not changed since 1.2.

> Make the Facelets State Management accessible
> ---------------------------------------------
>
>                 Key: MYFACES-3855
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3855
>             Project: MyFaces Core
>          Issue Type: Wish
>    Affects Versions: 2.2.0
>            Reporter: Moritz Bechler
>         Attachments: MYFACES-3855.patch
>
>
> Hi,
> I've been recently working on an extension (let's call it view stacking) which needs
to perform (full) state saving and restoration outside the regular lifecycle. The current
DefaultFaceletsStateManagementStrategy API doesn't allow this kind of thing (only restores
from response state manager and explictly triggering a full save is tricky). This currently
requires us to maintain quite some duplicated code.
> I prepared a patch which refactors DefaultFaceletsStateManagementStrategy and extracts
the full state saving logic into a utility class and exposed methods to dump/restore state.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message