on 03-16-2010 1:09 AM
In one package, there are two component - cp1, cp2, and a class cl_test with a private static attribute val and static method set/get for the static attribute.
Now I want to share this static attribute between the two component. Since they are in different session.Is there any way to make the static attribute shared?
Thanks a lot
>Since they are in different session.
What do you mean by different sessions? Static attributes have a lifetime across the entire user session. So if you have mulitple component usages - or you perform navigation from one component to another, the static attribute will persist. However if you in fact have different user sessions, they can't share the static attribute. For sharing across user sessions, you should consider shared memory objects or writting of the data into the database (for instance via Server Cookies).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is your get/set method public, if yes then you can access this static attr using these methods.
Regards
Manas Dua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.