You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2011/05/15 03:45:47 UTC

[jira] [Commented] (EXTCDI-176) JSF Page with a WindowScoped Bean cannot be accessed directly

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

Gerhard Petracek commented on EXTCDI-176:
-----------------------------------------

i can't reproduce it with weld v1.1.1 and mojarra 2.1.0-b11-FCS (shipped with glassfish 3.1)

before you update those libs, please try the attached patch.
since weld has another bug you (currently) can't change the configuration within your application (see: EXTCDI-177) -> you have to do it on your own (return true in CodiCoreConfig#isUnsafeFallbacksEnabled) .
-> please checkout codi (trunk or tag), apply the patch and build it with
  mvn clean install
and test it, if this workaround would help already.

> JSF Page with a WindowScoped Bean cannot be accessed directly
> -------------------------------------------------------------
>
>                 Key: EXTCDI-176
>                 URL: https://issues.apache.org/jira/browse/EXTCDI-176
>             Project: MyFaces CODI
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.9.4
>         Environment: Tested on Ubuntu Linux and Mac OSX, JBoss 6 Final, JEE6
>            Reporter: Daniel Sachse
>            Assignee: Gerhard Petracek
>         Attachments: EXTCDI-176.patch
>
>
> I have a Facelets-page with a WIndow-Scoped Bean and I just want to access a list.
> The List gets loaded via :
> <f:metadata>
>  <f:event type="javax.faces.event.PreRenderViewEvent" listener="#{listBean.preRenderView}" />
> </f:metadata>
> This just reloads the List every time the page gets rendered. The problem with using this approach is, if I access the page directly, I get the following error:
> "WELD-001303 No active contexts for scope type org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowScoped".
> If I do navigate to the page i.e using a commandLink, everything works fine.
> If you do need more information, please just ask.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira