I have a JSF page with scope defined as request.
In one of the action method of first button I am assigning values to page elements as
bean.setEmpNo("abc");
In another button I am calling a method to save values to database. When I click second button values which I assigned by clicking first button gets cleared.
Is this because my scope is request?
What are the best ways to keep the values assigned to page attributes even though I invoke other buttons in same page?
My JSF version is 1.1
Thanks
Yes request scope’s life is from request to response only.. if you want it for the same view you can use
ViewScope