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
willardwillard 

pageBlock data - how to display non-salesforce objects data in a list view

Hi - I've been trying to use the pageBlockTable tag to present some data in a table/list format.  However, I want to do this with a non-salesforce object.  None of the data that I'm presenting is stored in a database.  They are all data based on calculations.  Is there a way for me to do this or must I create a dummy object just so I can use the pageBlockTable tag appropriately?
Best Answer chosen by Admin (Salesforce Developers) 
JimRaeJimRae

You could use a wrapper class to simulate a custom object.

Create a list of your wrapper objects, and  use that to populate your pageblock table.

 

Here is a link to a tutorial about wrapper classes, in this example, they are extending a standard object with new fields that don't exist on the object, but in your case, you would just use your calculated values.

 

http://wiki.developerforce.com/index.php/Wrapper_Class