Why is the apex pageblocktable not showing records?
I'm querying Task records from the constructor and displaying them in Pageblocktable but it's not displaying records in the Pageblock table. Could you please let me know what went wrong?
{!tasklist}
public class myControllerExtension {
public Account acct {get;set;}
public Listtasklist {get;set;}
public myControllerExtension(ApexPages.StandardController stdController) {
acct = (Account)stdController.getRecord();
tasklist = [Select Id, Subject from Task limit 20];
}
}
Problem in below line of your code which is why apex pageblocktable not showing records:
Please check below code:
Apex controller:
public class myControllerExtensionss {
public List tasklist {get;set;}
public Account acct {get;set;}
public myControllerExtensionss(ApexPages.StandardController stdController) {
tasklist=new List();
acct = (Account)stdController.getRecord();
tasklist = [Select Id, Subject from Task limit 20];
}}
Output: