You need to sign in to do that
Don't have an account?
sandeep reddy 37
constructor with parameter invoked in vf page
I have class with parameterised constractor
public class main{
public string head;
public string industry;
publuc list<account> acc;
public mail(string nam,string ind){
this.head=nam;
this.industry=ind;
acc=new list<account>();
}
public void dodml(){
account a=new account();
a.name=head;
a.industry=industry;
acc.add(a);
insert acc;
}
so please tell me
how to call this class in vf page
public class main{
public string head;
public string industry;
publuc list<account> acc;
public mail(string nam,string ind){
this.head=nam;
this.industry=ind;
acc=new list<account>();
}
public void dodml(){
account a=new account();
a.name=head;
a.industry=industry;
acc.add(a);
insert acc;
}
so please tell me
how to call this class in vf page
Try to use theses topics:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std_access_data.htm
They're simple to understand!