Question
I'm trying out the apex:inlineEditSupport for the first time and am having some trouble getting the showOnEdit and hideOnEdit attributes to work. My codes is based on the example from the inlineEditSupport docs, but the when I double click a field to start inline editing the back to record button is NOT hidden, and the save/cancel buttons are NOT shown.
For comparison when you inline edit a field on the standard detail page the initial detail buttons are hidden and replaced with show/cancel buttons. My goal is to emulate the standard behavior with my page.
Code
<apex:pageBlock>
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" id="saveButton" value="Save" rendered="false"/>
<apex:commandButton action="{!cancel}" id="cancelButton" value="Cancel" rendered="false"/>
<apex:commandButton action="{!cancel}" value="Back to Record" id="backButton"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:outputField value="{!account.name}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="backButton"
event="ondblclick"/>
</apex:outputField>
</apex:pageBlockSection>
</apex:pageBlock>
Cancel
button appears only once. No workarount yet :( salesforce.stackexchange.com/questions/10537/…