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
dev_zyxdev_zyx 

Custom search

Hi,

 

In one of the custom search functionalities that i came across there is use of StandardSetController (not sure why we use it). Also when i check on my page it is a little confusing. This functionality is to search some custom object but the recordSetVar says something else which might be developers error. Code snippets below:

 

<apex:page Controller="SearchCustObj" recordSetVar="{!opportunities}">
...

<apex:dataTable width="100%" border="1" id="DataTable" value="{!opportunities}" var="o" style="font-size:13px;text-align: center; vertical-align:top;word-wrap: break-word;height: 20px;"  headerClass="h1"
   columnsWidth="auto" >
 ....

</apex:page>

 

<!-- Controller -->

public with sharing class SearchCustObj{

 

        public ApexPages.StandardSetController setCon{get;set;}
        public List<CustObj__c> sObjectRecordsTemp{get;set;}

                public List<CustObj__c> getOpportunities()
                {
                          return sObjectRecordsTemp;            
                }

        .....

 

Can someone please help me understand this? Also if someone can share some documentation around better designing custom searches it would be very helpful.

 

Thanks in advance.