Hi,
I have a small confusion about refreshing a page....
I have a JSF page in which when I click on the
submit button I am saving all the data in the database.
The saving to the database is performed fine and after that I am returning
null from the action method of the submit button....
One more thing since I am returning to the same page again and the backing bean for this page is in
session scope so when i return to the page I do something like this so that it gives a feel as if the user has opened the page freshly.
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("MyBean",null);
It works fine uptil here...But now when i refresh the page .... it submits the page again and it tries to send the same data to the database...
My confusion is
how its sending the same data to the database....I mean
I made the backing bean as null and stored in the session map...then how its getting the same set of values....
Shouldn't the fields of the backing bean be empty too...
Please throw some light on this....its a little confusing...it might be some misunderstanding of the concept....
So please help me know why its doing like that