You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Lisa <ap...@purpleblade.net> on 2007/02/05 06:43:38 UTC

JSF lifecyle - managed-bean

Is there a way to automatically call an init() method after all setters have
been called on a managed-bean?  I am looking for something I can put in the
.xml config file or an interface that I can extend.

Spring has this facility.  We are using Spring for most of the framework but
using JSF managed-bean facility for all backing beans.


thanks


L
-- 
View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: JSF lifecyle - managed-bean

Posted by Lisa <ap...@purpleblade.net>.
I have been to the Spring website but am a little lost on how to convert from
JSF managed-bean (what we have implemented now) to a Spring facility.  any
pointers to documentation would be appreciated.

thanks


L



Martin Marinschek wrote:
> 
> From my experience: don't use jsf-spring-library, use Spring 2.0 directly
> instead.
> 
> Jsf-spring is known to cause class-loader issues in some containers, e.g.
> Websphere.
> 
> In Spring 2.0, you can define managed beans with session and request-scope
> perfectly!
> 
> regards,
> 
> Martin
> 
> On 2/5/07, Beelen, Marco <ma...@merck.com> wrote:
>>
>> Hello Lisa,
>>
>> I'm solving that problem by implementing the InitializingBean-interface
>> of Spring on my managed bean and use the jsf-spring-library (
>> http://jsf-spring.sourceforge.net/ ) to make sure that the method is
>> being called:
>>
>> My faces-context.xml contains:
>>
>> <application>
>>         <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
>>
>>
>> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolve
>> r</variable-resolver>
>> </application>
>>
>> And in the web.xml I added:
>>
>> <listener>
>>         <listener-class>
>>
>> de.mindmatters.faces.spring.context.ContextLoaderListener
>>         </listener-class>
>> </listener>
>>
>>
>> With kind regards,
>>         Marco
>>
>>
>> -----Original Message-----
>> From: Lisa [mailto:apache_support@purpleblade.net]
>> Sent: maandag 5 februari 2007 6:44
>> To: users@myfaces.apache.org
>> Subject: JSF lifecyle - managed-bean
>>
>>
>> Is there a way to automatically call an init() method after all setters
>> have
>> been called on a managed-bean?  I am looking for something I can put in
>> the
>> .xml config file or an interface that I can extend.
>>
>> Spring has this facility.  We are using Spring for most of the framework
>> but
>> using JSF managed-bean facility for all backing beans.
>>
>>
>> thanks
>>
>>
>> L
>> --
>> View this message in context:
>> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
>> 8
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Notice:  This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New Jersey, USA 08889), and/or its affiliates (which may be known
>> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
>> and in Japan, as Banyu - direct contact information for affiliates is
>> available at http://www.merck.com/contact/contacts.html) that may be
>> confidential, proprietary copyrighted and/or legally privileged. It is
>> intended solely for the use of the individual or entity named on this
>> message. If you are not the intended recipient, and have received this
>> message in error, please notify us immediately by reply e-mail and then
>> delete it from your system.
>>
>>
>> ------------------------------------------------------------------------------
>>
> 
> 
> 
> -- 
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 

-- 
View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8829877
Sent from the MyFaces - Users mailing list archive at Nabble.com.


t:popup

Posted by Kevin Gutch <kg...@protechemail.com>.
Hi,

I am trying to use multiple t:popup tags within the same page. I am also 
using Facelets. If I use one t:popup everything works fine. With 
several, however, I get a duplicate ID error. I have tried manually 
assigning ID's but  the error still seems to occur. I believe it has 
something to do with the <f:facet name="popup" /> but I am not sure

Has anyone seen this behavior before?


-Kevin

Re: JSF lifecyle - managed-bean

Posted by Mikael Andersson <ma...@gmail.com>.
Is it possible to inject request paramaters into Spring managed beans?

On 05/02/07, Mert Çalışkan <mc...@gmail.com> wrote:
>
> As Juergen Hoeller stated in springframework mail-list, I totally agree
> with him..
>
> *Consider moving your JSF managed-bean definitions down to the Spring
> context: Since Spring 2.0, you should be able to define a direct Spring
> bean
> equivalent even for request and session scope.
>
> Once the beans are defined in the Spring context, you've got all of
> Spring's
> functionality available to them: init and destroy callbacks, Spring's
> default property type conversion, auto-proxying, etc.
>
> FWIW, JSF applications based on a Spring application context might not
> define *any* JSF managed-beans at all, using bean definitions in the
> Spring
> context for all their managed bean needs. *
>
>
> Mert..
>
>
> On 2/6/07, Cagatay Civici <ca...@gmail.com> wrote:
> >
> > Hi,
> >
> > I agree with Martin, jsf-spring makes no sense to me because of the
> > Spring Variable Resolver. I also liked the idea of using spring scoped beans
> > as JSF backing beans since two IOC containers seem to be unnecessary for an
> > app and it's wise to select the sophisticated one:)
> >
> > Regards
> >
> > Cagatay
> >
> > On 2/5/07, Marco Mistroni <mmistroni@gmail.com > wrote:
> > >
> > > Hi,
> > >  i give my 2 cents here
> > > you can expose your JSF via spring either using Spring variable
> > > resolver or jsf-spring
> > >
> > > i have a bean (non-JSF, but still spring-managed) which has setters,
> > > and in my init method i am using
> > > some of the data from setters..
> > >
> > > all i needed to do was to declare an init-method for my bean in
> > > applicationContext.xml
> > >
> > > if you expose your JSF beans as Spring beans (jsf-spring or not) they
> > > will behave exactly like Spring beans
> > >
> > > hth
> > > marco
> > >
> > >
> > >
> > > On 2/5/07, Martin Marinschek < martin.marinschek@gmail.com > wrote:
> > > >
> > > > From my experience: don't use jsf-spring-library, use Spring 2.0directly instead.
> > > >
> > > > Jsf-spring is known to cause class-loader issues in some containers,
> > > > e.g. Websphere.
> > > >
> > > > In Spring 2.0, you can define managed beans with session and
> > > > request-scope perfectly!
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > > On 2/5/07, Beelen, Marco < marco_beelen@merck.com > wrote:
> > > > >
> > > > > Hello Lisa,
> > > > >
> > > > > I'm solving that problem by implementing the
> > > > > InitializingBean-interface
> > > > > of Spring on my managed bean and use the jsf-spring-library (
> > > > > http://jsf-spring.sourceforge.net/ ) to make sure that the method
> > > > > is
> > > > > being called:
> > > > >
> > > > > My faces-context.xml contains:
> > > > >
> > > > > <application>
> > > > >         <view-handler>com.sun.facelets.FaceletViewHandler
> > > > > </view-handler>
> > > > >
> > > > >
> > > > > <variable-resolver>
> > > > > org.springframework.web.jsf.DelegatingVariableResolve
> > > > > r</variable-resolver>
> > > > > </application>
> > > > >
> > > > > And in the web.xml I added:
> > > > >
> > > > > <listener>
> > > > >         <listener-class>
> > > > >
> > > > > de.mindmatters.faces.spring.context.ContextLoaderListener
> > > > >         </listener-class>
> > > > > </listener>
> > > > >
> > > > >
> > > > > With kind regards,
> > > > >         Marco
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Lisa [mailto: apache_support@purpleblade.net ]
> > > > > Sent: maandag 5 februari 2007 6:44
> > > > > To: users@myfaces.apache.org
> > > > > Subject: JSF lifecyle - managed-bean
> > > > >
> > > > >
> > > > > Is there a way to automatically call an init() method after all
> > > > > setters
> > > > > have
> > > > > been called on a managed-bean?  I am looking for something I can
> > > > > put in
> > > > > the
> > > > > .xml config file or an interface that I can extend.
> > > > >
> > > > > Spring has this facility.  We are using Spring for most of the
> > > > > framework
> > > > > but
> > > > > using JSF managed-bean facility for all backing beans.
> > > > >
> > > > >
> > > > > thanks
> > > > >
> > > > >
> > > > > L
> > > > > --
> > > > > View this message in context:
> > > > >
> > > > > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> > > > > 8
> > > > > Sent from the MyFaces - Users mailing list archive at Nabble.com<http://nabble.com/>
> > > > > .
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ------------------------------------------------------------------------------
> > > > >
> > > > > Notice:  This e-mail message, together with any attachments,
> > > > > contains
> > > > > information of Merck & Co., Inc. (One Merck Drive, Whitehouse
> > > > > Station,
> > > > > New Jersey, USA 08889), and/or its affiliates (which may be known
> > > > > outside the United States as Merck Frosst, Merck Sharp & Dohme or
> > > > > MSD
> > > > > and in Japan, as Banyu - direct contact information for affiliates
> > > > > is
> > > > > available at http://www.merck.com/contact/contacts.html ) that may
> > > > > be
> > > > > confidential, proprietary copyrighted and/or legally privileged.
> > > > > It is
> > > > > intended solely for the use of the individual or entity named on
> > > > > this
> > > > > message. If you are not the intended recipient, and have received
> > > > > this
> > > > > message in error, please notify us immediately by reply e-mail and
> > > > > then
> > > > > delete it from your system.
> > > > >
> > > > >
> > > > > ------------------------------------------------------------------------------
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> >
>

Re: JSF lifecyle - managed-bean

Posted by Mert Çalışkan <mc...@gmail.com>.
As Juergen Hoeller stated in springframework mail-list, I totally agree with
him..

*Consider moving your JSF managed-bean definitions down to the Spring
context: Since Spring 2.0, you should be able to define a direct Spring bean

equivalent even for request and session scope.

Once the beans are defined in the Spring context, you've got all of Spring's

functionality available to them: init and destroy callbacks, Spring's
default property type conversion, auto-proxying, etc.

FWIW, JSF applications based on a Spring application context might not
define *any* JSF managed-beans at all, using bean definitions in the Spring
context for all their managed bean needs. *


Mert..


On 2/6/07, Cagatay Civici <ca...@gmail.com> wrote:
>
> Hi,
>
> I agree with Martin, jsf-spring makes no sense to me because of the Spring
> Variable Resolver. I also liked the idea of using spring scoped beans as JSF
> backing beans since two IOC containers seem to be unnecessary for an app and
> it's wise to select the sophisticated one:)
>
> Regards
>
> Cagatay
>
> On 2/5/07, Marco Mistroni <mm...@gmail.com> wrote:
> >
> > Hi,
> >  i give my 2 cents here
> > you can expose your JSF via spring either using Spring variable resolver
> > or jsf-spring
> >
> > i have a bean (non-JSF, but still spring-managed) which has setters, and
> > in my init method i am using
> > some of the data from setters..
> >
> > all i needed to do was to declare an init-method for my bean in
> > applicationContext.xml
> >
> > if you expose your JSF beans as Spring beans (jsf-spring or not) they
> > will behave exactly like Spring beans
> >
> > hth
> > marco
> >
> >
> >
> > On 2/5/07, Martin Marinschek < martin.marinschek@gmail.com> wrote:
> > >
> > > From my experience: don't use jsf-spring-library, use Spring 2.0directly instead.
> > >
> > > Jsf-spring is known to cause class-loader issues in some containers,
> > > e.g. Websphere.
> > >
> > > In Spring 2.0, you can define managed beans with session and
> > > request-scope perfectly!
> > >
> > > regards,
> > >
> > > Martin
> > >
> > > On 2/5/07, Beelen, Marco < marco_beelen@merck.com> wrote:
> > > >
> > > > Hello Lisa,
> > > >
> > > > I'm solving that problem by implementing the
> > > > InitializingBean-interface
> > > > of Spring on my managed bean and use the jsf-spring-library (
> > > > http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> > > > being called:
> > > >
> > > > My faces-context.xml contains:
> > > >
> > > > <application>
> > > >         <view-handler>com.sun.facelets.FaceletViewHandler
> > > > </view-handler>
> > > >
> > > >
> > > > <variable-resolver>
> > > > org.springframework.web.jsf.DelegatingVariableResolve
> > > > r</variable-resolver>
> > > > </application>
> > > >
> > > > And in the web.xml I added:
> > > >
> > > > <listener>
> > > >         <listener-class>
> > > >
> > > > de.mindmatters.faces.spring.context.ContextLoaderListener
> > > >         </listener-class>
> > > > </listener>
> > > >
> > > >
> > > > With kind regards,
> > > >         Marco
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Lisa [mailto: apache_support@purpleblade.net ]
> > > > Sent: maandag 5 februari 2007 6:44
> > > > To: users@myfaces.apache.org
> > > > Subject: JSF lifecyle - managed-bean
> > > >
> > > >
> > > > Is there a way to automatically call an init() method after all
> > > > setters
> > > > have
> > > > been called on a managed-bean?  I am looking for something I can put
> > > > in
> > > > the
> > > > .xml config file or an interface that I can extend.
> > > >
> > > > Spring has this facility.  We are using Spring for most of the
> > > > framework
> > > > but
> > > > using JSF managed-bean facility for all backing beans.
> > > >
> > > >
> > > > thanks
> > > >
> > > >
> > > > L
> > > > --
> > > > View this message in context:
> > > >
> > > > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> > > > 8
> > > > Sent from the MyFaces - Users mailing list archive at Nabble.com<http://nabble.com/>
> > > > .
> > > >
> > > >
> > > >
> > > >
> > > > ------------------------------------------------------------------------------
> > > >
> > > > Notice:  This e-mail message, together with any attachments,
> > > > contains
> > > > information of Merck & Co., Inc. (One Merck Drive, Whitehouse
> > > > Station,
> > > > New Jersey, USA 08889), and/or its affiliates (which may be known
> > > > outside the United States as Merck Frosst, Merck Sharp & Dohme or
> > > > MSD
> > > > and in Japan, as Banyu - direct contact information for affiliates
> > > > is
> > > > available at http://www.merck.com/contact/contacts.html ) that may
> > > > be
> > > > confidential, proprietary copyrighted and/or legally privileged. It
> > > > is
> > > > intended solely for the use of the individual or entity named on
> > > > this
> > > > message. If you are not the intended recipient, and have received
> > > > this
> > > > message in error, please notify us immediately by reply e-mail and
> > > > then
> > > > delete it from your system.
> > > >
> > > >
> > > > ------------------------------------------------------------------------------
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> >
> >
> >
>

Re: JSF lifecyle - managed-bean

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

I agree with Martin, jsf-spring makes no sense to me because of the Spring
Variable Resolver. I also liked the idea of using spring scoped beans as JSF
backing beans since two IOC containers seem to be unnecessary for an app and
it's wise to select the sophisticated one:)

Regards

Cagatay

On 2/5/07, Marco Mistroni <mm...@gmail.com> wrote:
>
> Hi,
>  i give my 2 cents here
> you can expose your JSF via spring either using Spring variable resolver
> or jsf-spring
>
> i have a bean (non-JSF, but still spring-managed) which has setters, and
> in my init method i am using
> some of the data from setters..
>
> all i needed to do was to declare an init-method for my bean in
> applicationContext.xml
>
> if you expose your JSF beans as Spring beans (jsf-spring or not) they will
> behave exactly like Spring beans
>
> hth
> marco
>
>
>
> On 2/5/07, Martin Marinschek <ma...@gmail.com> wrote:
> >
> > From my experience: don't use jsf-spring-library, use Spring 2.0directly instead.
> >
> > Jsf-spring is known to cause class-loader issues in some containers, e.g.
> > Websphere.
> >
> > In Spring 2.0, you can define managed beans with session and
> > request-scope perfectly!
> >
> > regards,
> >
> > Martin
> >
> > On 2/5/07, Beelen, Marco < marco_beelen@merck.com> wrote:
> > >
> > > Hello Lisa,
> > >
> > > I'm solving that problem by implementing the
> > > InitializingBean-interface
> > > of Spring on my managed bean and use the jsf-spring-library (
> > > http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> > > being called:
> > >
> > > My faces-context.xml contains:
> > >
> > > <application>
> > >         <view-handler>com.sun.facelets.FaceletViewHandler
> > > </view-handler>
> > >
> > >
> > > <variable-resolver>
> > > org.springframework.web.jsf.DelegatingVariableResolve
> > > r</variable-resolver>
> > > </application>
> > >
> > > And in the web.xml I added:
> > >
> > > <listener>
> > >         <listener-class>
> > >
> > > de.mindmatters.faces.spring.context.ContextLoaderListener
> > >         </listener-class>
> > > </listener>
> > >
> > >
> > > With kind regards,
> > >         Marco
> > >
> > >
> > > -----Original Message-----
> > > From: Lisa [mailto: apache_support@purpleblade.net ]
> > > Sent: maandag 5 februari 2007 6:44
> > > To: users@myfaces.apache.org
> > > Subject: JSF lifecyle - managed-bean
> > >
> > >
> > > Is there a way to automatically call an init() method after all
> > > setters
> > > have
> > > been called on a managed-bean?  I am looking for something I can put
> > > in
> > > the
> > > .xml config file or an interface that I can extend.
> > >
> > > Spring has this facility.  We are using Spring for most of the
> > > framework
> > > but
> > > using JSF managed-bean facility for all backing beans.
> > >
> > >
> > > thanks
> > >
> > >
> > > L
> > > --
> > > View this message in context:
> > >
> > > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> > > 8
> > > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> > >
> > >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > >
> > > Notice:  This e-mail message, together with any attachments, contains
> > > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> > > New Jersey, USA 08889), and/or its affiliates (which may be known
> > > outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> > > and in Japan, as Banyu - direct contact information for affiliates is
> > > available at http://www.merck.com/contact/contacts.html ) that may be
> > > confidential, proprietary copyrighted and/or legally privileged. It is
> > > intended solely for the use of the individual or entity named on this
> > > message. If you are not the intended recipient, and have received this
> > >
> > > message in error, please notify us immediately by reply e-mail and
> > > then
> > > delete it from your system.
> > >
> > >
> > > ------------------------------------------------------------------------------
> > >
> >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
>
>
>

Re: JSF lifecyle - managed-bean

Posted by Marco Mistroni <mm...@gmail.com>.
Hi,
 i give my 2 cents here
you can expose your JSF via spring either using Spring variable resolver or
jsf-spring

i have a bean (non-JSF, but still spring-managed) which has setters, and in
my init method i am using
some of the data from setters..

all i needed to do was to declare an init-method for my bean in
applicationContext.xml

if you expose your JSF beans as Spring beans (jsf-spring or not) they will
behave exactly like Spring beans

hth
marco



On 2/5/07, Martin Marinschek <ma...@gmail.com> wrote:
>
> From my experience: don't use jsf-spring-library, use Spring 2.0 directly
> instead.
>
> Jsf-spring is known to cause class-loader issues in some containers, e.g.
> Websphere.
>
> In Spring 2.0, you can define managed beans with session and request-scope
> perfectly!
>
> regards,
>
> Martin
>
> On 2/5/07, Beelen, Marco <ma...@merck.com> wrote:
> >
> > Hello Lisa,
> >
> > I'm solving that problem by implementing the InitializingBean-interface
> > of Spring on my managed bean and use the jsf-spring-library (
> > http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> > being called:
> >
> > My faces-context.xml contains:
> >
> > <application>
> >         <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
> >
> >
> > <variable-resolver>
> > org.springframework.web.jsf.DelegatingVariableResolve
> > r</variable-resolver>
> > </application>
> >
> > And in the web.xml I added:
> >
> > <listener>
> >         <listener-class>
> >
> > de.mindmatters.faces.spring.context.ContextLoaderListener
> >         </listener-class>
> > </listener>
> >
> >
> > With kind regards,
> >         Marco
> >
> >
> > -----Original Message-----
> > From: Lisa [mailto:apache_support@purpleblade.net ]
> > Sent: maandag 5 februari 2007 6:44
> > To: users@myfaces.apache.org
> > Subject: JSF lifecyle - managed-bean
> >
> >
> > Is there a way to automatically call an init() method after all setters
> > have
> > been called on a managed-bean?  I am looking for something I can put in
> > the
> > .xml config file or an interface that I can extend.
> >
> > Spring has this facility.  We are using Spring for most of the framework
> >
> > but
> > using JSF managed-bean facility for all backing beans.
> >
> >
> > thanks
> >
> >
> > L
> > --
> > View this message in context:
> > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> > 8
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> >
> > Notice:  This e-mail message, together with any attachments, contains
> > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> > New Jersey, USA 08889), and/or its affiliates (which may be known
> > outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> > and in Japan, as Banyu - direct contact information for affiliates is
> > available at http://www.merck.com/contact/contacts.html ) that may be
> > confidential, proprietary copyrighted and/or legally privileged. It is
> > intended solely for the use of the individual or entity named on this
> > message. If you are not the intended recipient, and have received this
> > message in error, please notify us immediately by reply e-mail and then
> > delete it from your system.
> >
> >
> > ------------------------------------------------------------------------------
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces

Re: JSF lifecyle - managed-bean

Posted by Martin Marinschek <ma...@gmail.com>.
>From my experience: don't use jsf-spring-library, use Spring 2.0 directly
instead.

Jsf-spring is known to cause class-loader issues in some containers, e.g.
Websphere.

In Spring 2.0, you can define managed beans with session and request-scope
perfectly!

regards,

Martin

On 2/5/07, Beelen, Marco <ma...@merck.com> wrote:
>
> Hello Lisa,
>
> I'm solving that problem by implementing the InitializingBean-interface
> of Spring on my managed bean and use the jsf-spring-library (
> http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> being called:
>
> My faces-context.xml contains:
>
> <application>
>         <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
>
>
> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolve
> r</variable-resolver>
> </application>
>
> And in the web.xml I added:
>
> <listener>
>         <listener-class>
>
> de.mindmatters.faces.spring.context.ContextLoaderListener
>         </listener-class>
> </listener>
>
>
> With kind regards,
>         Marco
>
>
> -----Original Message-----
> From: Lisa [mailto:apache_support@purpleblade.net]
> Sent: maandag 5 februari 2007 6:44
> To: users@myfaces.apache.org
> Subject: JSF lifecyle - managed-bean
>
>
> Is there a way to automatically call an init() method after all setters
> have
> been called on a managed-bean?  I am looking for something I can put in
> the
> .xml config file or an interface that I can extend.
>
> Spring has this facility.  We are using Spring for most of the framework
> but
> using JSF managed-bean facility for all backing beans.
>
>
> thanks
>
>
> L
> --
> View this message in context:
> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> 8
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
>
>
>
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and then
> delete it from your system.
>
>
> ------------------------------------------------------------------------------
>



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

[Tobago] pop up window to notify session expired?

Posted by "Wong, Emmanuel (Sam)" <Wo...@SEC.GOV>.
Hi

 

When a user attempts to exit the browser or when session expired, if the
user has un-submitted a record, the system shall display an alert
message warning the user.  Is there a way to do this?


Re: How to set timer to a page?

Posted by Jay Balunas <ba...@gmail.com>.
Thomas,

The way I've done this is a strait JavaScript approach where the page starts
a timer when loaded, and when the time executes it preforms the logout.

That way is not very JSF centric and can be difficult to maintain because
you are kind of hijacking the life cycle.

What I believe is a better way would be to use either Trinidad, or
ajax4Jsf.  They both have a "poller" component that will callback into the
JSF application lifecycle.  From there you can do whatever is needed.

I had trouble integrating Trinidad with tomahawk so I went the ajax4jsf
route.

-Jay

On 2/7/07, Thomas Chang <th...@yahoo.de> wrote:
>
> Hi all,
>
> what I want to do is:
> I click the commandLink in page1.xHtml and it change to page2.xHtml. This
> page2.xHtml will just stay for several seconds for example and will do
> logout.
>
> How can I do that?
>
> Thanks
>
> Thomas
>
> ------------------------------
> Yahoo! Messenger - kostenlos* mit Familie und Freunden von PC zu PC
> telefonieren
> <http://de.rd.yahoo.com/evt=39058/*http://de.messenger.yahoo.com>.
>
>

Re: A question about log4j

Posted by Mike Kienenberger <mk...@gmail.com>.
I think how you add a file external from your war file to your
container classpath depends on your container.  You'll have to check
your container documentation.

On 2/7/07, Thomas Chang <th...@yahoo.de> wrote:
> Hi all,
>
> I am not sure if my question is put in a right place. Hope there is someone
> who can give me some info.
>
> I have a file called "mylog.log4j.properties" - not "log4j.properties".
> Normally I should put this file under WEB-INF and it will be packaged in to
> the WAR. But I want to put this logfile outside of the WAR so it will be
> easy to change its contents without open the WAR.
>
> But I don't know where should I put this logfile so my web-application will
> write the logs into it. I've heard I have to configue the classpath, or I
> have to configure the web.xml. But how?
>
>
>
>  ________________________________
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr
> bietet das neue Yahoo! Mail .
>
>

Re: A question about log4j

Posted by Don Hill <ju...@gmail.com>.
Thomas,

If you just want to change logging levels then I have attached a jsp that
will allow this, I think there is a property that you can pass in like -
Dlog4j.config=/path/to/file or something like that.

Don

On 2/7/07, Thomas Chang <th...@yahoo.de> wrote:
>
> Hi all,
>
> I am not sure if my question is put in a right place. Hope there is
> someone who can give me some info.
>
> I have a file called "mylog.log4j.properties" - not "log4j.properties".
> Normally I should put this file under WEB-INF and it will be packaged in to
> the WAR. But I want to put this logfile outside of the WAR so it will be
> easy to change its contents without open the WAR.
>
> But I don't know where should I put this logfile so my web-application
> will write the logs into it. I've heard I have to configue the classpath, or
> I have to configure the web.xml. But how?
>
> ------------------------------
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel
> mehr bietet das neue Yahoo! Mail
> <http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html+%0A>
> .
>
>

A question about log4j

Posted by Thomas Chang <th...@yahoo.de>.
Hi all,
   
  I am not sure if my question is put in a right place. Hope there is someone who can give me some info.

I have a file called "mylog.log4j.properties" - not "log4j.properties". Normally I should put this file under WEB-INF and it will be packaged in to the WAR. But I want to put this logfile outside of the WAR so it will be easy to change its contents without open the WAR.

But I don't know where should I put this logfile so my web-application will write the logs into it. I've heard I have to configue the classpath, or I have to configure the web.xml. But how?



 		
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das  neue Yahoo! Mail .

How to set timer to a page?

Posted by Thomas Chang <th...@yahoo.de>.
Hi all,

what I want to do is:
I click the commandLink in page1.xHtml and it change to page2.xHtml. This page2.xHtml will just stay for several seconds for example and will do logout. 

How can I do that?

Thanks

Thomas


 		
---------------------------------
Yahoo! Messenger -  kostenlos* mit Familie und Freunden von PC zu PC telefonieren. 

RE: Re: How to set session-timeout?

Posted by Mark Millman <ma...@mizar.com>.
Programmatically it can be done with HttpSession.setMaxInactiveInterval(int
seconds).  This can be useful if you want to different timeouts for
different types of users.
 
Mark

  _____  

From: Adrian Mitev [mailto:adrian.mitev@googlemail.com] 
Sent: Tuesday, February 06, 2007 12:12 AM
To: MyFaces Discussion
Subject: [Norton AntiSpam] Re: How to set session-timeout?


Session timeout is configured in web.xml. Like this:

<session-config>
        <session-timeout>30</session-timeout>
 </session-config>



2007/2/6, Thomas Chang < thomas2004ch@yahoo.de>: 

Hi all,

I want to set a so-called session timeout to my web application, so that is
a user after logon and doesn't do anything for a while, his session will be
closed and he has to re-logon to enter the web-application. 

I wonder this can be configue in server such as BEA-Webcontainer or I have
to programm it. How?

Regards

Thomas




  _____  

Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr
bietet das neue Yahoo! Mail
<http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.ht
ml+%0A> . 





Re: How to set session-timeout?

Posted by Adrian Mitev <ad...@googlemail.com>.
Session timeout is configured in web.xml. Like this:

<session-config>
        <session-timeout>30</session-timeout>
 </session-config>


2007/2/6, Thomas Chang <th...@yahoo.de>:
>
> Hi all,
>
> I want to set a so-called session timeout to my web application, so that
> is a user after logon and doesn't do anything for a while, his session will
> be closed and he has to re-logon to enter the web-application.
>
> I wonder this can be configue in server such as BEA-Webcontainer or I have
> to programm it. How?
>
> Regards
>
> Thomas
>
> ------------------------------
> Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel
> mehr bietet das neue Yahoo! Mail
> <http://de.rd.yahoo.com/evt=40589/*http://de.docs.yahoo.com/ymail/landing.html+%0A>
> .
>
>

RE: How to set session-timeout?

Posted by Thomas Chang <th...@yahoo.de>.
Sure. You just need to configue your web.xml file.


"Wong, Emmanuel (Sam)" <Wo...@SEC.GOV> schrieb:        v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);}     st1\:*{behavior:url(#default#ieooui) }           Yes, I have the same issue.  Could it be implement in JBOSS?
   
      
---------------------------------
  
  From: Thomas Chang [mailto:thomas2004ch@yahoo.de] 
 Sent: Tuesday, February 06, 2007 3:10 AM
 To: MyFaces  Discussion
 Subject: How to set session-timeout?
  
   
  Hi all,
 
 I want to set a so-called session timeout to my web application, so that is a user after logon and doesn't do anything for a while, his session will be closed and he has to re-logon to enter the web-application.
 
 I wonder this can be configue in server such as BEA-Webcontainer or I have to programm it. How?
 
 Regards
 
 Thomas
    
    
---------------------------------
  
  Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail .
  
  

 		
---------------------------------
Was Sie schon immer wissen wollten aber nie zu Fragen trauten? Yahoo! Clever hilft Ihnen.

RE: How to set session-timeout?

Posted by "Wong, Emmanuel (Sam)" <Wo...@SEC.GOV>.
Yes, I have the same issue.  Could it be implement in JBOSS?

 

________________________________

From: Thomas Chang [mailto:thomas2004ch@yahoo.de] 
Sent: Tuesday, February 06, 2007 3:10 AM
To: MyFaces Discussion
Subject: How to set session-timeout?

 

Hi all,

I want to set a so-called session timeout to my web application, so that is a user after logon and doesn't do anything for a while, his session will be closed and he has to re-logon to enter the web-application.

I wonder this can be configue in server such as BEA-Webcontainer or I have to programm it. How?

Regards

Thomas

  

________________________________

Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail <http://de.rd.yahoo.com/evt=40589/*http:/de.docs.yahoo.com/ymail/landing.html%20%0d%0a> .


How to set session-timeout?

Posted by Thomas Chang <th...@yahoo.de>.
Hi all,

I want to set a so-called session timeout to my web application, so that is a user after logon and doesn't do anything for a while, his session will be closed and he has to re-logon to enter the web-application.

I wonder this can be configue in server such as BEA-Webcontainer or I have to programm it. How?

Regards

Thomas

 		
---------------------------------
Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das  neue Yahoo! Mail .

Re: JSF lifecyle - managed-bean

Posted by Matthias Wessendorf <ma...@apache.org>.
volkers suggestion is the easiest in staying w/ plain JSF from what I see.

-M

On 2/6/07, Lisa <ap...@purpleblade.net> wrote:
>
> We are using Spring in other parts of the framework but not on our Backing
> Beans.  This would take some rework to use Spring on the front-end beans.
> Also upgrading to Spring 2.0 would take some work as well and we are already
> behind.
>
> I am aware that you can do this in Spring but could not find an easy way to
> do it in JSF.
>
> Thanks
>
>
> L
>
>
>
> Beelen, Marco wrote:
> >
> > Hello Lisa,
> >
> > I'm solving that problem by implementing the InitializingBean-interface
> > of Spring on my managed bean and use the jsf-spring-library (
> > http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> > being called:
> >
> > My faces-context.xml contains:
> >
> > <application>
> >       <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
> >
> >
> > <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolve
> > r</variable-resolver>
> > </application>
> >
> > And in the web.xml I added:
> >
> > <listener>
> >       <listener-class>
> >
> > de.mindmatters.faces.spring.context.ContextLoaderListener
> >       </listener-class>
> > </listener>
> >
> >
> > With kind regards,
> >       Marco
> >
> >
> > -----Original Message-----
> > From: Lisa [mailto:apache_support@purpleblade.net]
> > Sent: maandag 5 februari 2007 6:44
> > To: users@myfaces.apache.org
> > Subject: JSF lifecyle - managed-bean
> >
> >
> > Is there a way to automatically call an init() method after all setters
> > have
> > been called on a managed-bean?  I am looking for something I can put in
> > the
> > .xml config file or an interface that I can extend.
> >
> > Spring has this facility.  We are using Spring for most of the framework
> > but
> > using JSF managed-bean facility for all backing beans.
> >
> >
> > thanks
> >
> >
> > L
> > --
> > View this message in context:
> > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> > 8
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Notice:  This e-mail message, together with any attachments, contains
> > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> > New Jersey, USA 08889), and/or its affiliates (which may be known
> > outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> > and in Japan, as Banyu - direct contact information for affiliates is
> > available at http://www.merck.com/contact/contacts.html) that may be
> > confidential, proprietary copyrighted and/or legally privileged. It is
> > intended solely for the use of the individual or entity named on this
> > message. If you are not the intended recipient, and have received this
> > message in error, please notify us immediately by reply e-mail and then
> > delete it from your system.
> >
> > ------------------------------------------------------------------------------
> >
> >
>
> --
> View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8817399
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

RE: JSF lifecyle - managed-bean

Posted by Lisa <ap...@purpleblade.net>.
We are using Spring in other parts of the framework but not on our Backing
Beans.  This would take some rework to use Spring on the front-end beans. 
Also upgrading to Spring 2.0 would take some work as well and we are already
behind.

I am aware that you can do this in Spring but could not find an easy way to
do it in JSF.

Thanks


L



Beelen, Marco wrote:
> 
> Hello Lisa,
> 
> I'm solving that problem by implementing the InitializingBean-interface
> of Spring on my managed bean and use the jsf-spring-library (
> http://jsf-spring.sourceforge.net/ ) to make sure that the method is
> being called:
> 
> My faces-context.xml contains:
> 
> <application>
> 	<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
> 
> 	
> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolve
> r</variable-resolver>
> </application>	    
> 	
> And in the web.xml I added: 
> 
> <listener>
> 	<listener-class>
> 	
> de.mindmatters.faces.spring.context.ContextLoaderListener
> 	</listener-class>
> </listener>
> 
> 
> With kind regards,
> 	Marco
> 
> 
> -----Original Message-----
> From: Lisa [mailto:apache_support@purpleblade.net] 
> Sent: maandag 5 februari 2007 6:44
> To: users@myfaces.apache.org
> Subject: JSF lifecyle - managed-bean
> 
> 
> Is there a way to automatically call an init() method after all setters
> have
> been called on a managed-bean?  I am looking for something I can put in
> the
> .xml config file or an interface that I can extend.
> 
> Spring has this facility.  We are using Spring for most of the framework
> but
> using JSF managed-bean facility for all backing beans.
> 
> 
> thanks
> 
> 
> L
> -- 
> View this message in context:
> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
> 8
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> and in Japan, as Banyu - direct contact information for affiliates is 
> available at http://www.merck.com/contact/contacts.html) that may be 
> confidential, proprietary copyrighted and/or legally privileged. It is 
> intended solely for the use of the individual or entity named on this 
> message. If you are not the intended recipient, and have received this 
> message in error, please notify us immediately by reply e-mail and then 
> delete it from your system.
> 
> ------------------------------------------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8817399
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: JSF lifecyle - managed-bean

Posted by "Beelen, Marco" <ma...@merck.com>.
Hello Lisa,

I'm solving that problem by implementing the InitializingBean-interface
of Spring on my managed bean and use the jsf-spring-library (
http://jsf-spring.sourceforge.net/ ) to make sure that the method is
being called:

My faces-context.xml contains:

<application>
	<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

	
<variable-resolver>org.springframework.web.jsf.DelegatingVariableResolve
r</variable-resolver>
</application>	    
	
And in the web.xml I added: 

<listener>
	<listener-class>
	
de.mindmatters.faces.spring.context.ContextLoaderListener
	</listener-class>
</listener>


With kind regards,
	Marco


-----Original Message-----
From: Lisa [mailto:apache_support@purpleblade.net] 
Sent: maandag 5 februari 2007 6:44
To: users@myfaces.apache.org
Subject: JSF lifecyle - managed-bean


Is there a way to automatically call an init() method after all setters
have
been called on a managed-bean?  I am looking for something I can put in
the
.xml config file or an interface that I can extend.

Spring has this facility.  We are using Spring for most of the framework
but
using JSF managed-bean facility for all backing beans.


thanks


L
-- 
View this message in context:
http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a880137
8
Sent from the MyFaces - Users mailing list archive at Nabble.com.




------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

------------------------------------------------------------------------------

Re: JSF lifecyle - managed-bean

Posted by Martin Marinschek <ma...@gmail.com>.
... and yet another way is to use Spring 2.0 instead of your JSF managed
beans as well, that works perfect.

Declare your managed-beans in whatever scope you want them (session or
request) and use Spring's init-method feature, just as you're used to.

regards,

Martin

On 2/5/07, Cagatay Civici <ca...@gmail.com> wrote:
>
> Hi,
>
> Another way is to create your own mapping;
>
> http://www.jroller.com/page/cagataycivici?entry=managed_beans_aware_of_the
>
> Regards,
>
> Cagatay
>
> On 2/5/07, Volker Weber <v....@inexso.de> wrote:
> >
> > Hi,
> >
> > all properties are set in the order they are defined in the
> > faces-config.xml.
> > This is defined in the spec.
> > So you can define a dummy setter as last one in the config as init
> > method.
> > e.g.:
> >
> >
> > <managed-bean>
> >   ...
> >   <managed-property>
> >     <description>
> >       dummy init MUST be the last property
> >     </description>
> >     <property-name>init</property-name>
> >     <value>true</value>
> >   </managed-property>
> > </managed-bean>
> >
> > public void setInit(boolean init) {
> >     init();
> >   }
> >
> > Regards,
> >   Volker
> >
> > 2007/2/5, Lisa < apache_support@purpleblade.net>:
> > >
> > > Is there a way to automatically call an init() method after all
> > setters have
> > > been called on a managed-bean?  I am looking for something I can put
> > in the
> > > .xml config file or an interface that I can extend.
> > >
> > > Spring has this facility.  We are using Spring for most of the
> > framework but
> > > using JSF managed-bean facility for all backing beans.
> > >
> > >
> > > thanks
> > >
> > >
> > > L
> > > --
> > > View this message in context:
> > http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
> > > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> > >
> > >
> >
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: JSF lifecyle - managed-bean

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

Another way is to create your own mapping;

http://www.jroller.com/page/cagataycivici?entry=managed_beans_aware_of_the

Regards,

Cagatay

On 2/5/07, Volker Weber <v....@inexso.de> wrote:
>
> Hi,
>
> all properties are set in the order they are defined in the
> faces-config.xml.
> This is defined in the spec.
> So you can define a dummy setter as last one in the config as init method.
> e.g.:
>
>
> <managed-bean>
>   ...
>   <managed-property>
>     <description>
>       dummy init MUST be the last property
>     </description>
>     <property-name>init</property-name>
>     <value>true</value>
>   </managed-property>
> </managed-bean>
>
> public void setInit(boolean init) {
>     init();
>   }
>
> Regards,
>   Volker
>
> 2007/2/5, Lisa <ap...@purpleblade.net>:
> >
> > Is there a way to automatically call an init() method after all setters
> have
> > been called on a managed-bean?  I am looking for something I can put in
> the
> > .xml config file or an interface that I can extend.
> >
> > Spring has this facility.  We are using Spring for most of the framework
> but
> > using JSF managed-bean facility for all backing beans.
> >
> >
> > thanks
> >
> >
> > L
> > --
> > View this message in context:
> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>

Re: JSF lifecyle - managed-bean

Posted by Volker Weber <v....@inexso.de>.
Hi,

all properties are set in the order they are defined in the faces-config.xml.
This is defined in the spec.
So you can define a dummy setter as last one in the config as init method.
e.g.:


<managed-bean>
  ...
  <managed-property>
    <description>
      dummy init MUST be the last property
    </description>
    <property-name>init</property-name>
    <value>true</value>
  </managed-property>
</managed-bean>

public void setInit(boolean init) {
    init();
  }

Regards,
  Volker

2007/2/5, Lisa <ap...@purpleblade.net>:
>
> Is there a way to automatically call an init() method after all setters have
> been called on a managed-bean?  I am looking for something I can put in the
> .xml config file or an interface that I can extend.
>
> Spring has this facility.  We are using Spring for most of the framework but
> using JSF managed-bean facility for all backing beans.
>
>
> thanks
>
>
> L
> --
> View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: JSF lifecyle - managed-bean

Posted by Lisa <ap...@purpleblade.net>.
I have had Shale in mind for some time now and found some reference to this
feature while googling, but unfortunately in this release we can not make
any major improvements (and integrate Shale), but this is yet another reason
I can put on my list so that management will allow time.

thanks


L


craigmcc wrote:
> 
> On 2/4/07, Lisa <ap...@purpleblade.net> wrote:
>>
>>
>> Is there a way to automatically call an init() method after all setters
>> have
>> been called on a managed-bean?  I am looking for something I can put in
>> the
>> .xml config file or an interface that I can extend.
>>
>> Spring has this facility.  We are using Spring for most of the framework
>> but
>> using JSF managed-bean facility for all backing beans.
> 
> 
> The "view controller" feature of the Shale framework[1] supports this use
> case.  The init() callback is called after the view has been restored (and
> after any managed property setters have been called), but before the main
> part of the lifecycle proceeds.  If you want to initialize things only
> when
> processing a postback, and not on a get, use the preprocess() callback
> instead.  There are also prerender() and destroy() callbacks, for pulling
> data you need to render from your model, and cleaning up after rendering,
> respectively.
> 
> thanks
>>
>>
>> L
>> --
>> View this message in context:
>> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> Craig McClanahan
> 
> [1] http://shale.apache.org/shale-view/index.html
> 
> 

-- 
View this message in context: http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8802245
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: JSF lifecyle - managed-bean

Posted by Craig McClanahan <cr...@apache.org>.
On 2/4/07, Lisa <ap...@purpleblade.net> wrote:
>
>
> Is there a way to automatically call an init() method after all setters
> have
> been called on a managed-bean?  I am looking for something I can put in
> the
> .xml config file or an interface that I can extend.
>
> Spring has this facility.  We are using Spring for most of the framework
> but
> using JSF managed-bean facility for all backing beans.


The "view controller" feature of the Shale framework[1] supports this use
case.  The init() callback is called after the view has been restored (and
after any managed property setters have been called), but before the main
part of the lifecycle proceeds.  If you want to initialize things only when
processing a postback, and not on a get, use the preprocess() callback
instead.  There are also prerender() and destroy() callbacks, for pulling
data you need to render from your model, and cleaning up after rendering,
respectively.

thanks
>
>
> L
> --
> View this message in context:
> http://www.nabble.com/JSF-lifecyle---managed-bean-tf3172695.html#a8801378
> Sent from the MyFaces - Users mailing list archive at Nabble.com.


Craig McClanahan

[1] http://shale.apache.org/shale-view/index.html