• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF beans lifecycle postContruct initialize

 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
All of the following truths are shameless lies. But what about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic