InterviewSolution
| 1. |
What Are Various Scopes In Adf.explain Difference Between Pageflow Scope, Backing Bean Scope, Session Scope, View Scope, Request Scope, Application Scope? |
|
Answer» In addition to the normal object scopes that jsf (1.2) defines, adf adds some more on top of it. I will try to differentiate the different memory scopes available in adf. Application Scope: Just LIKE a static object in java. Single Object available to all users. GETS instantiated when server starts. SESSION Scope: Your normal session variables. used to STORE the data specific to a specific user to be used during a session. PageFlow Scope: Simply a value once set in a page flow scope is available in all the PAGES that are part of the taskflow. Request Scope: Now this is good. Lets say on one page we have a number of components like a button, LOVs , input boxes etc. To clearly understand the request scope lets say we select a drop down. Clicking on the drop down sends a request to the server and the page stays as it is. So each action basically here is a request to the server and the values stored in the request scope changes on each request. Request scope doesn’t mean the entire page has to change or get submitted. ADF Faces is built on Ajax and clicking on LOVs and buttons at times generate partial submits. View Scope: Values set in the view scope area available on till that page it rendering. One you change from one page to another the value is lost. In addition to the normal object scopes that jsf (1.2) defines, adf adds some more on top of it. I will try to differentiate the different memory scopes available in adf. Application Scope: Just like a static object in java. Single Object available to all users. Gets instantiated when server starts. Session Scope: Your normal session variables. used to store the data specific to a specific user to be used during a session. PageFlow Scope: Simply a value once set in a page flow scope is available in all the pages that are part of the taskflow. Request Scope: Now this is good. Lets say on one page we have a number of components like a button, LOVs , input boxes etc. To clearly understand the request scope lets say we select a drop down. Clicking on the drop down sends a request to the server and the page stays as it is. So each action basically here is a request to the server and the values stored in the request scope changes on each request. Request scope doesn’t mean the entire page has to change or get submitted. ADF Faces is built on Ajax and clicking on LOVs and buttons at times generate partial submits. View Scope: Values set in the view scope area available on till that page it rendering. One you change from one page to another the value is lost. |
|