Hmmmm... There really should be only one instance of each (Person and Address) in the session. Have you tested this to make sure you're not setting that value somewhere else?
As a side note, it'd probably make more sense to make Address a "none" scoped object and just access it through the Person object. I think it makes sense to keep the smallest number of objects in any given scope. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kito D. Mann - Author, JavaServer Faces in Action http://www.virtua.com - JSF/Java EE consulting, training, and mentoring http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info > -----Original Message----- > From: lmk [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 11, 2007 3:00 AM > To: [email protected] > Subject: JSF and dependency injection > > > Hello.. > > I'd juste understand how JSF IOC container works..i tried to do > something > like .. > > <managed-bean> > <managed-bean-name>person</managed-bean-name> > <managed-bean-class>x.y.Person</managed-bean-class> > <managed-bean-scope>session</managed-bean-scope> > <managed-property> > <property-name>adress</property-name> > <property-class>x.y.z.Adress</property-class> > <value>#{adress}</value> > </managed-property> > </managed-bean> > <managed-bean> > <managed-bean-name>adress</managed-bean-name> > <managed-bean-class>x.y.z.Adress</managed-bean-class> > <managed-bean-scope>session</managed-bean-scope> > <managed-property> > <property-name>..</property-name> > <property-class>...</property-class> > <value>#{adress}</value> > </managed-property> > </managed-bean> > > On the Person bean when I set adress value, it's not the same instance > of > the adress on the session..I should do #{person.adress.xx} to get > adress > values on the jsf pages.. > how can i share identical instance for the bean..??? > > using annotation and seam we can write on the Person bean: > > @In("adress") > private Adress adress; > > thanks .. > > > -- > View this message in context: http://www.nabble.com/JSF-and-dependency- > injection-tf4605688.html#a13151202 > Sent from the MyFaces - Users mailing list archive at Nabble.com.

