Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 25A797FF3 for ; Sat, 5 Nov 2011 15:01:22 +0000 (UTC) Received: (qmail 14067 invoked by uid 500); 5 Nov 2011 15:01:21 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 14001 invoked by uid 500); 5 Nov 2011 15:01:21 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 13994 invoked by uid 99); 5 Nov 2011 15:01:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2011 15:01:21 +0000 X-ASF-Spam-Status: No, hits=1.2 required=5.0 tests=FORGED_HOTMAIL_RCVD2,FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2011 15:01:17 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RMhjs-00031s-U3 for dev@myfaces.apache.org; Sat, 05 Nov 2011 08:00:57 -0700 Message-ID: <32786362.post@talk.nabble.com> Date: Sat, 5 Nov 2011 08:00:56 -0700 (PDT) From: lindberg To: dev@myfaces.apache.org Subject: Re: @ViewAccessScoped does not work! In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: grebdnnil@hotmail.com References: <32782652.post@talk.nabble.com> <32782676.post@talk.nabble.com> <1320435209.93609.YahooMailNeo@web27803.mail.ukl.yahoo.com> <32783950.post@talk.nabble.com> How can i do that? OR DOES NOT WORKS! Gerhard Petracek wrote: > > hi, > > you have to map the window-id parameter in your prettyfaces config or you > use the server-side window-handler (which doesn't support e.g. > page-refreshes). > > regards, > gerhard > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > > > > 2011/11/4 lindberg : >> >> I updated to 1.0.1 version. >> >> I using prettyfaces 3.3.0 and when I use pretty the ViewAccessScoped does >> not work. When I remove pretty works. What can i do? Is there any >> required >> configuration or integration to use myfaces CODI with prettyfaces? >> >> When i return in my action method the view by pretty does not work. But i >> return using 'navigation-case' works. >> >> A.xhtml >> >> > xmlns:f="http://java.sun.com/jsf/core" >> xmlns:h="http://java.sun.com/jsf/html" >> xmlns:ui="http://java.sun.com/jsf/facelets" >> xmlns:p="http://primefaces.prime.com.tr/ui" >> template="/pages/template/main.xhtml"> >> >> >> >> >> >> >> action="#{testMB.myAction}" >> ajax="false"/> >> >> >> >> >> >> >> B.xhtml >> >> > xmlns:f="http://java.sun.com/jsf/core" >> xmlns:h="http://java.sun.com/jsf/html" >> xmlns:ui="http://java.sun.com/jsf/facelets" >> xmlns:p="http://primefaces.prime.com.tr/ui" >> template="/pages/template/main.xhtml"> >> >> >> >> >> >> >> >> >> >> >> >> >> pretty-config.xml >> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://ocpsoft.com/prettyfaces/3.2.1 >> http://ocpsoft.com/xml/ns/prettyfaces/ocpsoft-pretty-faces-3.2.1.xsd"> >> >> >> >> >> >> >> >> >> >> >> TestMB.java >> >> package br.gov.serpro.scds.view.managedbean; >> >> import java.io.Serializable; >> >> import javax.faces.bean.ManagedBean; >> >> import >> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ViewAccessScoped; >> >> @ManagedBean >> @ViewAccessScoped >> public class TestMB implements Serializable{ >> >> /** >> * >> */ >> private static final long serialVersionUID = 1L; >> >> private String text; >> >> public TestMB() { >> // >> } >> >> public String getText() { >> return text; >> } >> >> public void setText(String text) { >> this.text = text; >> } >> >> public String myAction(){ >> return "pretty:pageB";//Using pretty does not work >> } >> >> } >> >> web.xml >> >> > xmlns="http://java.sun.com/xml/ns/javaee" >> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" >> version="3.0"> >> >> Pretty Filter >> > com.ocpsoft.pretty.PrettyFilter >> >> >> Pretty Filter >> /* >> FORWARD >> REQUEST >> ERROR >> >> >> >> >> When I change my action in TestMB to return "navigation-case" declared in >> faces-config.xml works. >> >> faces-config >> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee >> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> >> >> >> >> >> pageB >> /pages/B.xhtml >> >> >> >> >> >> And now my action method in TestMB returns navigation-case 'pageB' and > works >> >> public String myAction(){ >> return "pageB"; >> } >> >> How can i solve this problem? Thanks! >> >> >> >> >> >> >> >> Gerhard Petracek wrote: >>> >>> @mark: >>> i agree with you that using the latest version makes a lot of sense, >>> however we never had such an issue. >>> >>> @lindberg: >>> please provide more details (e.g. how you are navigating to view 'B'). >>> >>> regards, >>> gerhard >>> >>> http://www.irian.at >>> >>> Your JSF powerhouse - >>> JSF Consulting, Development and >>> Courses in English and German >>> >>> Professional Support for Apache MyFaces >>> >>> >>> >>> 2011/11/4 Mark Struberg : >>>> Hi! >>>> >>>> As first step you should upgrade to extcdi-1.0.1 which got released 2 >>>> months ago. >>>> This is the last stable version. 0.9.5 was one of our very first public >>>> packages and we fixed a _lot_ issues since then. >>>> >>>> LieGrue, >>>> strub >>>> >>>> >>>> >>>> ----- Original Message ----- >>>>> From: lindberg >>>>> To: dev@myfaces.apache.org >>>>> Cc: >>>>> Sent: Friday, November 4, 2011 8:09 PM >>>>> Subject: Re: @ViewAccessScoped does not work! >>>>> >>>>> >>>>> I am using >>>>> myfaces-extcdi-dist-jsf2 version 0 0.9.5 >>>>> primefaces version 2.2.1 >>>>> >>>>> lindberg wrote: >>>>>> >>>>>> I have a bean 'X' annotated with @ViewAccessScoped but this scope >>>>> does not >>>>>> work. When i access the view 'A' that uses the bean X and does >>>>> change to >>>>>> view 'B' that uses the bean 'X' too, i lose the bean state. >>>>> How can i >>>>>> solve this problem? Below my configuration: >>>>>> >>>>>> config implementation: >>>>>> org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig >>>>>> method: isUseViewConfigsAsNavigationCasesEnabled >>>>>> value: true >>>>>> >>>>>> method: isAlwaysKeepMessages >>>>>> value: true >>>>>> >>>>>> method: isInitialRedirectEnabled >>>>>> value: true >>>>>> >>>>>> method: isInvalidValueAwareMessageInterpolatorEnabled >>>>>> value: true >>>>>> >>>>>> config implementation: >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig >>>>>> method: isUrlParameterSupported >>>>>> value: true >>>>>> >>>>>> method: isUnknownWindowIdsAllowed >>>>>> value: false >>>>>> >>>>>> method: isAddWindowIdToActionUrlsEnabled >>>>>> value: false >>>>>> >>>>>> method: getWindowContextTimeoutInMinutes >>>>>> value: 60 >>>>>> >>>>>> method: getMaxWindowContextCount >>>>>> value: 64 >>>>>> >>>>>> method: isCloseEmptyWindowContextsEnabled >>>>>> value: false >>>>>> >>>>>> method: isEagerWindowContextDetectionEnabled >>>>>> value: true >>>>>> >>>>>> method: isCreateWindowContextEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isCloseWindowContextEventEnabled >>>>>> value: false >>>>>> >>>>>> config implementation: >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.ConversationConfig >>>>>> method: isScopeBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isAccessBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isUnscopeBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: getConversationTimeoutInMinutes >>>>>> value: 30 >>>>>> >>>>>> method: isStartConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isCloseConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isRestartConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isConversationRequiredEnabled >>>>>> value: true >>>>>> >>>>>> MessageContextConfig class: >>>>>> > > org.apache.myfaces.extensions.cdi.message.impl.DefaultMessageContextConfig >>>>>> MessageInterpolator class: class >>>>>> > > org.apache.myfaces.extensions.cdi.jsf.impl.message.FacesMessageInterpolator >>>>>> MessageResolver class: class >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareApplicationMessagesMessageResolver >>>>>> MessageHandler class: class >>>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageHandler >>>>>> LocaleResolver class: class >>>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareLocaleResolver >>>>>> FormatterFactory class: class >>>>>> > org.apache.myfaces.extensions.cdi.message.impl.DefaultFormatterFactory >>>>>> >>>>>> 16:56:05,234 INFO >>>>>> > [org.apache.myfaces.extensions.cdi.jsf2.impl.Jsf2ModuleStartupObserver] >>>>>> [Started] MyFaces CODI JSF-Module v0.9.5 for JSF 2.0 >>>>>> Used JSF implementation: Mojarra v2.0.3- >>>>>> >>>>>> config implementation: >>>>>> org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig >>>>>> method: isUseViewConfigsAsNavigationCasesEnabled >>>>>> value: true >>>>>> >>>>>> method: isAlwaysKeepMessages >>>>>> value: true >>>>>> >>>>>> method: isInitialRedirectEnabled >>>>>> value: true >>>>>> >>>>>> method: isInvalidValueAwareMessageInterpolatorEnabled >>>>>> value: true >>>>>> >>>>>> config implementation: >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig >>>>>> method: isUrlParameterSupported >>>>>> value: true >>>>>> >>>>>> method: isUnknownWindowIdsAllowed >>>>>> value: false >>>>>> >>>>>> method: isAddWindowIdToActionUrlsEnabled >>>>>> value: false >>>>>> >>>>>> method: getWindowContextTimeoutInMinutes >>>>>> value: 60 >>>>>> >>>>>> method: getMaxWindowContextCount >>>>>> value: 64 >>>>>> >>>>>> method: isCloseEmptyWindowContextsEnabled >>>>>> value: false >>>>>> >>>>>> method: isEagerWindowContextDetectionEnabled >>>>>> value: true >>>>>> >>>>>> method: isCreateWindowContextEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isCloseWindowContextEventEnabled >>>>>> value: false >>>>>> >>>>>> config implementation: >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.ConversationConfig >>>>>> method: isScopeBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isAccessBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isUnscopeBeanEventEnabled >>>>>> value: false >>>>>> >>>>>> method: getConversationTimeoutInMinutes >>>>>> value: 30 >>>>>> >>>>>> method: isStartConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isCloseConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isRestartConversationEventEnabled >>>>>> value: false >>>>>> >>>>>> method: isConversationRequiredEnabled >>>>>> value: true >>>>>> >>>>>> MessageContextConfig class: >>>>>> > > org.apache.myfaces.extensions.cdi.message.impl.DefaultMessageContextConfig >>>>>> MessageInterpolator class: class >>>>>> > > org.apache.myfaces.extensions.cdi.jsf.impl.message.FacesMessageInterpolator >>>>>> MessageResolver class: class >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareApplicationMessagesMessageResolver >>>>>> MessageHandler class: class >>>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageHandler >>>>>> LocaleResolver class: class >>>>>> > org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareLocaleResolver >>>>>> FormatterFactory class: class >>>>>> > org.apache.myfaces.extensions.cdi.message.impl.DefaultFormatterFactory >>>>>> >>>>>> 16:56:05,234 INFO >>>>>> >>>>>> [org.apache.myfaces.extensions.cdi.jpa.impl.JpaModuleStartupObserver] >>>>>> [Started] MyFaces CODI JPA-Module v0.9.5 >>>>>> >>>>>> 16:56:05,250 INFO >>>>>> [org.apache.myfaces.extensions.cdi.core.impl.CoreStartupObserver] >>>>>> [Started] MyFaces CODI (Extensions CDI) Core v0.9.5 >>>>>> Used CDI implementation: Weld v6.0.0.Final >>>>>> >>>>>> project-stage: Production >>>>>> project-stage class: >>>>>> >>>>> > org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage$Production >>>>>> >>>>>> application-parameters: >>>>>> name: com.sun.faces.duplicateJARPattern >>>>>> value: ^tmp\d+(\S*\.jar) >>>>>> >>>>>> name: resteasy.injector.factory >>>>>> value: org.jboss.resteasy.cdi.CdiInjectorFactory >>>>>> >>>>>> name: com.sun.faces.injectionProvider >>>>>> value: >>>>>> > org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider >>>>>> >>>>>> name: resteasy.unwrapped.exceptions >>>>>> value: javax.ejb.EJBException >>>>>> >>>>>> config implementation: >>>>>> org.apache.myfaces.extensions.cdi.core.api.config.CodiCoreConfig >>>>>> method: isConfigurationLoggingEnabled >>>>>> value: true >>>>>> >>>>>> method: isAdvancedQualifierRequiredForDependencyInjection >>>>>> value: true >>>>>> >>>>>> method: isInvalidBeanCreationEventEnabled >>>>>> value: false >>>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> > http://old.nabble.com/%40ViewAccessScoped-does-not-work%21-tp32782652p32782676.html >>>>> Sent from the My Faces - Dev mailing list archive at Nabble.com. >>>>> >>>> >>> >>> >> >> -- >> View this message in context: > http://old.nabble.com/%40ViewAccessScoped-does-not-work%21-tp32782652p32783950.html >> Sent from the My Faces - Dev mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://old.nabble.com/%40ViewAccessScoped-does-not-work%21-tp32782652p32786362.html Sent from the My Faces - Dev mailing list archive at Nabble.com.