• TBahri
  • NEWBIE
  • 0 Points
  • Member since 2010
  • Acumen Solutions


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I want to be able to read / write some variables to the current session in my Salesforce site pages.

I have a site built using Salesforce Sites, I need to store/retrieve some values across all the pages (consider that I am building something similar to a shopping cart). However I cant find any good example on how to read and write variables to the session (anonymous user).

 

I am using Visualforce pages with "several controllers" built in Apex.

 

I also went through this question:

http://forums.sforce.com/t5/Visualforce-Development/Storing-and-Accessing-of-Session-variables-in-APex-Page-aswell/m-p/153871

 

The suggested solutions are not valid:

1- Using cookies is not possible, I want more secure place to store the values.

2- Using the same controller also is not possible, I have dozens of pages, i cant use the same controller for them all

3- Using the custom settings seems not valid too, as they are not built for such things

  • February 23, 2011
  • Like
  • 0

How to store variables in Session and how to access that Session Variable in Apex Page & in Contoller?.
 
Regards,
KK