5

I have the following visualforce page that I would like to use inline editing with.

<apex:page standardController="Account" extensions="customController" >
<apex:form id="theForm">
<apex:sectionHeader id="sectionHeader" title="Account" subtitle="{!Account.name}"/>  

<apex:pageBlock mode="maindetail" id="thePageBlock" >

    <apex:pageBlockButtons location="top" id="buttons">
        <apex:commandButton action="{!update}" id="saveButton" value="Update"/>
        <apex:commandButton onclick="resetinlineedit()" id="cancelButton" value="Cancel" />
    </apex:pageBlockButtons>

    <apex:pageBlockSection id="contactInfo" title="Contact Information" columns="2" collapsible="false">            
        <apex:outputField id="homePhone" value="{!Account.Home_Phone__c}"/>
        <apex:outputField id="primaryEmail" value="{!Account.Primary_Email__c}"/>
        <apex:outputField id="businessPhone" value="{!Account.phone}"/>
        <apex:outputField id="billingEmail" value="{!Account.Billing_Email__c}"/>
        <apex:outputField id="otherPhone" value="{!Account.Other_Phone__c}"/>
        <apex:outputField id="technicalEmail" value="{!Account.Technical_Email__c}"/>
        <apex:inlineEditSupport id="editSupport" event="ondblclick" />
    </apex:pageBlockSection>

</apex:pageBlock>
</apex:form>

What I want to happen is if a user changes a field and then hits the cancel button the fields in the page block section revert to what they were. As it is now clicking the cancel button removes the undo button, but keeps the entered values in the field.

Can anybody tell me why this is happening, and how to get the desired functionality?

1
  • I think you have missed out resetFunction="resetInlineEdit" in the following code <apex:inlineEditSupport id="editSupport" event="ondblclick" /> Anyway, I have researched on multiple threads and there is no real solution in this issue. Have you able to find a workaround to this?
    – user39062
    Nov 10, 2016 at 4:44

1 Answer 1

3

I think the problem is that resetInlineEdit() appears to be missing (see also this question.) I tried running your code in my dev org and Firebug showed the following error:

ReferenceError: resetInlineEdit is not defined

1
  • Thank you for your reply, I guess I'll have to figure something else out.
    – Minutiae
    Nov 19, 2013 at 14:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .