You need to sign in to do that
Don't have an account?
sonam
Values not Captured from VF page
Hi,
I have to implement a search functionality where
public class mycustomcontroller
{
public List<Contact> ContactObjects {get;set;}
public PageReference runSearch(){
String firstName= ContactObj.FirstName;
// code
}
}
In the VF page i have used the below to capture the firstname.
<td><apex:outputLabel >Contact First Name </apex:outputLabel></td>
<td>
<apex:inputField value="{!ContactObj.FirstName}" id="fname"/>
</td>
M not able to get the value of firsntname.Its null in the debug logs.
Please help.
Thanks in advance.
I have to implement a search functionality where
public class mycustomcontroller
{
public List<Contact> ContactObjects {get;set;}
public PageReference runSearch(){
String firstName= ContactObj.FirstName;
// code
}
}
In the VF page i have used the below to capture the firstname.
<td><apex:outputLabel >Contact First Name </apex:outputLabel></td>
<td>
<apex:inputField value="{!ContactObj.FirstName}" id="fname"/>
</td>
M not able to get the value of firsntname.Its null in the debug logs.
Please help.
Thanks in advance.
Please modify your class:
//class
public class mycustomcontroller
{
public Contact ContactObj {get; set;}
public List<Contact> ContactObjects {get;set;}
public mycustomcontroller() {
ContactObj = new Contact();
}
public PageReference runSearch(){
String firstName= ContactObj.FirstName;
// code
}
}