You need to sign in to do that
Don't have an account?
Surendra Sannapareddy
How to display fields in visualforce page from controller class
1.My visualforce page is
<apex:page controller="SendRecordsToPaaage" tabStyle="Account">
<apex:pageBlock title="AccountDeails" >
<apex:pageBlockTable value="{!accList}" var="details">
<apex:column value="{!details.name}"/>
<apex:column value="{!details.accountnumber}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
2. My controller is
public class SendRecordsToPaaage {
public List<Account> accList{get;set;}
public void getAccList() {
accList=[select name,accountnumber from account];
}
}
Give me solution for this please......
<apex:page controller="SendRecordsToPaaage" tabStyle="Account">
<apex:pageBlock title="AccountDeails" >
<apex:pageBlockTable value="{!accList}" var="details">
<apex:column value="{!details.name}"/>
<apex:column value="{!details.accountnumber}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
2. My controller is
public class SendRecordsToPaaage {
public List<Account> accList{get;set;}
public void getAccList() {
accList=[select name,accountnumber from account];
}
}
Give me solution for this please......
Please try below code :-
Page Controller NOTE: This code has not been tested and may contain typographical or logical errors
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help
using custom get set,
public class SendRecordsToPaaage {
public List<Account> accList;
public List<Account>getAccList() {
system.Debug('called get list ');
accList=[select name,accountnumber from account];
return accList;
}
}
And an Another way is
Thanks,
Naveen