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/13 11:57:53 UTC

[jira] [Issue Comment Edited] (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=13032934#comment-13032934 ] 

Gerhard Petracek edited comment on EXTCDI-176 at 5/13/11 9:57 AM:
------------------------------------------------------------------

that isn't a codi bug. the context is active as soon as there is a session. it >looks like< mojarra accesses the bean before the session is active. it works with myfaces-core2 (+ owb).

as an alternative you can use the view-controller concept of codi which allows the usage of @PreRenderView

      was (Author: gpetracek):
    that isn't a codi bug. the context is active as soon as there is a session. it >looks like< mojarra accesses the bean before the session is active. it works with myfaces-core2 (+ owb)
  
> 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
>
> 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