You need to sign in to do that
Don't have an account?
Anjaneylu
Wrapper class error.
Hi this is my wrapper class.
Here i am getting the error like : Unknown property 'WrapperClassProcessSelectedclass.Wrapperclass.name'
please help me.
Thanks and regards,
Anji reddy
Here i am getting the error like : Unknown property 'WrapperClassProcessSelectedclass.Wrapperclass.name'
please help me.
public class WrapperClassProcessSelectedclass { public list<Wrapperclass> Wrapperactlst1 {get; set;} public list<account> Selectedaccounts {get; set;} public WrapperClassProcessSelectedclass (){ Wrapperactlst1 = new list<Wrapperclass>(); for(account acc : [select id, name, billingcity, phone from account ]) Wrapperactlst1.add(new wrapperclass(acc)); } public void process (){ Selectedaccounts = new list<account>(); for(Wrapperclass wra : Wrapperactlst1 ){ if(wra.isselected == true) Selectedaccounts.add(wra.acc); } } public class Wrapperclass { public account acc {get; set;} public boolean isselected {get;set;} public Wrapperclass(account a){ acc = a; isselected = false; } } }
Thanks and regards,
Anji reddy
I am sure your getting error while savng the visualforce page ?
please try to acces account name as below.
<apex:page>
<Apex:pageblock>
<apex:pageblockTable value="{!Wrapperactlst1}" var="record">
<apex:column headerValue=" Account Name">
<apex:outputText value="{!record.acc.Name}"/>
</apex:column>
</apex:pageblocktable>
</Apex:pageblock>
</apex:page>
please let me know if this helps you.
Best Regards,
-Vivek
still i am raising the same error..
Thanks and regards,
Anji reddy
<apex:column value="{!acc.acc.name}" headerValue="Account name"/>
<apex:column value="{!acc.acc.phone}" headerValue="Account Phone"/>
<apex:column value="{!acc.acc.Billingcity}" headerValue="Account Billingcity"/>
Try below code and let me know.
Best Regards,
-Vivek
https://developer.salesforce.com/page/Wrapper_Class
http://www.sfdcpoint.com/salesforce/wrapper-class-in-apex/
I hope you are trying below code
Please let us know if this will help you
Thanks
Amit Chaudhary
I am unable to know the reason.
Thanks and regards,
Anji reddy
WrapperObj.AccountObj.Name
so it is
acc.acc.name