• Naresh.soft12
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 1
    Replies
Hi,
can one help me .i want test class for my code

public class WrapperClassController 
{
    public List<AccountWrapper> accWrapList{get; set;}
    String queryString = 'Select Name, Type, BillingCity, BillingState, BillingCountry from Account order by Name';
    
    public WrapperClassController()
    {
        accWrapList = new List<AccountWrapper>();
        for(Account iter :Database.query(queryString))
        {
            accWrapList.add(new AccountWrapper(iter.Name,iter.Type,iter.BillingCity,iter.BillingState,iter.BillingCountry));
        }
        
        for(Contact iter :[SELECT LastName FROM Contact LIMIT 5])
        {
            accWrapList.add(new AccountWrapper(iter.LastName,null,null,null,null));
        }
    }
    
    public PageReference ProceedAction()
    {
        for(AccountWrapper iter :accWrapList)
        {
            if(iter.isSelected)
            {
            //Do necessary customization
            }
        }
        return null;
    }
    
    public class AccountWrapper
    {
        public String accName{get; set;}
        public String accType{get; set;}
        public String accCity{get; set;}
        public String accState{get; set;}
        public String accCtry{get; set;}
        public Boolean isSelected{get; set;}
        public String accRecId{get; set;}
        
        public AccountWrapper(String accName, String accType, String accCity, String accState, String accCtry)
        {
            this.accName = accName;
            this.accType = accType;
            this.accCity = accCity;
            this.accState = accState;
            this.accCtry = accCtry;
            this.accRecId = accRecId;
            isSelected = false;
        }
    }
}
i want to learn rest api and soap api can any one send me pdfs and blogs
can any one share to display account and contact details with out using controller program?
hi can any one share list out of bond exception program and explain?
what is wrapper class with example can any one explain?
public class Countrydisplay{
public map<String,Map<String,String>> stringStringMap{set;get;}
public Countrydisplay(){
}
public map<String,map<String,String>> getDisplay(){
stringStringMap=new map<String,Map<String,String>>{'india' => new Map<String, String>{'a'=>'b', 'c'=> 'd'}, 'usa' =>new Map<String, String> {'e'=>'f', 'g'=> 'h'} };
System.debug(' ----------------------------------------------------------------  >>>>>>>>>>>>>>>' + stringStringMap.get(outerKey).get(innerKey));
}
}
}

i want to display this map in vf page in pick list filelds and please send me sample vf page
public class Countrydisplay{
public map<String,Map<String,String>> stringStringMap{set;get;}
public Countrydisplay(){
}
public map<String,map<String,String>> getDisplay(){
stringStringMap=new map<String,Map<String,String>>{'india' => new Map<String, String>{'a'=>'b', 'c'=> 'd'}, 'usa' =>new Map<String, String> {'e'=>'f', 'g'=> 'h'} };
System.debug(' ----------------------------------------------------------------  >>>>>>>>>>>>>>>' + stringStringMap.get(outerKey).get(innerKey));
}
}
}

i want to display this map in vf page in pick list filelds and please send me sample vf page