This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 13, 2012, 5:08 AM
11 Posts

viewScope vs RequestScope

  • Category: APIs
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: viewScope vs RequestScope
  • Replies: 1
Hi,
Could anyone  explain me  the difference between viewScope & RequestScope with example as i am bit confused between the two.
Jun 13, 2012, 10:41 AM
25 Posts
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

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal