+ Start a Discussion
Kingsley_Dev2Kingsley_Dev2 

Datalist & custom component examples

Can someone share a datalist component example? Also, can I create custom components?  
Ron HessRon Hess
here is the page

Code:
<apex:page standardController="Account" >
<apex:dataList value="{!account.contacts}" var="each" onclick="alert(event);">
{!each.name}, {!each.phone}
</apex:dataList>
</apex:page>

 
this page was named dataList, so the URL looks like this :
 
....salesforce.com/apex/dataList?id=0013000000IQYYr

this needs to be an ID for a valid account in your system, one with contacts

Ron HessRon Hess
custom component development is not in the current developer preview,
it is in the backlog and should be available at some point.
KingsleyKingsley
Thanks Ron!
softsquaresoftsquare

Ron,

I am working on a VisualForce page that would list all the Leads with a subset of the fields displayed.

I am using Group Edition hence do not have the luxury of Apex classes (hence controller extensions).

This is the code.

<apex:page standardController="Lead" tabStyle="Lead">
<apex:dataList value="{!view}" var="each" onclick="alert(event);">
{!each.name}, {!each.phone}
</apex:dataList>
</apex:page>

I am aware that view() is the method to view an object. What is the standardController method to list the objects (Lead)?

Andi Giri