You need to sign in to do that
Don't have an account?
Ashutosh Tripathi 9
autocomplete lookup is not working
Hi,
I am implementing autocomplete functionality on custom vf page. I have called the controller on the page which conitain the method which return the contact details using SOQL query. Now below is the code which I am using for auto complete. Employee is the custom object which store the employee information.
********obelow is not working*************
<apex:inputText value="{!Employee.Name}" id="memNam">
<c:autoComplete autocomplete_textbox="{!$Component.memNam}" objectname="Contact" />
<apex:actionSupport id="actionSupport_1_15_2" event="onchange" reRender="panelGrid_1_24,panelGrid_1_25,panelGrid_2" action="{!populateEmployeeDetails}"/>
</apex:inputText>
***********************************************
Now I want to populate two fields(phone,email) on the vf page based on the contact selected in the autocoplete textbox. This funtionality is working fine If I took picklist(below code) inplace of autocomplete but stops If I am using autocomplete.
**********************working below code***********
<apex:selectList id="selectList_1_6" value="{!Employee.Name}" size="1">
<apex:selectOptions id="selectOptions_1_10" value="{!EmployeeFirstName}"/>
<apex:actionSupport id="actionSupport_1_15_2" event="onchange" reRender="panelGrid_1_24,panelGrid_1_25,panelGrid_2" action="{!populateEmployeeDetails}"/>
</apex:selectList>
*************************************
Please suggest how can I make this happen with autocomplete functionality, what i am missing here ?
I would really appriciate your help.
Regards
Ashutosh
I am implementing autocomplete functionality on custom vf page. I have called the controller on the page which conitain the method which return the contact details using SOQL query. Now below is the code which I am using for auto complete. Employee is the custom object which store the employee information.
********obelow is not working*************
<apex:inputText value="{!Employee.Name}" id="memNam">
<c:autoComplete autocomplete_textbox="{!$Component.memNam}" objectname="Contact" />
<apex:actionSupport id="actionSupport_1_15_2" event="onchange" reRender="panelGrid_1_24,panelGrid_1_25,panelGrid_2" action="{!populateEmployeeDetails}"/>
</apex:inputText>
***********************************************
Now I want to populate two fields(phone,email) on the vf page based on the contact selected in the autocoplete textbox. This funtionality is working fine If I took picklist(below code) inplace of autocomplete but stops If I am using autocomplete.
**********************working below code***********
<apex:selectList id="selectList_1_6" value="{!Employee.Name}" size="1">
<apex:selectOptions id="selectOptions_1_10" value="{!EmployeeFirstName}"/>
<apex:actionSupport id="actionSupport_1_15_2" event="onchange" reRender="panelGrid_1_24,panelGrid_1_25,panelGrid_2" action="{!populateEmployeeDetails}"/>
</apex:selectList>
*************************************
Please suggest how can I make this happen with autocomplete functionality, what i am missing here ?
I would really appriciate your help.
Regards
Ashutosh
http://docs.releasenotes.salesforce.com/en-us/winter14/release-notes/rn_186_vforce_html5_datalist_attribute.htm
Open below link for Attributes for <apex:inputText />. Find List attribute here for more description.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_inputText.htm