You need to sign in to do that
Don't have an account?
App_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?
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?
dchasman
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.