You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Charbel Abdul-Massih <ca...@soundbite.com> on 2006/12/05 17:27:37 UTC

2 beans used on one page - order of calling

I have 2 beans on one page (one session scope, one request scope)

 

My first ever request in the session, the request scoped bean's
constructor gets called before the session scoped bean's...Is there a
way to reverse that order???

 

Thx,
Charbel


Re: 2 beans used on one page - order of calling

Posted by Jeff Bischoff <jb...@klkurz.com>.
Charbel,

I would avoid putting much, if anything, in the constructor of a managed 
bean - especially if you are worried about the order! Please see this 
previous thread [1] for some thoughts and options.

[1] http://www.nabble.com/Backing-Bean-Constructor-tf2371791.html#a6608331

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Charbel Abdul-Massih wrote:
> I have 2 beans on one page (one session scope, one request scope)
> 
>  
> 
> My first ever request in the session, the request scoped bean's
> constructor gets called before the session scoped bean's...Is there a
> way to reverse that order???
> 
>  
> 
> Thx,
> Charbel
> 
> 



Re: 2 beans used on one page - order of calling

Posted by Mr Arvind Pandey <ar...@yahoo.co.in>.
Hi,

   I think you are accessing request bean's data first
in your page then you would be accessing session
bean's data later in the page. 
    Anyway I don't think order of constructors being
invoked really matters untill unless they have some
internal relation.

Regards....
Arvind


--- Charbel Abdul-Massih <ca...@soundbite.com>
wrote:

> I have 2 beans on one page (one session scope, one
> request scope)
> 
>  
> 
> My first ever request in the session, the request
> scoped bean's
> constructor gets called before the session scoped
> bean's...Is there a
> way to reverse that order???
> 
>  
> 
> Thx,
> Charbel
> 
> 



		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/