aspose file tools*
The moose likes JSF and the fly likes JSF beans lifecycle postContruct initialize Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF beans lifecycle postContruct initialize" Watch "JSF beans lifecycle postContruct initialize" New topic
Author

JSF beans lifecycle postContruct initialize

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Folks,

I am having an application with Spring 2, JSF 1.2 and Hibernate. I have some backing beans which has some code which needs to be executed before the page is loaded. also the code which needs to be executed has some calls to spring bean which are accessed with 'DelegatingVariableResolver',

Presently i am resolving this with the call to the method in the first line in the jsp pages by calling. #{Bean1.init} but i am sure there is a better way to do it , which i am not able to find.

Any clues to this is highly appreciated.

Thanks.
Rahul


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Thanks folks. I got my answer it is the postContruct annotation in the lifecycle. And it wasn't working before because i had a checked exception thrown from the initializing method.

Thanks,
Rahul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF beans lifecycle postContruct initialize