You need to sign in to do that
Don't have an account?
Sammy7
pass lookup inputfield to extension
Hi,
So I have an input field :<b>To: </b> <apex:inputfield value="{!q.contactid}"/><p/>
and in my controller, I have:
public Quote q {get;set;}
and then I would like to present the email address in this outputfield: <b>NAME: </b> <apex:outputtext value="{!q.contact.name}"/><p/>
However this is not working, Please help:
Below is my VF page:
and my extension:
So I have an input field :<b>To: </b> <apex:inputfield value="{!q.contactid}"/><p/>
and in my controller, I have:
public Quote q {get;set;}
and then I would like to present the email address in this outputfield: <b>NAME: </b> <apex:outputtext value="{!q.contact.name}"/><p/>
However this is not working, Please help:
Below is my VF page:
<apex:page standardController="Quote" extensions="email_class"> <apex:form > <apex:pageBlock title="Email Details" id="ed"> <b>To: </b> <apex:inputfield value="{!q.contactid}"/><p/> <apex:actionSupport event="onchange" action="{!Contactpopulated}" rerender="ed"/> <b>NAME: </b> <apex:outputtext value="{!q.contact.email}"/><p/> ....... .......
and my extension:
public class email_class{ Public string ToAddresses {get;set;} Public string CCAddresses {get;set;} Public string quoteId {get;set;} Public string subject {get;set;} public string email_body {get;set;} public string emailTo {get;set;} public string emailCC {get;set;} public Quote q {get;set;} // public Contact ct {get;set;} public string [] ccaddress; public email_class(ApexPages.StandardController controller) { quoteId = ApexPages.currentPage().getParameters().get('id'); Quote q= (Quote)controller.getRecord(); } public void Contactpopulated(){ q.contact=[ Select email, name From contact where id=:q.contactid limit 1]; }
Wrap the action support in inputfield tag as like below,
All Answers
I modified my code after googling, but still nothing....the email address wont populate. Also my debug log shows nothing as well...plz help.
Extension:VF page:
Wrap the action support in inputfield tag as like below,