I have a visualforce page which displays a table based on a value picked from a picklist at the top of the page.

After the user selects a value, the table refreshes with the data, which the user can then edit using InlineEditSupport for the outputFields.

When the user Edits an outputField, the ShowOnEdit should show the commandButton-'Save' which starts off hidden using 'style="display:none"'

Problem, The ShowOnEdit does not work unless I do a whole page refresh by leaving the reRender parameter blank in the action function.

If i use the reRender to update the table/pageblock/pageblocksection, the data in the table is updated correctly, and the inlineEditing works, but the commandButton 'Save' does not get revealed by the ShowOnEdit parameter.

Here is the pageBlockSection which the table and buttons resides in:

<apex:pageBlockSection id="blkResults" title="{!GetCurrentList.name} - Candidates:" columns="1" collapsible="false">
    <div align="center">
        <apex:commandButton id="cmdAddCandidate" onclick="AddCand()" value="Add Candidate" reRender="none"/>
        <apex:commandButton id="cmdApplyToJob" onclick="ReadyApplyToJob()" value="Apply to Job" reRender="none"/>
        <apex:commandButton id="cmdDelCandidate" onclick="actDelResults()" value="Delete Candidate" reRender="none"/>
        <apex:commandButton id="saveSearchResults" onclick="actSaveResults()" value="Save List" reRender="none" style="display:none"/>

        <apex:actionStatus id="Working">
            <apex:facet name="start">
                <img src="/img/loading.gif" /> Working, please wait...
<apex:outputPanel id="PanelResultTable">
    <apex:pageBlockTable id="CandList" value="{!lstSelectableResults}" var="sr">
        <apex:inlineEditSupport event="ondblclick" showOnEdit="saveSearchResults" hideOnEdit="cmdApplyToJob, cmdAddCandidate , cmdDelCandidate" />
        <apex:column >
            <apex:inputCheckbox value="{!sr.isSelected}"/>
        <apex:column headerValue="First Name">
            <apex:outputField value="{!sr.obj.Candidate__r.FirstName}"/>
        <apex:column headerValue="Last Name">
            <apex:outputField value="{!sr.obj.Candidate__r.LastName}"/>
        [More Columns showing data in the same style as above]

ps. HideOnEdit also does not work. but I assume its the same problem so will be solved as long as ShowOnEdit is solved.

  • This is a dupe of salesforce.stackexchange.com/questions/58483/… Please amend your original question with additional details or clarification
    – Force Hero
    Dec 10, 2014 at 11:47
  • Sorry if I wasn't clear, this is infact a separate problem but also with inlineEditSupport. That one was due to pageBlockSection not being rendered on-page-load breaking inlineEditSupport-show/hide, This one is reRender pageBlockTable breaking inLineEditSuport-show/hide functionality.
    – Will.T
    Dec 10, 2014 at 12:39
  • Nope, that's me rushing at work, sorry mate.
    – Force Hero
    Dec 10, 2014 at 12:40
  • Thats okay, thank you very much :) I'll be happy to provide anymore code/information on either questions.
    – Will.T
    Dec 10, 2014 at 12:42


Your Answer

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

Browse other questions tagged or ask your own question.