Feb 12, 2014, 2:47 AM
2 Posts

sessionScope HashMap & checkboxes

  • Category: Dojo and Client Side JavaScript
  • Platform: All
  • Release: All
  • Role: Administrator,Developer,End User
  • Tags: xpages,ajax,sessionscope,checkbox,hashmap,array
  • Replies: 1


I'm having serious issue (maybe its more of an understanding issue?) where sessionScope just doesn't want to cooperate with me? Here is the thing:

- my website has alot of checboxes. when clicking one, ajax call is used to just store checbox info into sessionScope hashmap. This works.
- if you uncheck checkbox, ajax call is made again, this time, it removes the entry from sessionScrope hashmap. This works.
- checking and unchecking works as charm since i'm listing hashmap after every ajax call to see the debug info.

Now... if i refresh my main site with checkboxes, another javascript is taking sessionScope hashmap and check checkboxes that are stored in sessionScope hashmap. Pretty self explanatory, right?

Well, after I refresh the site, it looks like as the page takes PREVIOUS sessionScope HashMap (meaning the one, before I refreshed the page).  But, it doesn't end here. After 2nd refresh, it shows the correct result. After 3rd refresh, it shows the previous HashMap state and so it stays. :|

Am I missing something here? And as soon as I refresh, HashMap is now from previous state without writing anything to it, just reading it.

How is this possible?

Please help me out understand this thing because I have no idea what is going on...


best regards,


Feb 14, 2014, 8:25 AM
2 Posts

XPages development forum and most of the others on IBM Developerworks is more or less dead. You usually don't get ANY support from IBM.

with a little help from stackoverflow I've created a solution to my problem, which can be found here: http://stackoverflow.com/questions/21721738/sessionscope-hashmap-checkboxes

I suggest people seeking an advice to use stackoverflow, rather than IBM developerworks.


sadly. thanks to ibm.