Accessing Different Scopes programatically in ADF.

You can use the following piece of codes to access different scope programatically.

1)  How to programmatically access requestScope objects

        ADFContext context= ADFContext.getCurrent();
         Map reqScope = context.getCurrent().getRequestScope(); 
         reqScope.put("Name","Kunal Kumar");
         

2)  How to programmatically access ApplicationScope objects

        ADFContext context= ADFContext.getCurrent();
         Map appScope = context.getCurrent().getApplicationScope();
         appScope.put("Name","Kunal Kumar");

3)  How to programmatically access sessionScope objects

        ADFContext context= ADFContext.getCurrent();
         Map sessScope = context.getCurrent().getSessionScope();
        sessScope.put("Name","Kunal Kumar");

4)  How to programmatically access viewScope objects

       AdfFacesContext context= AdfFacesContext.getCurrentInstance();
        Map viewScope = context.getViewScope();
        viewScope .put("Name","Kunal Kumar");

5)  How to programmatically access pageFlowScope objects

        AdfFacesContext context= AdfFacesContext.getCurrentInstance();
        Map pageFlowScope = context.getPageFlowScope();
        pageFlowScope.put("Name","Kunal Kumar");



Comments

Popular posts from this blog

Setting up the environment for Angular2 and Hello World Example in Angular2

Showing number of rows or row count on top and bottom of table in ADF.

Build a Simple ReactJS application using react-cli