You need to sign in to do that
Don't have an account?
bs881026
How do i bind the extension with the visualforce action
Hello,
I have a scenario wherein i have to create a lookup field on the visualforce page--> select a contact--> fetch 5 fields of that contact --> make changes in the field value --> save it back--> Changes should reflect back in the backend.
Please let me know how to go about this.
I am new in this technology, so i very little idea of it.
Thanks,
I have a scenario wherein i have to create a lookup field on the visualforce page--> select a contact--> fetch 5 fields of that contact --> make changes in the field value --> save it back--> Changes should reflect back in the backend.
Please let me know how to go about this.
I am new in this technology, so i very little idea of it.
Thanks,
for example:
The thing that I need to do here is, first have a lookup field to Contact Object on the VF page--> then fetch 5 fields of the selected contact--> get the 5 field values in text boxes--> edit those values--> save it back.
I could not follow your previous code.
Please let me know,what is the way to achieve it.
Thanks,
----------------------
<apex:page standardController="Contact" extensions="ModifyContactData">
<apex:form >
<apex:inputField id="contactList" value="{!cont.SuperContact__c}"/>
<apex:pageBlock >
<apex:pageBlockTable id="pageblock1" value="{!contDetail}" var="contactdetail">
<apex:inputField id="contName" value="{!contactdetail.name}"/>
<apex:inputField id="contPhone" value="{!contactdetail.phone}"/>
<apex:inputField id="contEmail" value="{!contactdetail.Email}"/>
</apex:pageBlockTable>
<apex:commandButton value="GO!" action="{!go}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Class
------------
public class ModifyContactData
{
public Contact cont{get;set;}
public Contact contDetail{get;set;}
/*public string Name{get;set;}
public string Phone{get;set;}
public string email{get;set;}*/
List<Contact> contactId;
public ModifyContactData(ApexPages.StandardController std)
{
this.cont = (Contact)std.getrecord();
cont = new Contact();
//contactId = ApexPages.currentPage().getParameters().get('id');
}
public Contact go()
{
system.debug('********');
contDetail = [select Name, Phone,email from Contact where id =:cont.SuperContact__c];
system.debug('Queried Values' +contDetail);
return null;
}
}
I am getting Could not resolve the entity from <apex:inputField> value binding '{!contactdetail.name}'. <apex:inputField> can only be used with SObjects, or objects that are Visualforce field component resolvable. Error
please let me know, what is going wrong.
Thanks,
Can anyone please let me know, how to go for this.
Thanks,