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
App_Dev1App_Dev1 

Components

Two questions about components:

1. According to the Spring08 VF docs (p. 66), the generic sObject type is allowed as the datatype of a component's attribute. But I get an error when I try to use one:

Error: Apex class 'sobject' does not exist

2. Components are useful but I don't want to tie mine to a specific sObject type. I'd have to build a component for every supported type.

Is there any reflection-like mechanism so, given item 1 is resolved, I can call getters on the sObject which is passed in?

dchasmandchasman
The doc is incorrect in that case - sobject is not currently a supported type for <apex:attribute type> but will be soon. A workaround is to create an apex class to use as a wrapper or data transfer object.