cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Session

Former Member
0 Kudos

Hello

we need a session-store (maintaining state) which is shared between several WebDynpros.

The WebDynpros are embedded into the Portal as iViews, any hint how to get such a shared session-store?

Thanks! Kai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Create a new project, or use existing one. Create a component inside it and create all the data you need to be shered in component controller's context. Create the coresponding interface controller and map context there. Put the interface controller in the public part of your dc. Use the interface in all other web dynpro projects were you need this data. In such way you can write and you can read data between all your web dynpro projects that you have.

Former Member
0 Kudos

Thank you Anton,

could you please clarify things:

- WebDynpro
- Components -> create Component "SharedContext"
       -> Component Controller -> Context -> ...

- Component Interfaces -> create Component Interface Definition "SharedContextInterface"
        -> Interface Controller -> Context -> Mapping

Is this correct?

Thanks!

Kai

Former Member
0 Kudos

Yes, you understand me correctly. In the context of component controller of your SharedSession component put all the data that you need. Than in the interface controller map all the nodes and attributes you had created in the component controller. After that you must just create a public part and put the interface controller in the public part of your dc. Use this component in every other component where you want this data to be used. Map all context nodes and attributes that you have created in SharedSession component's interface controller to the referenced components. And that's all.

Best regards,

Anton

Former Member
0 Kudos

Hey Anton,

thanks for your clarification.

Using NW7.1 EHP1 NWDS does not allow me to create mapped Context-Attributes or -Nodes in the Interface-Controller, it's grayed out. I am only allowed to created Model- and Structure-bound Nodes and manually created Nodes and Attributes.

Any Idea why your advice is not working?

Thanks in advance,

Kai

Former Member
0 Kudos

It is strange, I haven't work with 7.11 but I'm pretty sure that this is possible.

1). You must open your interface controller, go to the first tab - properties. There, in 'required controllers' you must add your component controller.

2). In the interface controller create new node (just a node). With the right click of the mouse on this node you will get the context menu, where you can find context mapping and there you must see the nodes you have created in the component controller. After that select a node and node attributes you wanted to.

If this is not working with 7.11 then I can not help you.

Best regards,

Anton

Former Member
0 Kudos

Thank you very much for your ongoing effort, Anton.

Neither

Component Interfaces -> SharedContextIface -> Interface Controller

nor

Components -> SharedContextComp -> Local Component Interface -> Interface Controller

have any option to set required controllers. Only "normal" Component Controllers do have the "Required Controllers" Table under Tab Properties.

Anyone here having experience with EHP1?

Thanks!

Former Member
0 Kudos

I think I got it: You have to define the context in the Interface first, and then "implement" (mapping) the context to the Component Controller.

I tried to define the context in the Component Controller and map it into the Interfaces, which wont work.

Thanks alot for your help, Anton!

However, the whole-component-sharing does not work as a singleton session-store under NW 7.1 EHP1.

Any hints are appreciated

Former Member
0 Kudos

What do you mean by singleton session-store? One session for all users, one session for all aplications that user is using?

Former Member
0 Kudos

One session shared by all WebDynpros. Preferably additionally per User.

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Kai

There are several ways of implementing shared session between WebDynpro apps. I recommend WebDynpro API WDScopeUtil. It allows to share String data between components. The WD scope can be of different types. The most long living is WDScopeType.CLIENTSESSION_SCOPE.

BR, Siarhei