public string Name{get;set;}
public integer country{get;set;}
public boolean isSelected{get;set;}
public string city{get;set;}
}
public class WrapperDataLoadTest1{
public list<DataloadTest__c> W1{get;set;}
public string WName{get;set;}
public integer WContry{get;set;}
public string Wcity{get;set;}
public WrapperDataLoadTest1(){
W1= new list<DataLoadTest__c> ();
}
public void create(){
WrapperDataLoadTest W2= new WrapperDataLoadTest();
W2.Name=Wname;
W2.Country=WCountry;
W2.city=Wcity;
W1.add(W2);
}
Public void Delt(){
for(Integer i=0;i<W1.size();i++){
if(W1[i].isSelected==true){
W1.remove(i);
i--;
}
}
}
}
4 Antworten
Can you try this?
public with sharing class WrapperDataLoadTest {
public string Name{get;set;}
public integer country{get;set;}
public boolean isSelected{get;set;}
public string city{get;set;}
public class WrapperDataLoadTest1{
public list<DataloadTest__c> W1{get;set;}
public string WName{get;set;}
public integer WContry{get;set;}
public string Wcity{get;set;}
public WrapperDataLoadTest1(){
W1= new list<DataLoadTest__c> ();
}
public void create(){
WrapperDataLoadTest W2= new WrapperDataLoadTest();
W2.Name=Wname;
W2.Country=WCountry;
W2.city=Wcity;
W1.add(W2);
}
Public void Delt(){
for(Integer i=0;i<W1.size();i++){
if(W1[i].isSelected==true){
W1.remove(i);
i--;
}
}
}
}