Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page standardController="Webinar__c" extensions="CheckAllUsingJavascriptController" sidebar="false">
- <apex:form >
- <apex:pageBlock >
- <apex:outputLabel > Countries : </apex:outputLabel>
- <apex:selectList size="1" value="{!selectedCountry}">
- <apex:selectOptions value="{!countrieLst }"/>
- </apex:selectList> <br/>
- </apex:pageBlock>
- </apex:form>
- </apex:page>
- public List<wrapAccount> wrapperAccountList {get; set;}
- public List<System.SelectOption> countrieLst {get;set;}
- public String selectedCountry{get;set;}
- List<Lead> LeadList = new List<Lead>();
- public CheckAllUsingJavascriptController (Apexpages.StandardController stdcController){
- //List<LightiningEd__Webinar_Attendees_Status__c> selectedContacts = new List<LightiningEd__Webinar_Attendees_Status__c>();
- countrieLst = new List<System.SelectOption>();
- if(wrapperAccountList == null) {
- wrapperAccountList = new List<wrapAccount>();
- for(LightiningEd__Webinar__c a1: [select id,Name,Start_Time__c,Finish_Time__c,Registration_URL__c,Expired__c,SCO_ID__c,Retrival_Date__c,(select id,Name,principal_id__c,Login__c,isLead__c,Attandance_Status__c,Duration_Spend__c,Company_Name__c,City__c,State__c,Country__c,Mobile_Phone__c from LightiningEd__Webinar_Attendees_Statuss__r) from LightiningEd__Webinar__c where id = :ApexPages.currentPage().getParameters().get('id')]) {
- for(LightiningEd__Webinar_Attendees_Status__c a : a1.LightiningEd__Webinar_Attendees_Statuss__r){
- wrapperAccountList.add(new wrapAccount(a));
- }
- }
- }
- }
- public PageReference processSelected(){
- List<LightiningEd__Webinar_Attendees_Status__c> selectedContacts = new List<LightiningEd__Webinar_Attendees_Status__c>();
- countrieLst = new List<System.SelectOption>();
- //countryOptions = new List<System.SelectOption>();
- for(wrapAccount cCon: wrapperAccountList){
- if(cCon.selected == true){
- selectedContacts.add(cCon.acc);
- }
- }
- System.debug('These are the selected Contacts...'+selectedContacts);
- for(LightiningEd__Webinar_Attendees_Status__c acc : selectedContacts){
- system.debug('selected records::::'+acc);
- countrieLst.add(new System.SelectOption(acc.Name,acc.Name));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__Login__c,acc.LightiningEd__Login__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__Attandance_Status__c,acc.LightiningEd__Attandance_Status__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__Company_Name__c,acc.LightiningEd__Company_Name__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__City__c,acc.LightiningEd__City__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__State__c,acc.LightiningEd__State__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__Country__c,acc.LightiningEd__Country__c));
- countrieLst.add(new System.SelectOption(acc.LightiningEd__Mobile_Phone__c,acc.LightiningEd__Mobile_Phone__c));
- System.debug('CountryOptions:::'+countrieLst);
- //countryOptions1.addAll(countryOptions);
- }
- wrapperAccountList=null;
- return null;
- public class wrapAccount {
- public LightiningEd__Webinar_Attendees_Status__c acc {get; set;}
- public Boolean selected {get; set;}
- public wrapAccount(LightiningEd__Webinar_Attendees_Status__c a) {
- acc = a;
- selected = false;
- }
- }
Add Comment
Please, Sign In to add comment