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-3596) NPE exception is thrown during ajax requests from webflow
Date Fri, 24 Aug 2012 00:32:42 GMT

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

Leonardo Uribe commented on MYFACES-3596:
-----------------------------------------

I checked the patch and I was able to reproduce the problem, thanks for the example.

I checked the implementation of FlowViewStateManager, and this class has JSF 1.1/1.2 in mind,
so if you set  javax.faces.PARTIAL_STATE_SAVING config param to false, the code will work
as expected.

The problem is caused because MyFaces has a very optimized algorithm in PSS, that in some
cases generates zero state per view. So, it is possible to set a view as valid, but return
null in the state.

In few words, FlowViewStateManager relies on the old behavior. To implement Partial State
Saving in JSF 2.0, some changes were done. After a lot of investigation, the right thing to
do it is provide a custom org.apache.myfaces.application.StateCache, overriding it org.apache.myfaces.renderkit.html.HtmlResponseStateManager
. In that way, it is possible to override the logic involved in store the state (in this case
store it into spring view scope). In this way, PSS logic is preserved.

This is not a MyFaces issue, instead it is a problem that should be solved from Spring side.
I'll close this issue as invalid, because it works with PSS disabled, and we cannot do anything
from MyFaces side. This problem will be fixed in JSF 2.2, with the introduction of windowId
concept, and the integration of such logic into state saving algorithm.
                
> NPE exception is thrown during ajax requests from webflow
> ---------------------------------------------------------
>
>                 Key: MYFACES-3596
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3596
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.1.8
>         Environment: myfaces-2.1.8 + richfaces-4.2.2 + webflow-2.3.1
>            Reporter: Anton Zukovskij
>         Attachments: log.log, swf-rf4.zip
>
>
> When using a4j:commanButton from webflow rendered view NullPointerException is thrown
during restoreState of component (state==null). Changing to mojarra implementation solves
this problem, therefore it is myfaces integration issue. Please see sample webapp and logs
attached.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message