on 12-12-2008 8:26 AM
Hi Experts,
We having problem in clearing context.
We have build every thing in DC's.
Initially i will get dashboard with all projects list. When click on link i will get few tab each tab is having one view container which is pointing to other DC's, which are added as Used DC's in the main DC.
I went to one of the tab i have given value (Date, etc.), then i have not done any thing.
I clicked on button at the top which navigates me to dashborad once agin. then i click on another project which displayed set of tabs related to that project. If suppose this prject and previous project having same tab and second project is not having any initial values in those fields where i have given values for first project. If i go to that comon tab(Second Project) i am getting what ever the values i have given for the first project.
NOTE:
1. I have not refreshed the browser.
2. I have done the above process in the same browser without closing it.
3. If i close the browser once first project visit is over the every thing is working fine.
Please help me out ASAP.
Thanks,
Udaya.
Hi Uday,
The first project details are displaying in the screen because, webdynpro does state persistence. One more thing is you are using the same component instance both the time.
When you close the browser and open again, you are not facing the problem because the component instance is different.
You can follow any one of the solutions below:
1. On navigation to that page, before fetching the data, you can clear all the context attributes. (Write the code on navigation method). You can simply do wdContext.nodeXYZ().invalidate();
2. You may be fetching the data using some model. when you execute the model, if there is no data for the selected project, put Empty strings in those corresponding context attributes.
Let me know if you need any clarification on this.
Regards,
VJR.
Edited by: VJR on Dec 12, 2008 4:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I can give you one more scenario:
I have dropdown which is going to hold Contact information. In the view i have node X which is not mapped to any interface it's binded to only dropdown. What ever we get from model we are addidng to the Node X.
in this case for the first project i have 4 contacts, when come to this screen first i got 4 contacts only. then i went back to dashborad and come again for second project which is having 2 contacts, but the dropdown showing 4+2 (6 Contacts).
I have printed the size comming from the model & node X, i am getting
First Proj : 4 & 1
Second Proj: 2 & 1
I hope this will give you clear picture on my issue. My assumtion is that dropdown is getting previous values either from cookies or cache. if you have any idea to clear cach on any webdynpro action that might works.
Thanks,
uday.
Hi,
wat i understood is, the elements are getting added to the attribute of node X each time when u are navigating to the screens. Therefore each time when you come to second project use this code
before setting the values to the node X
wdContext.nodeX().getContext().reset(false);
//after this line set or add the values to the required attribute.
May be this helps u.
Thanks
Prasad.
hi,
Almost similar situation i also faced.
what i did is i explicity cleared all the contexts when the data is no longer needed
Thanks and Regards
shanto aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.