While i'm displaying set data into vf page it's showing the error
vf code :--
<apex:page controller="Soql_Ct">
<apex:form >
<apex:pageBlock title="Soql_Example" >
<apex:pageBlockTable value="{!accounts}" var="a">
<apex:column value="{!a.Id}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
apex code:--
public class Soql_Ct {
public Set<Account> accounts {set;get;}
public List<Account> myList {set;get;}
public Soql_Ct(){
myList=[select Id,Name,Phone,Industry,Rating,Ownership from Account];
accounts=new Set<Account>();
accounts.addAll(myList);
}
}
myList
instead ofaccounts
.?