You need to sign in to do that
Don't have an account?

Show more than 1 record
I want to know how can I show more than 1 record of my list without getting an error.
This is my actual code:
Class:
this.AccountList = [Select Owner.name
From Account
this.target = this.AccountList.get(0);
Page:
<apex:pageBlockSection title="" collapsible="false" columns="2" rendered="{!target.Name != ''}">
<apex:outputText value="{!target.Name}"/>
</apex:pageBlockSection>
This is my actual code:
Class:
this.AccountList = [Select Owner.name
From Account
this.target = this.AccountList.get(0);
Page:
<apex:pageBlockSection title="" collapsible="false" columns="2" rendered="{!target.Name != ''}">
<apex:outputText value="{!target.Name}"/>
</apex:pageBlockSection>
Page:
<apex:pageBlockSection title="" collapsible="false" columns="2">
<apex:pageBlockTable value="{!target}" var="a">
<apex:column value="{!a.Name}"/>
</apex:pageBlockTable></apex:pageBlockSection>
Class:
this.target = [Select Owner.name
From Account Where Name != ''];//With target being a List<Account>
If it helps please mark as correct so it can help others.
All Answers
Page:
<apex:pageBlockSection title="" collapsible="false" columns="2">
<apex:pageBlockTable value="{!target}" var="a">
<apex:column value="{!a.Name}"/>
</apex:pageBlockTable></apex:pageBlockSection>
Class:
this.target = [Select Owner.name
From Account Where Name != ''];//With target being a List<Account>
If it helps please mark as correct so it can help others.
Good luck!