hii
I dont use seam for this project..
I tested sessionScope,on the debug mode, the adress bean values are not nul;
but, on the JSF page the EL expression #{adress.xxxx}, do not display
anything. it seems that it's not the same instance of bean..
Ulath wrote:
>
> could you try to add sessionScope.address ?
>
> <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>#{sessionScope.adress}</value>
> </managed-property>
> </managed-bean>
>
> and if you use seam why do u need bean definitions in faces-config.xml
> like
> this?
>
>
> On 10/11/07, lmk <[EMAIL PROTECTED]> wrote:
>>
>>
>> No it's not a singleton,
>> adress bean is a session bean, and I need to use it one the person
>> bean..I
>> should have one instance of per session.
>> the purpose here is to set adress bean properties on the person bean
>> ..using dependency injection..
>> JSF is an ioC container..so its not necessary to use spring just for that
>> !!!
>>
>>
>>
>> logancillo wrote:
>> >
>> > I am thinking about understanding that what you need is that the bean
>> > person
>> > is a singleton. I believe you need spring with jsf.
>> >
>> > 2007/10/11, lmk <[EMAIL PROTECTED]>:
>> >>
>> >>
>> >> 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.
>> >>
>> >>
>> >
>> >
>> > --
>> > Alonso Isidoro Roman.
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JSF-and-dependency-injection-tf4605688.html#a13151716
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Murat HAZER
> http://www.projedunyasi.org
>
>
--
View this message in context:
http://www.nabble.com/JSF-and-dependency-injection-tf4605688.html#a13209649
Sent from the MyFaces - Users mailing list archive at Nabble.com.