• Post Reply Bookmark Topic Watch Topic
  • New Topic

On page load events ?

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a page which i want to make some specific kind of checks on the data it contains before it loads.

I have used life cycle events to call a method which i have implemented in the page's backing bean, but it kept giving me null, which means that the values have not been initialized yet.

So, is there a way to let some specific method in my backing bean to be invoked in an automatic basis each time the page is requested ?

Thanks in advance ...
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the scope of your backing bean?
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The scope of my backing bean is request.

Do i have to change it some specific scope ?
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to initialize the bean at the page before doing the validations. You could do that with

<jsp:usebean>

JSP UseBean

Personally I'm not a fan of this solution, but you could have a try if it solves your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!