This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
myfaces-impl-1.1.3 instantiates the request scope bean
Elliot Khazon
Greenhorn
Joined: Jun 28, 2006
Posts: 3
posted
0
Hi all, myfaces-impl-1.1.3 instantiates the request scope bean every request (like it suppose to), however it doesn't retain any state information about the bean even though t:saveState tag is specified. When I use myfaces-impl it works just fine. Here is how i use the bean.
Bean.java --------------- private String value = ""; private int number = 0; public Bean() {
page.jsp ------------ <f:view> <% int number = req.getParameter ("number"); if (number != INVALID_VALUE) { //if value wasn't invalid then init the bean
Application has some jsf and non-jsf pages on it. when the transition is done from a non-jsf page to jsf page a number is passed to initialize all the DB persistent objects. Basically the non-jsf page has a table with things to edit and every entry in the table has an id (number). When user clicks on the item to edit the request is sent with this parameter via URL string. The receiving page (jsf page) extracts the parameter and initilizes the model with data from database. The way it used to work before is that all the initilized objects in the bean were retained using the state tag. However now it is not.
Elliot Khazon
Greenhorn
Joined: Jun 28, 2006
Posts: 3
posted
0
To expand on the issue: the reason why is because the value is collected by a javascript function which then posts to the form (that is a form inside jsf file)
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: myfaces-impl-1.1.3 instantiates the request scope bean