You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mike Kienenberger <mk...@gmail.com> on 2005/11/08 20:45:31 UTC
Re: Changing the default LifeCycle
I looked at this a week or two ago. I think it was lifecycle-factory.
On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
>
> Hi,
> I figured out how to change the viewHandler in my faces config using the
> <view-hanlder>myviewhandler</view-handler> element, does
> anyone know what element I'd use to set my own LifeCycle class? Thanks
>
Re: Changing the default LifeCycle
Posted by Simon Kitching <sk...@obsidium.com>.
Duncan Krebs wrote:
> You got me looking in the right direction.
>
> In the constructor of LifeCycleFacoryImpl() I see the following line of
> code.
>
> addLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE, new LifecycleImpl());
>
> To change the LifeCycle implementation I could easily change this line but
> then I get tied to having to use an altered myfaces.jar in my app which is
> what I'm trying to steer away from. I wonder if there is a way to specify
> the DEFAULT_LIFECYCLE implementation in either web.xml or
> faces-config.xml. - Duncan
The faces-config.xml can have a <lifecycle-factory> tag. See the spec or
the DTD.
Regards,
Simon
Re: Changing the default LifeCycle
Posted by Duncan Krebs <ap...@hostdepot.net>.
Thanks for info all around, the <lifecycle-factory> is what I was looking
for.
The reason I need to change the lifecycle class is because I'm using MyFaces
in MyFramework and have a different process for creating viewIDs. When the
lifecycle class looks to restore a view it calls the deriveViewID() however
the initial viewID is set different in my ViewHanlder so I need to have that
method return the right viewID in order for the right view to get restored
if that makes sense. A more logical way would be to put the deriveViewID
method on the ViewHandler so I can take care of my gen/derive ViewID
business in one class.
----- Original Message -----
From: "Mike Kienenberger" <mk...@gmail.com>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Tuesday, November 08, 2005 2:25 PM
Subject: Re: Changing the default LifeCycle
@Duncan: altered myfaces.jar
Well, that's exactly why you use <lifecycle-factory> instead of trying
to change LifecycleFactory.DEFAULT_LIFECYCLE in the source.
Implement your own subclass of LifecycleFactory (or
LifeCycleFacoryImpl) that does what you need, and you won't have to
modify myfaces.jar.
@David: "what would you do with a new lifecycle Factory?"
I don't remember what I was tryiing to do at the time :) I think I
was looking for a hook to create a new BeanManager so I could add
init()/destroy() methods to managed-beans. I don't think I was doing
anything in particular with LifeCycle (although I've considered it for
optional validation) -- it was just listed as a configuration option
out there along side
Application-factory/faces-context-factory/variable-resolver, etc,
which I was trying to get a hook into.
On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
> You got me looking in the right direction.
>
> In the constructor of LifeCycleFacoryImpl() I see the following line of
> code.
>
> addLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE, new LifecycleImpl());
>
> To change the LifeCycle implementation I could easily change this line but
> then I get tied to having to use an altered myfaces.jar in my app which is
> what I'm trying to steer away from. I wonder if there is a way to specify
> the DEFAULT_LIFECYCLE implementation in either web.xml or
> faces-config.xml. - Duncan
>
>
>
> ----- Original Message -----
> From: "Mike Kienenberger" <mk...@gmail.com>
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Sent: Tuesday, November 08, 2005 1:45 PM
> Subject: Re: Changing the default LifeCycle
>
>
> I looked at this a week or two ago. I think it was lifecycle-factory.
>
> On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
> >
> > Hi,
> > I figured out how to change the viewHandler in my faces config using the
> > <view-hanlder>myviewhandler</view-handler> element, does
> > anyone know what element I'd use to set my own LifeCycle class? Thanks
> >
>
>
Re: Changing the default LifeCycle
Posted by Mike Kienenberger <mk...@gmail.com>.
@Duncan: altered myfaces.jar
Well, that's exactly why you use <lifecycle-factory> instead of trying
to change LifecycleFactory.DEFAULT_LIFECYCLE in the source.
Implement your own subclass of LifecycleFactory (or
LifeCycleFacoryImpl) that does what you need, and you won't have to
modify myfaces.jar.
@David: "what would you do with a new lifecycle Factory?"
I don't remember what I was tryiing to do at the time :) I think I
was looking for a hook to create a new BeanManager so I could add
init()/destroy() methods to managed-beans. I don't think I was doing
anything in particular with LifeCycle (although I've considered it for
optional validation) -- it was just listed as a configuration option
out there along side
Application-factory/faces-context-factory/variable-resolver, etc,
which I was trying to get a hook into.
On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
> You got me looking in the right direction.
>
> In the constructor of LifeCycleFacoryImpl() I see the following line of
> code.
>
> addLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE, new LifecycleImpl());
>
> To change the LifeCycle implementation I could easily change this line but
> then I get tied to having to use an altered myfaces.jar in my app which is
> what I'm trying to steer away from. I wonder if there is a way to specify
> the DEFAULT_LIFECYCLE implementation in either web.xml or
> faces-config.xml. - Duncan
>
>
>
> ----- Original Message -----
> From: "Mike Kienenberger" <mk...@gmail.com>
> To: "MyFaces Discussion" <us...@myfaces.apache.org>
> Sent: Tuesday, November 08, 2005 1:45 PM
> Subject: Re: Changing the default LifeCycle
>
>
> I looked at this a week or two ago. I think it was lifecycle-factory.
>
> On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
> >
> > Hi,
> > I figured out how to change the viewHandler in my faces config using the
> > <view-hanlder>myviewhandler</view-handler> element, does
> > anyone know what element I'd use to set my own LifeCycle class? Thanks
> >
>
>
Re: Changing the default LifeCycle
Posted by Duncan Krebs <ap...@hostdepot.net>.
You got me looking in the right direction.
In the constructor of LifeCycleFacoryImpl() I see the following line of
code.
addLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE, new LifecycleImpl());
To change the LifeCycle implementation I could easily change this line but
then I get tied to having to use an altered myfaces.jar in my app which is
what I'm trying to steer away from. I wonder if there is a way to specify
the DEFAULT_LIFECYCLE implementation in either web.xml or
faces-config.xml. - Duncan
----- Original Message -----
From: "Mike Kienenberger" <mk...@gmail.com>
To: "MyFaces Discussion" <us...@myfaces.apache.org>
Sent: Tuesday, November 08, 2005 1:45 PM
Subject: Re: Changing the default LifeCycle
I looked at this a week or two ago. I think it was lifecycle-factory.
On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
>
> Hi,
> I figured out how to change the viewHandler in my faces config using the
> <view-hanlder>myviewhandler</view-handler> element, does
> anyone know what element I'd use to set my own LifeCycle class? Thanks
>
RE: Changing the default LifeCycle
Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Mike,
Out of curiousity, what would you do with a new lifecycle Factory? (e.g.
<application><factory><lifecycleFactory></></></>)
Regards,
David
-----Original Message-----
From: Mike Kienenberger [mailto:mkienenb@gmail.com]
Sent: Tuesday, November 08, 2005 2:46 PM
To: MyFaces Discussion
Subject: Re: Changing the default LifeCycle
I looked at this a week or two ago. I think it was lifecycle-factory.
On 11/9/05, Duncan Krebs <ap...@hostdepot.net> wrote:
>
> Hi,
> I figured out how to change the viewHandler in my faces config using the
> <view-hanlder>myviewhandler</view-handler> element, does
> anyone know what element I'd use to set my own LifeCycle class? Thanks
>