A wrapper or container class is a class, a data structure, or an abstract data type which contains different objects or collection of objects as its members.
Just an Analogy - Say you have number of rows displaying on a VF page. And each row needs to have a delete link , which when clicked deletes the record from database as well. So you need to bind the rows with index. So this has to be done with Wrapper class , where you check for the index of delete link .
Similarly , each row has a checkbox. And you want to fetch all the rows that user checked and update all at once. This also wil need a wrapper.
A wrapper or container class is a class, a data structure, or an abstract data type which contains different objects or collection of objects as its members.
Please look into following link for example.
https://developer.salesforce.com/page/Wrapper_Class
Hope it helps you.
thanks,
Anjith kumar.
Just an Analogy - Say you have number of rows displaying on a VF page. And each row needs to have a delete link , which when clicked deletes the record from database as well. So you need to bind the rows with index. So this has to be done with Wrapper class , where you check for the index of delete link .
Similarly , each row has a checkbox. And you want to fetch all the rows that user checked and update all at once. This also wil need a wrapper.