function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
eswarieswari 

URGENT: Store and retrieve from session and sorting

Hi,

 

I want to store a list of valueobjects in a session and retrieve the values from session whenever required.

 

For this, one way I found is, using the same controller for all the pages wherever I require the data.

 

Is there any other way to achieve this?

 

Also Can I sort the valueobjects based on name in apex class?

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You don't have access to the session in Visualforce, so you can't store and retrieve data from that.

 

If you use the same visualforce custom/extension controller for multiple pages, then these pages will be able to share information that is stored in the controller.  Aside from that, you can store information in custom sobjects that are related to a user record and retrieve these from any page.

 

You can sort lists as long as they are composed of primitives (e.g. strings). 

All Answers

bob_buzzardbob_buzzard

You don't have access to the session in Visualforce, so you can't store and retrieve data from that.

 

If you use the same visualforce custom/extension controller for multiple pages, then these pages will be able to share information that is stored in the controller.  Aside from that, you can store information in custom sobjects that are related to a user record and retrieve these from any page.

 

You can sort lists as long as they are composed of primitives (e.g. strings). 

This was selected as the best answer
eswarieswari

Thank you... :)