This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes Constructor of a Backing Bean of JSF page Invoking Twice on Initial Load Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Constructor of a Backing Bean of JSF page Invoking Twice on Initial Load" Watch "Constructor of a Backing Bean of JSF page Invoking Twice on Initial Load" New topic
Author

Constructor of a Backing Bean of JSF page Invoking Twice on Initial Load

Sreekanth Kalakanti
Greenhorn

Joined: Sep 09, 2009
Posts: 12
Hi,

I Developed a JSF(1.2) Application using Sun RI Components and muy Problem is The Constructor of Backing Bean of a jsf
File getting invoked twice when a JSF Page is loaded.

I Placed a System.out.println("Inside the LoginBean");

My Code looks like:

For login.jspx the backing bean is LoginBean.java


public class LoginBean {

//Constructor
public LoginBean() {

// To get the ListBoxes data when page is Loaded
getDataDynamically();

System.out.println.info("Inside the LoginBean");

} // end of Constructor

} //end Class

OutPut:
In my console the println statement (Inside the LoginBean) is executed twice.

can any one suggest me a solution fr my Problem(I must not use HttpSession in my Code).
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Constructor of a Backing Bean of JSF page Invoking Twice on Initial Load
 
Similar Threads
Validation error while trying to change a value in a request scope bean
control the running order of different back bean functions
Injecting Beans as Parameters (Injected Bean reference is null)
EvaluationException: Cannot get value for expression
how to initialize a backing bean before a page loads