Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 30086 invoked from network); 5 Dec 2005 22:38:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 22:38:16 -0000 Received: (qmail 3897 invoked by uid 500); 5 Dec 2005 22:38:12 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 3858 invoked by uid 500); 5 Dec 2005 22:38:11 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 3831 invoked by uid 99); 5 Dec 2005 22:38:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 14:38:11 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrew.rw.robinson@gmail.com designates 66.249.82.197 as permitted sender) Received: from [66.249.82.197] (HELO xproxy.gmail.com) (66.249.82.197) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 14:38:10 -0800 Received: by xproxy.gmail.com with SMTP id s12so654449wxc for ; Mon, 05 Dec 2005 14:37:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NCQekDBcnBNJUkA+YsysC3TkaxDYe8Qs4TiSICbht/n2cBngEzFicQt8df1e+Id7C0OErZAFVJtkEKskL85WHtBvhvsbdQE+KKlnuwYd7HP6na0+MVIpexuJxekk+OWYAEaAhTC9pdkF1HkXNQyPj14/vMJlDMQifX77Mbzje1k= Received: by 10.70.23.5 with SMTP id 5mr8087287wxw; Mon, 05 Dec 2005 14:37:49 -0800 (PST) Received: by 10.70.39.17 with HTTP; Mon, 5 Dec 2005 14:37:49 -0800 (PST) Message-ID: Date: Mon, 5 Dec 2005 15:37:49 -0700 From: Andrew Robinson To: MyFaces Discussion Subject: Re: Obtaining the url? In-Reply-To: <4394B132.6010809@unionsoluciones.com.co> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <438B0FEF.9050804@unionsoluciones.com.co> <4394AB53.7000504@unionsoluciones.com.co> <4394B132.6010809@unionsoluciones.com.co> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N To be honest, I have not covered the part of the specification that talks about bean initialization time. I would not be surprised if it depends on the bean's scope. In general, I always feel that it is a good decision to not put business code in a constructor. However, since JSF may set managed properties, that brings up another question. In this case, with a request-scoped variable, I would guess that the bean would be created in the render response phase, but as I said, I don't know (although I am curious). Does anyone know? On 12/5/05, Juli=E1n Garc=EDa wrote: > Is there any approach to access the url when the bean is initializing? > > > Andrew Robinson wrote: > > It is set right after the view is created. This differs based on if > > there is queued action. If there is an action, the new view is created > > during the application invoke phase. If the view is new (new request > > or a redirect), then the view is created earlier in the lifecycle (I > > can't remember for sure, but I think I remember it being during the > > restore view phase). > > > > Once the view is created, getViewRoot() will not return null. Get view > > ID on the view root should always return a value to my knowledge > > (unless you have an odd view handler). The new view ID is always > > available at the render response phase. > > > > On 12/5/05, Juli=E1n Garc=EDa wrote: > > > >>Andrew Robinson wrote: > >> > >>>Are you looking for: > >>>FacesContext.getCurrentInstance().getViewRoot().getViewId()? > >> > >>When is this id set....I am trying to access this method just after > >>setting the values configured in my config xml, and it is always showin= g > >>null..... > >> > >>Thanks-. > >> > >> > >>>On 11/28/05, Juli=E1n Garc=EDa wrote: > >>> > >>> > >>>>How can I access the url that is being currently displayed for the us= er > >>>>using the FacesContext? I need this to do a custom filter for > >>>>authorization using acegi.....Any experiences to share with that? > >>>> > >>>>Thanks a lot. > >>>> > >>>>Julian > >>>> > >>> > >>> > >> > > > >