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
Vivek ChaudhariVivek Chaudhari 

How to use 'type' attribute in <apex:dataList> tag using StandardController?

I have following code :
<apex:dataList var="book" value="{!books}" type="A" >             
            <apex:outputText >{!book.Name__c}</apex:outputText>
            <apex:outputText >{!book.Author__c}</apex:outputText>
            <apex:outputText >{!book.Price__c}</apex:outputText>
 </apex:dataList>

I want output like 
A. Some book name Author Name Price
B. Some book name Author Name Price
but not working 

tag works with only ordered data so how to get it?
hitesh90hitesh90
Hello Vivek,

What issue you are facing in this? can you please explain more?
Vivek ChaudhariVivek Chaudhari
I want Output like

A.
B.
C.
D.

in this format

 
hitesh90hitesh90
Try to use following code.

Visualforce Page:
<apex:page standardController="BOOK__c" recordSetVar="books">
    <apex:dataList var="book" value="{!books}" type="A" >             
        <apex:outputText >{!book.Name__c}</apex:outputText>
        <apex:outputText >{!book.Author__c}</apex:outputText>
        <apex:outputText >{!book.Price__c}</apex:outputText>
    </apex:dataList>
</apex:page>

Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/
 
Vivek ChaudhariVivek Chaudhari
Thanks for help,

But 'type' attribute is not working.

Reply 
hitesh90hitesh90
Which exception you are getting?