You need to sign in to do that
Don't have an account?
Customizing a Wrapper Class - cContact Definition?
I am trying to learn the wrapper class technique and am not understanding the cContact concept from the following example link:
http://wiki.developerforce.com/index.php/Wrapper_Class
The first instance of the cContact is on line 4 of the class with:
public List<cContact> getContacts() {
I have tried a number of times to convert this to the custom object that I am using with this code
public class casewrapperClassController {
public List <cCustomer_Product__c> CustomerList {get; set;}
}
and I recieve the following error:
Compile Error: Invalid type: cCustomer_Product__c at line 3 column 18
The questions I need answered is:
1. What is cContact in the example?
2. How is it defined in the example for the example to work?
3. What do I need to do to use cContact for a custom object or another standard object?
I have studied the example and am not understnding the cContact term.
Thank you
If you see in the example its inner class named cContact. you can give any name for inner class its up to you.
you can define your own custom inner class and add some more attributes which you need for your custom logic.
you can direclty access the inner class into the class containing the inner class, noting the exaple
you can access the cContact in your class method as below
Contact c = new Contact(id=..);
cContact ccc = new cContact(c);