Setting the value in Different scope in ADF in programmatic way

Sometime in ADF application we want to set the value in different scope programmatic .How to do that.
Use below code to do that.You can create a variable in any scope and put value in it

 
  ADFContext adfCtx = ADFContext.getCurrent();
       Map appScope = adfCtx.getApplicationScope();
       appScope.put("vinay", "true");

Similarly you can get the value of any variable stored in any variable

 
  ADFContext adfCtx = ADFContext.getCurrent();
       Map appScope = adfCtx.getApplicationScope();
    String appScopeValue=  (String)appScope.get("vinay");

Vinay

I am an Oracle ACE in Oracle ADF/Webcenter. Sr Java Consultant-working on Java/J2EE/Oracle ADF/Webcenter Portal/ content and Hibernate for several years. I'm an active member of the OTN JDeveloper/Webcenter forum. Passionate about learning new technologies. I am here to share my knowledge. Give your views and suggestion on [email protected] .

More Posts - Website

Follow Me:
TwitterLinkedInGoogle PlusYouTube