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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 < [EMAIL PROTECTED]> 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 < [EMAIL PROTECTED]> 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: [EMAIL PROTECTED] ] > > > 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 > > >