You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Carl Steeg (JIRA)" <de...@myfaces.apache.org> on 2014/08/04 16:59:11 UTC

[jira] [Created] (MYFACES-3912) Exception when loading FlowScopeBeanHolder

Carl Steeg created MYFACES-3912:
-----------------------------------

             Summary: Exception when loading FlowScopeBeanHolder
                 Key: MYFACES-3912
                 URL: https://issues.apache.org/jira/browse/MYFACES-3912
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.2.4
         Environment: MyFaces 2.2.4, weld 2.2.1.Final
            Reporter: Carl Steeg
            Priority: Blocker


ViewScopeBeanHolder is put into ApplicationMap() as "oam.flow.FlowScopeBeanHolder"

Problem is in:
*org.apache.myfaces.cdi.view.ViewScopeContextImpl.java*
{quote}
protected ViewScopeBeanHolder getViewScopeBeanHolder(FacesContext facesContext)...
{quote}

in the line:
{quote}
facesContext.getExternalContext().getApplicationMap().put("oam.flow.FlowScopeBeanHolder", viewScopeBeanHolder);
{quote}

This should be:
{quote}
facesContext.getExternalContext().getApplicationMap().put("oam.view.ViewScopeBeanHolder", viewScopeBeanHolder);
{quote}

Otherwise in:
*org.apache.myfaces.flow.cdi.FlowScopedContextImpl.java*

the method:
{quote}
 protected FlowScopeBeanHolder getFlowScopeBeanHolder(FacesContext facesContext)
{quote}

will throw a ClassCastException

after changing the code the flowscope worked fine for me



--
This message was sent by Atlassian JIRA
(v6.2#6252)