cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing context across views

Former Member
0 Kudos

Hi.

Each of the individual views (10+) in my WebDynpro application needs to know and display the same employee

information about the logged-in user. Further, the user can enter the application from any one of the views. And once the application is entered, the user will likely visit several of the views. My project structure is simple in that all of the views are contained within a single component. To move from view to view, my code is invoking navigateAbsolute to another portal pcd location (iView) that invokes the target WebDynpro view. By doing this, the portal navigation and the Webdynpro application orientation stay in sync.

My goal is to store this shared information such that the application <u>only needs to retrieves the employee information ONCE per user session</u>. In a J2EE application this type of information is generally stored in "session".

Here are my questions:

1. Do I need to store this employee information in a context "node", not a "value"? Basically, how and where do I store this information to make it available across all views within the application?

2. How do I programmatically check if a previous view has already invoked the RFC and populated the data in the shared session area?

Thank you!

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kevin,

<i>1. Do I need to store this employee information in a context "node", not a "value"? Basically, how and where do I store this information to make it available across all views within the application?</i>

You can store this information as a value node in the component controller's context. By doing so all your views can access this value.

<i>2. How do I programmatically check if a previous view has already invoked the RFC and populated the data in the shared session area?</i>

You can check if the node size is zero or if it contains any elements. So once you have invoked the RFC, you will have to add a new element to this value node.

Regards,

Satyajit.

Answers (0)