Re: viewScope vs RequestScope
Hi Samirlta,
Here is the difference between viewScope and requestScope,
viewScope -
The viewScope is a variables that exist for the duration of the current view i.e. the current page. They are not accessible outside of that view.
The viewScope is useful when a value must be stored for the current page and can deleted when the user moves to another page.
requestScope -
The requestScope variables last for the duration of the request. This means the variables will last for the duration of a url request from the server.
The variable can exist across XPages i.e. if an XPage is requested from another XPage. The requestScope variables are useful for variables which can be deleted straight after the value is submitted to the server. This means that there is not extra memory being used to store variables that are no longer needed.
For an example, Check below link.
http://kramkumarmca.blogspot.in/2012/01/difference-between-viewscope-and.html