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

How to display returned results in Vforce page
Hi,
I have a simple SOSL like this "Select Title from ContentVersion". However I don't know how to
display the returned result in Visual Force page. Please help.
thanks
Paul
http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller.htm
thanks for your reply. I found one of the article is very helpful. it is the Controller Method with the
Lead search example. Does SOQL support wild card?
Select Name, Email, Phone From Lead where Name like %searchText%
does it work for the SOQL above? please advice.
thanks
For example.
Controller:
public class Test { public Test(ApexPages.StandardController controller) { } public ApexPages.StandardSetController setLead {get { if(setLead == null) {setLead = new ApexPages.StandardSetController(Database.getQueryLocator([SELECT Id, name, email, phone FROM Lead where name like 'a%'])); } return setLead; }set; } public List<Lead> getLeads() { return (List<Lead>) setLead.getRecords(); } }
Vf page:
<apex:page standardController="Lead" extensions="Test"> <apex:pageBlock > <apex:pageBlockTable value="{!Leads}" var="l"> <apex:column value="{!l.id}"/> <apex:column value="{!l.name}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>