4

While discussing a problem with inlineEdit I came across a interesting bug. The inlineEdit supports show and hide feature actually breaks when a rerender is done.

So here is a sample code

<apex:page standardController="Contact">
<apex:form id="frm" >

    <apex:pageBlock mode="inlineEdit" id="pb">
            <apex:commandButton value="Rerender" rerender="frm"/>
            <apex:commandButton id="editButton" value="Edit"/>
            <apex:commandButton id="saveButton" value="Save" style="display: none;"/>                
            <apex:commandButton id="cancelButton" value="Cancel" style="display: none;"/>
        <apex:pageBlockSection >
            <apex:outputField value="{!contact.lastname}">
                    <apex:inlineEditSupport showOnEdit="saveButton,cancelButton" 
                    hideOnEdit="editButton" event="ondblclick" 
                    changedStyleClass="myBoldClass" />
            </apex:outputField>
            <apex:outputField value="{!contact.accountId}"/>
            <apex:outputField value="{!contact.phone}"/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>

With this code if you directly go ahead and do a inline edit on a field the fields will appear in input mode and the buttons Edit,Save,Cancel will appear and disappear accordingly

So

  • Edit Mode : Save Button and Cancel Button
  • ReadOnly Move : Edit Button

Now if I press the rerender button(which just rerenders the form) the inline edits "showOnEdit" and "hideOnEdit" will stop working.

Is this is a possible bug ? Or am doing something wrong?

1

Having re-created this page, and followed the steps you have described extensively, if this was a bug (asked Jun '13) it is now definitely fixed.

In read mode:

In read mode

and in edit mode:

in edit mode

Regardless of use of the re-render button.

Always nice to see a bug squashed!

1

there seems to be some problem with inline edit functionality. For me inline edit was not working on page load inside table. But on click of button like save, update(basically page refresh) , inline edit starts working surprisingly.

  • Considering the question "Is this is a possible bug ? Or am doing something wrong?" I think this can be considered an answer or confirmation of the issue no ? @mak k An answer does usually stand out more if you provide some more information, for instance how you've reproduced or worked around the issue. – Samuel De Rycke Nov 6 '15 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.