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
Carlos SiqueiraCarlos Siqueira 

Repeater

I am totally new to Visualforce and never coded HTML before. I am 2 challenges away (out of 9) to finish this and just can't figure out why I am still gettin this error message.
Here is the challenge:

User-added image
I believe I covered the highlighted items but don't have a clue about the ones circled with red.
I am under the impression that <apex:pageBlockTable value="{! Account }" var="a"> is a repeater as it keeps creating lines of Accounts,
as shown here:

User-added image
Below is my code:

<!-- Start -->

<apex:page standardController="Account" recordSetVar="accounts">
    <apex:form >
    <apex:pageBlock title="Accounts List">
        
        <!-- Accounts List -->
        <apex:pageBlockTable value="{! Account }" var="a">
            <apex:column value="{! a.Name }"/>
            
        </apex:pageBlockTable>
        
    </apex:pageBlock>
  </apex:form>
</apex:page>

<!-- End -->

Any help explaining how to fix the error and complete the remaining tasks will be greatly appreciated.
 

 
Best Answer chosen by Carlos Siqueira
SrikanthKuruvaSrikanthKuruva
the tag <apex:pageBlockTable> is not the repeater tag. you should make use of <apex:repeat> tag.

<apex:page standardController="Account" recordSetVar="accounts">
<ul>
<apex:repeat value="{!accounts}" var="e">
<li><apex:outputLink value="/{!e.Id}">{!e.Name}</apex:outputLink></li>
</apex:repeat>
</ul>
</apex:page>

let me know if this works for you
 

All Answers

SrikanthKuruvaSrikanthKuruva
the tag <apex:pageBlockTable> is not the repeater tag. you should make use of <apex:repeat> tag.

<apex:page standardController="Account" recordSetVar="accounts">
<ul>
<apex:repeat value="{!accounts}" var="e">
<li><apex:outputLink value="/{!e.Id}">{!e.Name}</apex:outputLink></li>
</apex:repeat>
</ul>
</apex:page>

let me know if this works for you
 
This was selected as the best answer
Carlos SiqueiraCarlos Siqueira
Awesome! It bother me that on the Trailhead chapter it never mentioned anything about repeater.