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

How to write wrapper class for below search page?
public with sharing class Condosearchcontroller {
public Condosearchcontroller() {
}
public list <Condo__c> Cond {get;set;}
public string beds {get;set;}
public string baths {get;set;}
public string squarefootage {get;set;}
public Condosearchcontroller(ApexPages.StandardController controller) {
}
public void Search(){
string searchquery= 'select name,Beds__c,Baths__c,Square_Footage__c,Initial_List_Price__c from Condo__c where name!=NULL';
if (!beds.equals(''))
searchquery+= ' and Beds__c = '+beds+'';
if (!baths.equals(''))
searchquery+= ' and Baths__c = '+baths+'';
if (!squarefootage.equals(''))
searchquery+= ' and Square_Footage__c = '+squarefootage+'';
Cond= Database.query(searchquery);
//return Cond;
}
public Condosearchcontroller() {
}
public list <Condo__c> Cond {get;set;}
public string beds {get;set;}
public string baths {get;set;}
public string squarefootage {get;set;}
public Condosearchcontroller(ApexPages.StandardController controller) {
}
public void Search(){
string searchquery= 'select name,Beds__c,Baths__c,Square_Footage__c,Initial_List_Price__c from Condo__c where name!=NULL';
if (!beds.equals(''))
searchquery+= ' and Beds__c = '+beds+'';
if (!baths.equals(''))
searchquery+= ' and Baths__c = '+baths+'';
if (!squarefootage.equals(''))
searchquery+= ' and Square_Footage__c = '+squarefootage+'';
Cond= Database.query(searchquery);
//return Cond;
}
public List<Condo__c> Condo__c {get; set;}
public List<Condo__c> getCondo__c() {
if(Condo__c == null) {
Condo__c = new List<Condo__c>();
for(Condo__c: [ name,Beds__c,Baths__c,Square_Footage__c,Initial_List_Price__c from Condo__c where name!=NULL';]) {
Condo__c List.add(new Condo__c (c));
}
return Condo__c;
public PageReference proces() {
List<Contact> selectedContacts = new List<Contact>();
for(Condo__c: getCondo__c()) {
if(Conc.selected == true) {
selectedCCondo__c.add(Conc.con);
}
for(Condo__c con: selected) {
system.debug(con);
}
Condo__cList=null;
return null;
}
public class cCondo__c {
public Condo con {get; set;}
public Boolean selected {get; set;}
public cCondo__c(Condo__c c) {
con = c;
selected = false;
}
}
}