function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
narendra jagwannarendra jagwan 

relative org..

<apex:page standardController="Account" recordSetVar="Accounts">
<apex:dataList var="a" value="{!Accounts}" type="1">
     {!a.name}
    </apex:dataList>
    </apex:page>
    i write thats code bt no record show in ma vf page .. what problem ma org..  pllzzzz help me
Sonam_SFDCSonam_SFDC
The method through which you are fetching the accounts doesn't really have a definition so the page doesn't know which Acocunts to be displayed.

the code should be something similar to the one below:

<!-- Page: -->
                       
<apex:page controller="dataListCon">
    <apex:dataList value="{!accounts}" var="account">
        <apex:outputText value="{!account.Name}"/>
    </apex:dataList>
</apex:page>

/*** Controller: ***/
public class dataListCon {

List<Account> accounts;

public List<Account> getAccounts() {
  if(accounts == null) accounts = [SELECT Name FROM Account LIMIT 10];
  return accounts;
}

}