You need to sign in to do that
Don't have an account?
Manid
Anyone have idea about below question
i have one wrapper class in tha class two data members account and list contacts.
and i have list of wrapper class.i want to show list of wrapper in vf page.But it showing error .How to solve this Pls anyone help me.
and i have list of wrapper class.i want to show list of wrapper in vf page.But it showing error .How to solve this Pls anyone help me.
Hi Manid,
Can you pls share the code.
---------------
public class AccountWrapper {
public account acc {get;set;}
public list<contact> con {get;set;}
}
public class SetExamle6 {
public list<AccountWrapper> acccon {get;set;}
public SetExamle6(){
list<account> accs=[select name,industry,rating,(select lastname,phone from contacts) from account];
for(account a:accs){
AccountWrapper aw=new AccountWrapper();
aw.acc=a;
aw.con=a.contacts;
acccon.add(aw);
}
}
}
i want to show list of accountwrapper account and contact records in a table
Here is the updated controller:
Notice that I have instantiated the list of account wrapper.
You didn't share the code for your VF Page, here is how it's basic structure should be like:
and here is the output:
Hope this helps,
Sandeep