You can use injections service available in JSF. The attributes of Backed bean can be initialized part of definition using other Backedbean properties.

 

It is a great feature. The class code looks neat, as no initialization code, also it is easy to modify initialization code , which is part of Backed bean definition.

 

Regards

Murali

248.766.9009 (Cell)

 

This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information belonging to ECON LLC. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments


From: Stefan Gesigora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 31, 2005 7:00 AM
To: MyFaces Discussion
Subject: AW: best way to initialize BackingBean?

 

I use this kind of bean. But I have to initialize it dynamically. Like the initialization of a Form class in an action class in struts.

 


Von: Guy Katz [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 31. August 2005 12:54
An: MyFaces Discussion
Betreff: RE: best way to initialize BackingBean?

 

why not use use a request scope bean  and bind it to the JSP you talk about?


 -----Original Message-----
From: Stefan Gesigora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 31, 2005 11:54 AM
To: MyFaces Discussion
Subject: best way to initialize BackingBean?

 

Hi folks!

 

What is the best way to initialize BackingBeans?

I would like to get data from a DB everytime before the jsp will be shown initializing the jsp with this data.

I can’t use the constructor initialization cause I need it everytime not only the first time.

I can’t use initialization via managed-property cause the data isn’t static…

 

Any suggestions?

 

Thx

Stefan Gesigora

 

Reply via email to