• badrul Hassan
  • NEWBIE
  • 65 Points
  • Member since 2015
  • webmindinfotech

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 23
    Replies
i have built a pagination for wrapper class,my requirement is after clicking the next link the previous link will activate , similarly when i will be on last page the next link will be deactivate.


my controller:-

    public with sharing class acc_controller {
    
    public  List<Account> accList{get;set;}
    public  List<AccWrapper> accWrapList{get;set;}
    public  List<AccWrapper> accWrapList2{get;set;}
    public  List<AccWrapper> accWrapList3{get;set;}
    
    //public Integer cust_limit{get;set;}
    public  Integer cust_offset{get;set;}
    public  Integer cust_fixed_offset{get;set;}
    public  Boolean showFinalResult{get;set;}
    
    public Class AccWrapper
    {
        public Account acc{get;set;}
        public Boolean flag{get;set;}
        public AccWrapper(Account acc)
        {
            this.acc=acc;
            this.flag=false;
        }
    }
        public acc_controller(ApexPages.StandardController controller) {
            
        //cust_limit=1;
        showFinalResult=false;
        cust_fixed_offset=2;
        cust_offset=0;
        accList=new List<Account>();
        accWrapList=new List<AccWrapper>();
        accWrapList2=new List<AccWrapper>();
        accList=[select id,name from account limit 100];
        
        Integer count=0;
        for(Account accObj:accList)
        {
            accWrapList.add(new AccWrapper(accObj));
            if(count<cust_fixed_offset)
            {
            accWrapList2.add(new AccWrapper(accObj));
            count++;
            }
            
        }
    }
    
    
    
    public void saveList()
    {
        
        for(AccWrapper accWrapObj1:accWrapList)
        {
            for(AccWrapper accWrapObj2:accWrapList2)
            {
                if(accWrapObj2.acc.Id==accWrapObj1.acc.Id)
                {
                   accWrapObj1.flag=accWrapObj2.flag; 
                }
            }
        }
    }
    
    public  void next()
    {
        accWrapList2=new List<AccWrapper>();
        
        cust_offset+=cust_fixed_offset; 
        if(cust_offset>accWrapList.size()-1)
        {
            cust_offset=accWrapList.size()-1;
            
        }
        Integer counter=0;
        for(Integer i=cust_offset;i<accWrapList.size();i++)
        {
            if(counter<cust_fixed_offset)
            {
             accWrapList2.add(accWrapList[i]);
             counter++;
            }
            else
            {
            break;
            }
            
        }
       
    }
    
    
    public  void previous()
    {
        accWrapList2=new List<AccWrapper>();
        cust_offset-=cust_fixed_offset;
        if(cust_offset<1)
        {
            cust_offset=0;
            
        }
        Integer counter=0;
        for(Integer i=cust_offset;i<accWrapList.size();i++)
        {
            if(counter<cust_fixed_offset)
            {
             accWrapList2.add(accWrapList[i]);
             counter++;
            }
            else
            {
            break;
            }
            
        }
            
    
    }
    
    public void first()
    {
    }
    
    public void last()
    {
    }
    
    public void Process()
    {
         
         accWrapList3=new List<AccWrapper>();
         for(AccWrapper accWrapObj1:accWrapList)
         {
             if(accWrapObj1.flag)
             {
             accWrapList3.add(accWrapObj1);
             }
         }
         showFinalResult=true;
        
    }

}

myVfpage:-

<apex:page standardController="Account" extensions="acc_controller">
<apex:form >
<apex:actionstatus startText="processing..." id="statusBar"></apex:actionstatus>
<apex:pageblock >
<!--<apex:commandLink value="First"/>-->
     <apex:commandLink value="Next" reRender="pTable" status="statusBar" action="{!next}"/>&nbsp;&nbsp;
     <apex:commandLink value="Previous" reRender="pTable" status="statusBar" action="{!previous}"/>
     <!--<apex:commandLink value="Last"/>     -->
     
     
     <apex:commandbutton value="Process" action="{!Process}" rerender="finalResult" status="statusBar"/>
     <apex:outputPanel id="pTable">
     <apex:pageblockTable value="{!accWrapList2}" var="a" >
     <apex:column headerValue="Select">
         <apex:inputCheckbox value="{!a.flag}">
         <apex:actionSupport event="onclick" rerender="pTable" status="statusBar" action="{!saveList}"/>
         </apex:inputCheckbox>
     </apex:column>
     <apex:column value="{!a.acc.name}"/>
     
     </apex:pageblockTable>
     
     </apex:outputPanel>
     
     <!--<apex:commandLink value="First"/>-->
     <apex:commandLink value="Next" reRender="pTable" status="statusBar" action="{!next}"/>&nbsp;&nbsp;
     <apex:commandLink value="Previous" reRender="pTable" status="statusBar" action="{!previous}"/>
     <!--<apex:commandLink value="Last"/>     -->
     
     <apex:pageblock >
     <apex:outputPanel id="finalResult">
     <apex:pageBlockTable value="{!accWrapList3}" var="ac" rendered="{!showFinalResult}">
     <apex:column value="{!ac.acc.name}"/>
     </apex:pageBlockTable>
     </apex:outputPanel>
         
     </apex:pageblock>
     
 </apex:pageblock>
</apex:form>
</apex:page>



please help me...
please run this code and please share the solution.
i am new to salesforce and this requirement is in high priority.
Can you please solve my PROBLEM :) when i click on commandLink it will display popup window and i select attachment videos and click on Done button. When i click on done button my parent page is refresh and all selected links display on Ckeditor. My problem is I DON'T WANT TO Refresh MY Parent Page!!! Please check my Attachments:-- Thanks in advance

.User-added image
User-added image

User-added image

User-added image

 
req.setMethod('POST');
        req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
        SendmailUtils.Emailtemplate emailtmp=new SendmailUtils.EmailTemplate();
        emailtmp.emailTemplate=bdy.escapeHtml4();
        if(Contactlists.size() == 0)
        {
            ReturnContactList([SELECT Name,FirstName,LastName,description,Email,Title,Company,ID,phone FROM Lead where email=:Emailcon LIMIT 1]);
        }
        string isQue='0';
        req.setBody('AUCode='+aucode+'&SOrgID='+ocode+'&Subject='+sbj+'&To='+too+'+&Bcc=&contacts='+JSON.serialize(Contactlists)+'&Body='+JSON.serialize(emailtmp)+'&contents='+JSON.serialize(contentCategoryIDs)+'&IsQueue='+isQue); 
      
        try {
            res = http.send(req);
     
            if (res.getBody() != null) {
                if(isQue=='0')
                {
                    List<SendmailUtils.EmailTemplateListData> emailLists=new List<SendmailUtils.EmailTemplateListData>();
                    emailLists=(List<SendmailUtils.EmailTemplateListData>)json.deserialize(res.getbody(),List<SendmailUtils.EmailTemplateListData>.class);
                    String userName = UserInfo.getUserName();
                    User activeUser = [Select Email From User where Username = : userName limit 1];
                    String userEmail = activeUser.Email;
                    for(SendmailUtils.EmailTemplateListData emailData: emailLists)
                    {
                        if(emailData.To != null || emailData.To != '')
                        {
                            Messaging.SingleEmailMessage emails = new Messaging.SingleEmailMessage(); 
                            List<String> sendTo = new List<String>();
                            sendTo.add(emailData.To);
                            // System.debug ( 'emailData.To' +emailData.To);
                            emails.setToAddresses(sendTo);
                            emails.setSubject(emailData.Subject);
                            if(emailData.Body!=null)
                            emailData.Body = emailData.Body.unescapeHtml4();
                            emails.setHtmlBody(emailData.Body);                         
                            emails.setReplyTo(userEmail);

        -----------:  Error shows in this below line:------         
   
     Messaging.SendEmailResult [] resSentEmail= Messaging.SendEmail(new Messaging.SingleEmailMessage[] {emails});  

                            for ( Messaging.sendEmailResult result : resSentEmail ) {
                                if ( !resSentEmail[0].isSuccess () ) {
                                  //  System.debug ( 'result' +result  );
                                }        
                            }

 
req.setMethod('POST');
        req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
        SendmailUtils.Emailtemplate emailtmp=new SendmailUtils.EmailTemplate();
        emailtmp.emailTemplate=bdy.escapeHtml4();
        if(Contactlists.size() == 0)
        {
            ReturnContactList([SELECT Name,FirstName,LastName,description,Email,Title,Company,ID,phone FROM Lead where email=:Emailcon LIMIT 1]);
        }
        string isQue='0';
        req.setBody('AUCode='+aucode+'&SOrgID='+ocode+'&Subject='+sbj+'&To='+too+'+&Bcc=&contacts='+JSON.serialize(Contactlists)+'&Body='+JSON.serialize(emailtmp)+'&contents='+JSON.serialize(contentCategoryIDs)+'&IsQueue='+isQue); 
      
        try {
            res = http.send(req);
     
            if (res.getBody() != null) {
                if(isQue=='0')
                {
                    List<SendmailUtils.EmailTemplateListData> emailLists=new List<SendmailUtils.EmailTemplateListData>();
                    emailLists=(List<SendmailUtils.EmailTemplateListData>)json.deserialize(res.getbody(),List<SendmailUtils.EmailTemplateListData>.class);
                    String userName = UserInfo.getUserName();
                    User activeUser = [Select Email From User where Username = : userName limit 1];
                    String userEmail = activeUser.Email;
                    for(SendmailUtils.EmailTemplateListData emailData: emailLists)
                    {
                        if(emailData.To != null || emailData.To != '')
                        {
                            Messaging.SingleEmailMessage emails = new Messaging.SingleEmailMessage(); 
                            List<String> sendTo = new List<String>();
                            sendTo.add(emailData.To);
                            // System.debug ( 'emailData.To' +emailData.To);
                            emails.setToAddresses(sendTo);
                            emails.setSubject(emailData.Subject);
                            if(emailData.Body!=null)
                            emailData.Body = emailData.Body.unescapeHtml4();
                            emails.setHtmlBody(emailData.Body);                         
                            emails.setReplyTo(userEmail);

        -----------:  Error shows in this line:------         
   
     Messaging.SendEmailResult [] resSentEmail= Messaging.SendEmail(new Messaging.SingleEmailMessage[] {emails});  

                            for ( Messaging.sendEmailResult result : resSentEmail ) {
                                if ( !resSentEmail[0].isSuccess () ) {
                                  //  System.debug ( 'result' +result  );
                                }        
                            }

 
 How to retrive data REST API(GET) and bind through Jquery in dependent picklist....
 How to retrive data REST API(GET) and bind through Jquery in Page block table....
This code is for dependend pick list using passing parameter in api. I need to do is using Jquery how to implement and by default value will be all category list in picklist.
When i reload this page by default >All Partners >All Categories >Title video will display 

Visualforce Page:-
 
<apex:page controller="categories" readOnly="true">


    <apex:form id="frm">

     <script>
    function prepareList(parent,child,list,isSubselectOptional){
        $("body").append("<select style='display:none' id='"+parent+child+list+"'></select>");
        $('#'+parent+child+list).html($("#"+list+" option"));
        $('#'+list).html("<option> — </option>");
        $('#'+parent).change(function(){
            var parentValue = $('#'+parent).attr('value');
            $('#'+list).html($("#"+parent+child+list+" .list"+parentValue).clone());
            if(isSubselectOptional) $('#'+list).prepend("<option> — Select — </option>");
        });
    }
    $(function() {        
        prepareList('PartnerId','ContentCategoryId',list, false);
    });
  

</script>


    <script>
   function myJavaMethod(){
      myactionfun();
  }
  </script>
 
 

     
       
     
    
    <apex:pageBlock >
             <apex:pageblockSection columns="3" >
                  <apex:pageBlock >
    
 
              <apex:outputPanel id="testPanel">
                 <Apex:selectlist size="1" value="{!PartnerId}" id="PartnerId" > 
                
                <apex:selectOptions value="{!company}"/> 
                   <apex:actionSupport event="onchange" >
                    </apex:actionSupport> 
                </apex:selectlist>
                   </apex:outputPanel> 
         
                </apex:pageBlock>
        
         
        
    
    
    
  <apex:outputPanel id="testPanel1">
         <apex:pageBlock >
             

                 <apex:selectList size="1" value="{!ContentCategoryId}" id="ContentCategoryId" onclick="myJavaMethod()" >   
                <apex:selectOptions value="{!items}" /> 
                <apex:actionSupport event="onchange" reRender="testPanel">
                </apex:actionSupport>  
                 
                </apex:selectList>
           
               </apex:pageBlock> 
               
         </apex:outputPanel> 
          <apex:outputPanel id="testPanel">
         <apex:pageblock id="pgBlock2"> 
          <!--  <c:PageBlockTableEnhancerADV targetPbTableIds="a"  pageSizeOptions="5,10,15,30,40,50,60,70" defaultPageSize="50" enableExport="false"/> -->
            <apex:pageBlockTable id="list" value="{!performcallout}" var="wrap" width="100%"  rendered="{!normalList}">
            <apex:column headerValue="Title" value="{!wrap.Title}"/>
            <apex:column >
            <apex:inputCheckbox value="{!wrap.selected}" > 
            </apex:inputCheckbox>
            </apex:column>
            </apex:pageBlockTable> 
        </apex:pageBlock> 
        </apex:outputPanel>   
         </apex:pageBlockSection>
         </apex:pageBlock>
 
    </apex:form>
    

</apex:page>

Apex Page :--
 
Public  class categories{
   
    public String ContentCategoryId {get;set;}
    public String PartnerID {get;set;}
  //  public String parentcompany_id{get;set;}
   // PUBLIC List<selectOption> Items;
    public String toAddresses {get; set;}
    
    public   String MySessionID = UserInfo.getSessionID();
    public   String myurl= URL.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/c/10.0/' + UserInfo.getOrganizationId();    
    public   string c='eU9WzoFgU4n8Apu5PYxcNGRZswRDZJWDEMdbQVU85gw=';
    public   String Acode= Userinfo.getuserid();
    public   String Oid = UserInfo.getOrganizationId();  
    //phil  
    // Phill public   String Acode= '00530000000rLMxAAM';
   // Phill public   String Oid = '00D300000006YSZEA2';
   //bit9
   // public   String Acode= '00534000008cnnUAAQ';
   //  public   String Oid = '00D28000001G0V0EAK';
    Blob cryptoKey= EncodingUtil.base64Decode(c);
    
    Blob data = Blob.valueOf(MySessionID );
    Blob data1 = Blob.valueOf(myurl);
    Blob data4 = Blob.valueOf(Acode);
    Blob data5 = Blob.valueOf(Oid);
    
    Blob encryptedData = Crypto.encryptWithManagedIV('AES256', cryptoKey, data);
    Blob encryptedData1 = Crypto.encryptWithManagedIV('AES256', cryptoKey, data1);
    Blob encryptedData4 = Crypto.encryptWithManagedIV('AES256', cryptoKey, data4 );
    Blob encryptedData5 = Crypto.encryptWithManagedIV('AES256', cryptoKey, data5 );
    
    public    String b64Data = EncodingUtil.base64Encode(encryptedData);
    public    String b64Data1 = EncodingUtil.base64Encode(encryptedData1);
    public    String b64Data4 = EncodingUtil.base64Encode(encryptedData4);
    public    String b64Data5 = EncodingUtil.base64Encode(encryptedData5);
    
    public String aucode= EncodingUtil.urlEncode(b64Data4, 'UTF-8');
    public String ocode= EncodingUtil.urlEncode(b64Data5, 'UTF-8');
    
    public String ssnid{get;set;}
    public boolean normalList{get;set;}
    public boolean selectedList{get;set;}
    public String Title{get;set;} 
    public Boolean selected {get; set;} 
    
    public List<videolist> ConsoleWrapperList5{get;set;}
    public string productName{get;set;}
    public integer partner_count{get;set;}
    
    public categories() {
    
   
  // this.ContentCategoryId = 'defaultValue';

       
        getperformcallout6();
        getperformcallout5();
         getperformcallout();
        normalList = true;
        selectedList = false;
     
    }
    public List<companylistwrap> ConsoleWrapperList6{get;set;}
   
    public List<companylistwrap> getperformcallout6(){ 
        ConsoleWrapperList6 = new List<companylistwrap>(); 
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        System.debug('Calling method now' );
        string url = 'https://www.demomail.net/sf/api/PartnerList?AUCode='+aucode+'&SOrgID='+ocode+'&CategoryId='+ContentCategoryId+'&LanguageId='+0+'&PartnerId='+PartnerID;
        //string url = 'https://www.demomail.net/sf/api/PartnerList?AUCode=GlrI5Pb2xh0v3GzK%2FeE8jOX2IG8Kt9lEuzKMJAkgSeiQ6xvUbcgCFlGVG3YURHvJ&SOrgID=Srx%2F%2BRAw%2B9QTiQvLe1h4GBTKvDo3lUBrBU9ksiTTvlW8OWdlQE3Hsj1QQwkgqypL&PartnerId=PartnerId;
        req.setEndpoint(url);
        System.debug('&&: '+ url );
        req.setMethod('GET');
        res = http.send(req);
        if(res.getstatusCode() == 200 && res.getbody() != null)
        {
            ConsoleWrapperList6=(List<companylistwrap>)json.deserialize(res.getbody(),List<companylistwrap>.class);
        }
        return consolewrapperlist6; 
    }
    public List<SelectOption> getcompany() {
        List<SelectOption> options = new List<SelectOption>();
                   
                  // options.add(new SelectOption('null','-Select-'));
                    options.add(new SelectOption('0','All Partners'));
                    
        for(companylistwrap crRec : ConsoleWrapperList6){
        
        options.add(new SelectOption(crRec.PartnerID, crRec.PartnerName));
               
  
        } 
        
        
          partner_count= options.size();
          getperformcallout5();
          System.debug('##: '+  partner_count);
        return options;
    }
    public List<videolist> getperformcallout5(){ 
        ConsoleWrapperList5 = new List<videolist>(); 
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        System.debug('Calling method now' );
   
      // string url = 'https://www.demomail.net/sf/api/ContactCategoryList?AUCode=GlrI5Pb2xh0v3GzK%2FeE8jOX2IG8Kt9lEuzKMJAkgSeiQ6xvUbcgCFlGVG3YURHvJ&SOrgID=Srx%2F%2BRAw%2B9QTiQvLe1h4GBTKvDo3lUBrBU9ksiTTvlW8OWdlQE3Hsj1QQwkgqypL&CategoryId=4788&LanguageId=0&PartnerId=1227';
        string url = 'https://www.demomail.net/sf/api/ContactCategoryList?AUCode='+aucode+'&SOrgID='+ocode+'&CategoryId='+ContentCategoryId+'&LanguageId='+0+'&PartnerId='+PartnerID;
        req.setEndpoint(url);
        System.debug('**: '+ url );
        req.setMethod('GET');
        res = http.send(req);
        if(res.getstatusCode() == 200 && res.getbody() != null)
        {
            ConsoleWrapperList5=(List<videolist>)json.deserialize(res.getbody(),List<videolist>.class);
        }
        return consolewrapperlist5; 
    }
    public List<SelectOption> getItems() {
        List<SelectOption> options = new List<SelectOption>();
                  
                    
            for(videolist crRec : ConsoleWrapperList5){
                options.add(new SelectOption(crRec.ContentCategoryId, crRec.CategoryName));
                System.debug('##: '+ crRec.ContentCategoryId);
            }  
            partner_count= options.size(); 
             getperformcallout();
        return options;
       
    }
    public List<consolewrap> ConsoleWrapperList{get;set;}
    public  List<consolewrap> getperformcallout(){
        ConsoleWrapperList = new List<consolewrap>();
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
        string url = 'https://www.demomail.net/sf/api/SendVideoContact?AUCode='+aucode+'&SOrgID='+ocode+'&CategoryId='+ContentCategoryId+'&LanguageId='+0+'&PartnerId='+PartnerID;
        System.debug('@@: '+ url);
        req.setEndpoint(url);
        //System.debug('!!!'+ SessionId);
        req.setMethod('GET');
        //system.debug('???'+aucode);
        //system.debug('***'+ocode);
        res = http.send(req);
        // System.assert(false,res.getBody()+'-----');
        if(res.getstatusCode() == 200 && res.getbody() != null){
            ConsoleWrapperList=(List<consolewrap>)json.deserialize(res.getbody(),List<consolewrap>.class); 
            System.debug('value: '+ ConsoleWrapperList );
        }
        
        return ConsoleWrapperList;
    } 
    
    public pageReference getperformcalloutpageReference ()
    {
        getperformcallout(); 
        return null; 
    } 
    
    public pageReference getcompanypageReference ()
    {
        getperformcallout5();
        return null; 
    }  
    
     
}





 
this code is for dependend pick list using passing parameter in api.
 I need to do is using J query how to implement and by default value  will be all category list in picklist.


Visualforce code :-
 
<apex:page controller="categories" readOnly="true">

     
    <apex:form id="FormB">
    <script>
       function myJavaMethod(){
          myactionfun();
      }
      </script>
      
	  <script>
       function myJavaMethod1(){
          myactionfun1();
      }
      </script>
	  
<!-- <apex:actionFunction name="myactionfun"  action="{!getperformcalloutpageReference}" reRender="testPanel"/>-->
	 
<!--  <apex:actionFunction name="myactionfun1"  action="{!getcompanypageReference }" reRender="testPanel1"/>-->
	  
	
     <apex:outputPanel id="testPanel12">
	<apex:pageBlock >
             <apex:pageblockSection columns="3" >
                  <apex:pageBlock >
                 <apex:selectList size="1" value="{!PartnerId}" id="PartnerId" onchange="myJavaMethod1(); return false;"> 
                <apex:selectOptions value="{!company}" /> 
                   <apex:actionSupport event="onchange" >
                    </apex:actionSupport> 
                </apex:selectList>
                </apex:pageBlock>
     </apex:outputPanel>       
         
        
    
    
    
  <apex:outputPanel id="testPanel1">
         <apex:pageBlock >
             
                 <apex:selectList size="1" value="{!ContentCategoryId}" id="ContentCategoryId" onchange="myJavaMethod(); return false;" >   
                <apex:selectOptions value="{!items}" /> 
                <apex:actionSupport event="onchange">
                </apex:actionSupport>  
                 
                </apex:selectList>
               </apex:pageBlock> 
               
         </apex:outputPanel> 
          <apex:outputPanel id="testPanel">
         <apex:pageblock id="pgBlock2"> 
          <!--  <c:PageBlockTableEnhancerADV targetPbTableIds="a"  pageSizeOptions="5,10,15,30,40,50,60,70" defaultPageSize="50" enableExport="false"/> -->
            <apex:pageBlockTable id="a" value="{!performcallout}" var="wrap" width="100%"  rendered="{!normalList}">
            <apex:column headerValue="Title" value="{!wrap.Title}"/>
            <apex:column >
            <apex:inputCheckbox value="{!wrap.selected}" > 
            </apex:inputCheckbox>
            </apex:column>
            </apex:pageBlockTable> 
        </apex:pageBlock> 
        </apex:outputPanel>   
         </apex:pageBlockSection>
         </apex:pageBlock>
    </apex:form>
</apex:page>

 
Public  class AccountSelectClassController3{
public List<wrapLead> wrapLeadList {get; set;}
    public List<Lead> selectedContacts{get;set;}
    Public String selectId {get;set;}
        
         public AccountSelectClassController3(){
         body = apexpages.currentpage().getparameters().get('att');
     if(wrapLeadList == null) {
            wrapLeadList= new List<wrapLead>();
            for(Lead a: [SELECT Name,FirstName,LastName,Email,Title,Company FROM Lead ORDER by Name ASC]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapLeadList.add(new wrapLead(a));
            }
        }
        normalList = true;
        selectedList = false;
        body = '';

//conId = ApexPages.currentPage().getParameters().get('Id');              
//EmailCon =[Select email from lead where Id=:conId ].email;
 //to = EmailCon ;


    }
  

     
    public void processSelected() {
        AddRecep = '';
        selectedContacts = new List<Lead>();
      
   
        for(wrapLead wrapLeadObj : wrapLeadList) {
            if(wrapLeadObj.selected == true) {
                selectedContacts.add(wrapLeadObj.acc);
                if (AddRecep == '') {
                    AddRecep = wrapLeadObj.acc.Email;
                } else {
                    AddRecep += ';' + wrapLeadObj.acc.Email ;
                }
            }
         
        }
      
    }
    public class wrapLead {
        public Lead acc {get; set;}
        public Boolean selected {get; set;}
 
        public wrapLead (Lead a) {
            acc = a;
            selected = false;
        }
    } 
}

 

1.System.QueryException: List has no rows for assignment to SObject
Class.Leadpage.: line 11, column 1 Class.Leadtestss.runTest1: line 28, column 1

2.System.QueryException: List has no rows for assignment to SObject
Class.Leadpage.: line 11, column 1 Class.Leadtestss.runTest2: line 58, column 1

so on...

 
@isTest
public class Leadtestss{  
    static testMethod void runTest1() {
    Account account = new Account();
       account.Name = 'Accc3';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda';
       contact.LastName = 'Wilmss1';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conm';
       contact.MobilePhone = '918527116723';
       insert contact; 
              
       Lead lead1 = new Lead();
       lead1.FirstName = 'test';
       lead1.LastName = 'Bcc3'; 
       lead1.company='cc3';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout();
           test.stopTest();  
            
    }
    static testMethod void runTest2() {
    Account account = new Account();
       account.Name = 'Accc4';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda1';
       contact.LastName = 'Wilmss2';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.cnm';
       contact.MobilePhone = '918527117723';
       insert contact; 
              
       Lead lead1 = new Lead();
       lead1.FirstName = 'test1';
       lead1.LastName = 'Bcc4'; 
       lead1.company='cc4';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout1();
           test.stopTest();  
            
    }
    static testMethod void runTest3() {
    Account account = new Account();
       account.Name = 'Accc5';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda2';
       contact.LastName = 'Wilmss';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conm';
       contact.MobilePhone = '918527116723';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test2';
       lead1.LastName = 'Bcc5'; 
       lead1.company='cc5';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout2();
           test.stopTest();  
            
    }
    static testMethod void runTest4() {
    Account account = new Account();
       account.Name = 'Accc6';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda3';
       contact.LastName = 'Wilmss3';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conjm';
       contact.MobilePhone = '9185271163';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test4';
       lead1.LastName = 'Bcc6'; 
       lead1.company='cc6';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout3();
           test.stopTest();  
            
    }
    static testMethod void runTest5() {
    Account account = new Account();
       account.Name = 'Accc7';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda4';
       contact.LastName = 'Wilmss4';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.m';
       contact.MobilePhone = '918527016723';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test4';
       lead1.LastName = 'Bcc7'; 
       lead1.company='cc7';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout4();
           test.stopTest();  
            
    }

  
  
  
 static testMethod void fakeTest11(){
  

     Leadpage.fakeMethod11();
       
  } 
  static testMethod void fakeTest12(){
  

     Leadpage.fakeMethod12();
       
  }
  static testMethod void fakeTest13(){
  

     Leadpage.fakeMethod13();
       
  }
  static testMethod void fakeTest14(){
  

     Leadpage.fakeMethod14();
       
  }
  static testMethod void fakeTest15(){
  

     Leadpage.fakeMethod15();
       
  }
 
}

 
User-added image

without command button values automatic display on same page  when i select checkbox values ?How is it possible ?
 I have two pages parent and child.In parent page i have created inputtextarea and when i click add Recipient commandlink
 wrapper class contact list will display and and when i click all checkboxes then all contact email display on my parent inputtextarea field
 when i check some contact in first page and press next, on next page i have select few more contacts.and when i click select list < command button > 
User-added image
User-added image
User-added image
User-added image





 "only second page contact email will display" .
 my problem is "my first page contact email is not display on inputtextarea ????????
 
Wrapper class:-

public class MailMergeGroupContactsListwrap  {

public string GroupName{get;set;}
}

Apex Page:-

global class SalesforceVersionInfo
{
  
  public List<MailMergeGroupContactsListwrap> ConsoleWrapperList5{get;set;}
  
  
  //  public List<SFInstance> sfInstances{get;set;}
    public List<MailMergeGroupContactsListwrap> getperformcallout5()
        { 
   // public SalesforceVersionInfo()    {
   
        String jsonString = '[{"GroupContactID":539,"GroupName":"Recently modified Oct 6","TotalContacts":275},{"GroupContactID":538,"GroupName":"New Contacts Oct 6","TotalContacts":973},{"GroupContactID":529,"GroupName":"Egrabber test 2","TotalContacts":3},{"GroupContactID":526,"GroupName":"Unopened List 16","TotalContacts":721},{"GroupContactID":525,"GroupName":"Unopened List 15","TotalContacts":710},{"GroupContactID":524,"GroupName":"Unopened List 14","TotalContacts":700},{"GroupContactID":523,"GroupName":"Uploaded List 13","TotalContacts":700},{"GroupContactID":522,"GroupName":"Unopened List 12","TotalContacts":900},{"GroupContactID":521,"GroupName":"Unopened List 11","TotalContacts":900},{"GroupContactID":520,"GroupName":"Unopened List 10","TotalContacts":900},{"GroupContactID":402,"GroupName":"CS_Seattle_Mgr_10kplus_RQ","TotalContacts":523},{"GroupContactID":371,"GroupName":"List 1 Channel Manger Boston Linkedin","TotalContacts":141},{"GroupContactID":68,"GroupName":"DoD test email list","TotalContacts":3}]';
        ConsoleWrapperList5= (List<MailMergeGroupContactsListwrap>) System.JSON.deserialize(jsonString,List<MailMergeGroupContactsListwrap>.class);
       
   
      return consolewrapperlist5; 
                }
   
    global class MailMergeGroupContactsListwrap implements Comparable
    {
        public String GroupContactID {get;set;}
        public String GroupName {get;set;}
        public String TotalContacts {get;set;}
       
        public Integer compareTo(Object ObjToCompare)
        {
            return GroupContactID.CompareTo(((MailMergeGroupContactsListwrap)ObjToCompare).GroupContactID);
        }
    }
   
}

Visualforce Page :--


<apex:page controller="SalesforceVersionInfo">
<apex:form >
<apex:pageBlock >

 <apex:repeat value="{!performcallout5}" var="val">
 
        {!val.GroupName}<br/>
     
    </apex:repeat>
 
 </apex:pageBlock>

</apex:form>
</apex:page>

I want picklist here.

Thanks....

Wrapper class:-

public class MailMergeGroupContactsListwrap  {

public string GroupName{get;set;}
}

Apex Page:-

global class SalesforceVersionInfo
{
  
  public List<MailMergeGroupContactsListwrap> ConsoleWrapperList5{get;set;}
  
  
  //  public List<SFInstance> sfInstances{get;set;}
    public List<MailMergeGroupContactsListwrap> getperformcallout5()
        { 
   // public SalesforceVersionInfo()    {
   
        String jsonString = '[{"GroupContactID":539,"GroupName":"Recently modified Oct 6","TotalContacts":275},{"GroupContactID":538,"GroupName":"New Contacts Oct 6","TotalContacts":973},{"GroupContactID":529,"GroupName":"Egrabber test 2","TotalContacts":3},{"GroupContactID":526,"GroupName":"Unopened List 16","TotalContacts":721},{"GroupContactID":525,"GroupName":"Unopened List 15","TotalContacts":710},{"GroupContactID":524,"GroupName":"Unopened List 14","TotalContacts":700},{"GroupContactID":523,"GroupName":"Uploaded List 13","TotalContacts":700},{"GroupContactID":522,"GroupName":"Unopened List 12","TotalContacts":900},{"GroupContactID":521,"GroupName":"Unopened List 11","TotalContacts":900},{"GroupContactID":520,"GroupName":"Unopened List 10","TotalContacts":900},{"GroupContactID":402,"GroupName":"CS_Seattle_Mgr_10kplus_RQ","TotalContacts":523},{"GroupContactID":371,"GroupName":"List 1 Channel Manger Boston Linkedin","TotalContacts":141},{"GroupContactID":68,"GroupName":"DoD test email list","TotalContacts":3}]';
        ConsoleWrapperList5= (List<MailMergeGroupContactsListwrap>) System.JSON.deserialize(jsonString,List<MailMergeGroupContactsListwrap>.class);
       
   
      return consolewrapperlist5; 
                }
   
    global class MailMergeGroupContactsListwrap implements Comparable
    {
        public String GroupContactID {get;set;}
        public String GroupName {get;set;}
        public String TotalContacts {get;set;}
       
        public Integer compareTo(Object ObjToCompare)
        {
            return GroupContactID.CompareTo(((MailMergeGroupContactsListwrap)ObjToCompare).GroupContactID);
        }
    }
   
}

Visualforce Page :--


<apex:page controller="SalesforceVersionInfo">
<apex:form >
<apex:pageBlock >

 <apex:repeat value="{!performcallout5}" var="val">
 
        {!val.GroupName}<br/>
     
    </apex:repeat>
 
 </apex:pageBlock>

</apex:form>
</apex:page>

I want picklist here.

Thanks....


Wrapper class:-

public class MailMergeGroupContactsListwrap  {

public string GroupName{get;set;}
}


Apex Page:-

global class SalesforceVersionInfo
{


      public list<Schema.Picklistentry> getEntries(){
        return Account.fields.Industry.getDescribe().getpicklistvalues();
        }
  public List<MailMergeGroupContactsListwrap> ConsoleWrapperList5{get;set;}
  
  
  //  public List<SFInstance> sfInstances{get;set;}
    public List<MailMergeGroupContactsListwrap> getperformcallout5()
        { 
   // public SalesforceVersionInfo()    {
   
        String jsonString = '[{"GroupContactID":539,"GroupName":"Recently modified Oct 6","TotalContacts":275},{"GroupContactID":538,"GroupName":"New Contacts Oct 6","TotalContacts":973},{"GroupContactID":529,"GroupName":"Egrabber test 2","TotalContacts":3},{"GroupContactID":526,"GroupName":"Unopened List 16","TotalContacts":721},{"GroupContactID":525,"GroupName":"Unopened List 15","TotalContacts":710},{"GroupContactID":524,"GroupName":"Unopened List 14","TotalContacts":700},{"GroupContactID":523,"GroupName":"Uploaded List 13","TotalContacts":700},{"GroupContactID":522,"GroupName":"Unopened List 12","TotalContacts":900},{"GroupContactID":521,"GroupName":"Unopened List 11","TotalContacts":900},{"GroupContactID":520,"GroupName":"Unopened List 10","TotalContacts":900},{"GroupContactID":402,"GroupName":"CS_Seattle_Mgr_10kplus_RQ","TotalContacts":523},{"GroupContactID":371,"GroupName":"List 1 Channel Manger Boston Linkedin","TotalContacts":141},{"GroupContactID":68,"GroupName":"DoD test email list","TotalContacts":3}]';
        ConsoleWrapperList5= (List<MailMergeGroupContactsListwrap>) System.JSON.deserialize(jsonString,List<MailMergeGroupContactsListwrap>.class);
       
   
      return consolewrapperlist5; 
                }
   
    global class MailMergeGroupContactsListwrap implements Comparable
    {
        public String GroupContactID {get;set;}
        public String GroupName {get;set;}
        public String TotalContacts {get;set;}
       
        public Integer compareTo(Object ObjToCompare)
        {
            return GroupContactID.CompareTo(((MailMergeGroupContactsListwrap)ObjToCompare).GroupContactID);
        }
    }
   
}

Visualforce Page :--


<apex:page controller="SalesforceVersionInfo">
<apex:form >
<apex:pageBlock >

 <apex:repeat value="{!performcallout5}" var="val">
 
        {!val.GroupName}<br/>
     
    </apex:repeat>
 
 </apex:pageBlock>

</apex:form>
</apex:page>

I want picklist here.

Thanks....



 
Public  class AccountSelectClassController3{
public List<wrapLead> wrapLeadList {get; set;}
    public List<Lead> selectedContacts{get;set;}
    Public String selectId {get;set;}
        
         public AccountSelectClassController3(){
         body = apexpages.currentpage().getparameters().get('att');
     if(wrapLeadList == null) {
            wrapLeadList= new List<wrapLead>();
            for(Lead a: [SELECT Name,FirstName,LastName,Email,Title,Company FROM Lead ORDER by Name ASC]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapLeadList.add(new wrapLead(a));
            }
        }
        normalList = true;
        selectedList = false;
        body = '';

//conId = ApexPages.currentPage().getParameters().get('Id');              
//EmailCon =[Select email from lead where Id=:conId ].email;
 //to = EmailCon ;


    }
  

     
    public void processSelected() {
        AddRecep = '';
        selectedContacts = new List<Lead>();
      
   
        for(wrapLead wrapLeadObj : wrapLeadList) {
            if(wrapLeadObj.selected == true) {
                selectedContacts.add(wrapLeadObj.acc);
                if (AddRecep == '') {
                    AddRecep = wrapLeadObj.acc.Email;
                } else {
                    AddRecep += ';' + wrapLeadObj.acc.Email ;
                }
            }
         
        }
      
    }
    public class wrapLead {
        public Lead acc {get; set;}
        public Boolean selected {get; set;}
 
        public wrapLead (Lead a) {
            acc = a;
            selected = false;
        }
    } 
}

 

1.System.QueryException: List has no rows for assignment to SObject
Class.Leadpage.: line 11, column 1 Class.Leadtestss.runTest1: line 28, column 1

2.System.QueryException: List has no rows for assignment to SObject
Class.Leadpage.: line 11, column 1 Class.Leadtestss.runTest2: line 58, column 1

so on...

 
@isTest
public class Leadtestss{  
    static testMethod void runTest1() {
    Account account = new Account();
       account.Name = 'Accc3';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda';
       contact.LastName = 'Wilmss1';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conm';
       contact.MobilePhone = '918527116723';
       insert contact; 
              
       Lead lead1 = new Lead();
       lead1.FirstName = 'test';
       lead1.LastName = 'Bcc3'; 
       lead1.company='cc3';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout();
           test.stopTest();  
            
    }
    static testMethod void runTest2() {
    Account account = new Account();
       account.Name = 'Accc4';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda1';
       contact.LastName = 'Wilmss2';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.cnm';
       contact.MobilePhone = '918527117723';
       insert contact; 
              
       Lead lead1 = new Lead();
       lead1.FirstName = 'test1';
       lead1.LastName = 'Bcc4'; 
       lead1.company='cc4';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout1();
           test.stopTest();  
            
    }
    static testMethod void runTest3() {
    Account account = new Account();
       account.Name = 'Accc5';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda2';
       contact.LastName = 'Wilmss';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conm';
       contact.MobilePhone = '918527116723';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test2';
       lead1.LastName = 'Bcc5'; 
       lead1.company='cc5';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout2();
           test.stopTest();  
            
    }
    static testMethod void runTest4() {
    Account account = new Account();
       account.Name = 'Accc6';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda3';
       contact.LastName = 'Wilmss3';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.conjm';
       contact.MobilePhone = '9185271163';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test4';
       lead1.LastName = 'Bcc6'; 
       lead1.company='cc6';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout3();
           test.stopTest();  
            
    }
    static testMethod void runTest5() {
    Account account = new Account();
       account.Name = 'Accc7';
       insert account;         

       Contact contact = new Contact();
       contact.FirstName = 'Todda4';
       contact.LastName = 'Wilmss4';
       contact.AccountID = account.Id;
       contact.Email = 'twilms@verisign.m';
       contact.MobilePhone = '918527016723';
       insert contact; 
              
       Lead lead1= new Lead();
       lead1.FirstName = 'test4';
       lead1.LastName = 'Bcc7'; 
       lead1.company='cc7';      
       insert lead1; 
            
         test.startTest();
         PageReference pageRef1 = Page.Leadpage; // Your page name
         pageRef1.getParameters().put('Id', String.valueOf(lead.Id));
         Test.setCurrentPage(pageRef1);
        Test.setMock(HttpCalloutMock.class, new Leadpagemock());
          ApexPages.StandardController sc1 = new ApexPages.StandardController(lead1);//Instance of your object
         Leadpage testDObj = new Leadpage();
          testDObj.getperformcallout4();
           test.stopTest();  
            
    }

  
  
  
 static testMethod void fakeTest11(){
  

     Leadpage.fakeMethod11();
       
  } 
  static testMethod void fakeTest12(){
  

     Leadpage.fakeMethod12();
       
  }
  static testMethod void fakeTest13(){
  

     Leadpage.fakeMethod13();
       
  }
  static testMethod void fakeTest14(){
  

     Leadpage.fakeMethod14();
       
  }
  static testMethod void fakeTest15(){
  

     Leadpage.fakeMethod15();
       
  }
 
}

 
 I have two pages parent and child.In parent page i have created inputtextarea and when i click add Recipient commandlink
 wrapper class contact list will display and and when i click all checkboxes then all contact email display on my parent inputtextarea field
 when i check some contact in first page and press next, on next page i have select few more contacts.and when i click select list < command button > 
User-added image
User-added image
User-added image
User-added image





 "only second page contact email will display" .
 my problem is "my first page contact email is not display on inputtextarea ????????
 
i have built a pagination for wrapper class,my requirement is after clicking the next link the previous link will activate , similarly when i will be on last page the next link will be deactivate.


my controller:-

    public with sharing class acc_controller {
    
    public  List<Account> accList{get;set;}
    public  List<AccWrapper> accWrapList{get;set;}
    public  List<AccWrapper> accWrapList2{get;set;}
    public  List<AccWrapper> accWrapList3{get;set;}
    
    //public Integer cust_limit{get;set;}
    public  Integer cust_offset{get;set;}
    public  Integer cust_fixed_offset{get;set;}
    public  Boolean showFinalResult{get;set;}
    
    public Class AccWrapper
    {
        public Account acc{get;set;}
        public Boolean flag{get;set;}
        public AccWrapper(Account acc)
        {
            this.acc=acc;
            this.flag=false;
        }
    }
        public acc_controller(ApexPages.StandardController controller) {
            
        //cust_limit=1;
        showFinalResult=false;
        cust_fixed_offset=2;
        cust_offset=0;
        accList=new List<Account>();
        accWrapList=new List<AccWrapper>();
        accWrapList2=new List<AccWrapper>();
        accList=[select id,name from account limit 100];
        
        Integer count=0;
        for(Account accObj:accList)
        {
            accWrapList.add(new AccWrapper(accObj));
            if(count<cust_fixed_offset)
            {
            accWrapList2.add(new AccWrapper(accObj));
            count++;
            }
            
        }
    }
    
    
    
    public void saveList()
    {
        
        for(AccWrapper accWrapObj1:accWrapList)
        {
            for(AccWrapper accWrapObj2:accWrapList2)
            {
                if(accWrapObj2.acc.Id==accWrapObj1.acc.Id)
                {
                   accWrapObj1.flag=accWrapObj2.flag; 
                }
            }
        }
    }
    
    public  void next()
    {
        accWrapList2=new List<AccWrapper>();
        
        cust_offset+=cust_fixed_offset; 
        if(cust_offset>accWrapList.size()-1)
        {
            cust_offset=accWrapList.size()-1;
            
        }
        Integer counter=0;
        for(Integer i=cust_offset;i<accWrapList.size();i++)
        {
            if(counter<cust_fixed_offset)
            {
             accWrapList2.add(accWrapList[i]);
             counter++;
            }
            else
            {
            break;
            }
            
        }
       
    }
    
    
    public  void previous()
    {
        accWrapList2=new List<AccWrapper>();
        cust_offset-=cust_fixed_offset;
        if(cust_offset<1)
        {
            cust_offset=0;
            
        }
        Integer counter=0;
        for(Integer i=cust_offset;i<accWrapList.size();i++)
        {
            if(counter<cust_fixed_offset)
            {
             accWrapList2.add(accWrapList[i]);
             counter++;
            }
            else
            {
            break;
            }
            
        }
            
    
    }
    
    public void first()
    {
    }
    
    public void last()
    {
    }
    
    public void Process()
    {
         
         accWrapList3=new List<AccWrapper>();
         for(AccWrapper accWrapObj1:accWrapList)
         {
             if(accWrapObj1.flag)
             {
             accWrapList3.add(accWrapObj1);
             }
         }
         showFinalResult=true;
        
    }

}

myVfpage:-

<apex:page standardController="Account" extensions="acc_controller">
<apex:form >
<apex:actionstatus startText="processing..." id="statusBar"></apex:actionstatus>
<apex:pageblock >
<!--<apex:commandLink value="First"/>-->
     <apex:commandLink value="Next" reRender="pTable" status="statusBar" action="{!next}"/>&nbsp;&nbsp;
     <apex:commandLink value="Previous" reRender="pTable" status="statusBar" action="{!previous}"/>
     <!--<apex:commandLink value="Last"/>     -->
     
     
     <apex:commandbutton value="Process" action="{!Process}" rerender="finalResult" status="statusBar"/>
     <apex:outputPanel id="pTable">
     <apex:pageblockTable value="{!accWrapList2}" var="a" >
     <apex:column headerValue="Select">
         <apex:inputCheckbox value="{!a.flag}">
         <apex:actionSupport event="onclick" rerender="pTable" status="statusBar" action="{!saveList}"/>
         </apex:inputCheckbox>
     </apex:column>
     <apex:column value="{!a.acc.name}"/>
     
     </apex:pageblockTable>
     
     </apex:outputPanel>
     
     <!--<apex:commandLink value="First"/>-->
     <apex:commandLink value="Next" reRender="pTable" status="statusBar" action="{!next}"/>&nbsp;&nbsp;
     <apex:commandLink value="Previous" reRender="pTable" status="statusBar" action="{!previous}"/>
     <!--<apex:commandLink value="Last"/>     -->
     
     <apex:pageblock >
     <apex:outputPanel id="finalResult">
     <apex:pageBlockTable value="{!accWrapList3}" var="ac" rendered="{!showFinalResult}">
     <apex:column value="{!ac.acc.name}"/>
     </apex:pageBlockTable>
     </apex:outputPanel>
         
     </apex:pageblock>
     
 </apex:pageblock>
</apex:form>
</apex:page>



please help me...
please run this code and please share the solution.
i am new to salesforce and this requirement is in high priority.
Wrapper class:-

public class MailMergeGroupContactsListwrap  {

public string GroupName{get;set;}
}

Apex Page:-

global class SalesforceVersionInfo
{
  
  public List<MailMergeGroupContactsListwrap> ConsoleWrapperList5{get;set;}
  
  
  //  public List<SFInstance> sfInstances{get;set;}
    public List<MailMergeGroupContactsListwrap> getperformcallout5()
        { 
   // public SalesforceVersionInfo()    {
   
        String jsonString = '[{"GroupContactID":539,"GroupName":"Recently modified Oct 6","TotalContacts":275},{"GroupContactID":538,"GroupName":"New Contacts Oct 6","TotalContacts":973},{"GroupContactID":529,"GroupName":"Egrabber test 2","TotalContacts":3},{"GroupContactID":526,"GroupName":"Unopened List 16","TotalContacts":721},{"GroupContactID":525,"GroupName":"Unopened List 15","TotalContacts":710},{"GroupContactID":524,"GroupName":"Unopened List 14","TotalContacts":700},{"GroupContactID":523,"GroupName":"Uploaded List 13","TotalContacts":700},{"GroupContactID":522,"GroupName":"Unopened List 12","TotalContacts":900},{"GroupContactID":521,"GroupName":"Unopened List 11","TotalContacts":900},{"GroupContactID":520,"GroupName":"Unopened List 10","TotalContacts":900},{"GroupContactID":402,"GroupName":"CS_Seattle_Mgr_10kplus_RQ","TotalContacts":523},{"GroupContactID":371,"GroupName":"List 1 Channel Manger Boston Linkedin","TotalContacts":141},{"GroupContactID":68,"GroupName":"DoD test email list","TotalContacts":3}]';
        ConsoleWrapperList5= (List<MailMergeGroupContactsListwrap>) System.JSON.deserialize(jsonString,List<MailMergeGroupContactsListwrap>.class);
       
   
      return consolewrapperlist5; 
                }
   
    global class MailMergeGroupContactsListwrap implements Comparable
    {
        public String GroupContactID {get;set;}
        public String GroupName {get;set;}
        public String TotalContacts {get;set;}
       
        public Integer compareTo(Object ObjToCompare)
        {
            return GroupContactID.CompareTo(((MailMergeGroupContactsListwrap)ObjToCompare).GroupContactID);
        }
    }
   
}

Visualforce Page :--


<apex:page controller="SalesforceVersionInfo">
<apex:form >
<apex:pageBlock >

 <apex:repeat value="{!performcallout5}" var="val">
 
        {!val.GroupName}<br/>
     
    </apex:repeat>
 
 </apex:pageBlock>

</apex:form>
</apex:page>

I want picklist here.

Thanks....
I am receiving the following error in the Creating Global Quick Actions Trailhead module challenge - "The global quick action was not created or it was not named 'New Detailed Account' "

Have read the previous posts and suggestions to fix, but my Global Actions are identical to the correct responses and the Publisher Layouts are displayed.  When I go into Chatter and Home on one of the Apps, I still do not see the New Detailed Account action listed in the feed though.  Is there some other setting I need to fix that will enable this to display BESIDES the Global Page Layout??
User-added imageUser-added image
User-added image
Wrapper class is for displaying the 2 different objects records in One tableor Objects with Checkbox.Till here It's clear.
My Question is
For example: I am using 2 objects say Account, Opportunity
While displaying all the Account and Opportunity records, i got a doubt that If Account have 100 records and Opportunity have 40 records.
Then How to write the Loop for that requirement
?