function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sushmita Sikha 7Sushmita Sikha 7 

Problem while using <apex:inlineEditorSupport>

Hi
 
I have below code where I am trying to use inline editing for Status field. Inline editing is not working.
Can anybody help me where I am going wrong.
 
<apex:form >
                <apex:pageBlock >
               <apex:pageBlockTable value="{!caseList}" var="ca">
               <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
               <apex:column value="{!ca.CaseNumber}"/>
                 <apex:column headerValue="Status">
                       <apex:outputField value="{!ca.status}">
                           <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
 
                      </apex:outputField>
 
                   </apex:column>
 
                  </apex:pageBlockTable>
           <apex:commandbutton value="save" action="{!save1}"/>
 
      
           </apex:pageBlock>
            </apex:form>
 
Thanks & Regards
Sushmita Sikha
 
Best Answer chosen by Sushmita Sikha 7
SFDC GuestSFDC Guest
Hi Sushmita,

Here is the vf page.

<apex:page standardController="Case" recordSetVar="cases" id="thePage"> 
    <apex:form id="theForm"> 
        <apex:pageBlock id="thePageBlock"> 
            <apex:pageBlockTable value="{!cases}" var="cs" id="thePageBlockTable"> 
                <apex:column >
                    <apex:outputField value="{!cs.CaseNumber}" id="CaseNumberDOM" /> 
                    <apex:facet name="header">Name</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!cs.Subject}" id="CaseSubjectDOM" /> 
                    <apex:facet name="header">Type</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!cs.Status}" 
                        id="CaseStatusDOM" />  
                        <apex:facet name="header">Status</apex:facet>
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" /> 
            </apex:pageBlockTable> 
            <apex:pageBlockButtons > 
                <apex:commandButton value="Edit" action="{!save}" id="editButton" />
                <apex:commandButton value="Save" action="{!save}" id="saveButton" />
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" />
            </apex:pageBlockButtons> 
        </apex:pageBlock> 
    </apex:form>
</apex:page>

Please mark it as best answer if it resolved your problem.

Thank You,
Sohel Mohd

All Answers

SFDC GuestSFDC Guest
Hi Sushmita,

Here is the vf page.

<apex:page standardController="Case" recordSetVar="cases" id="thePage"> 
    <apex:form id="theForm"> 
        <apex:pageBlock id="thePageBlock"> 
            <apex:pageBlockTable value="{!cases}" var="cs" id="thePageBlockTable"> 
                <apex:column >
                    <apex:outputField value="{!cs.CaseNumber}" id="CaseNumberDOM" /> 
                    <apex:facet name="header">Name</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!cs.Subject}" id="CaseSubjectDOM" /> 
                    <apex:facet name="header">Type</apex:facet>
                </apex:column>
                <apex:column >
                    <apex:outputField value="{!cs.Status}" 
                        id="CaseStatusDOM" />  
                        <apex:facet name="header">Status</apex:facet>
                </apex:column>
                <apex:inlineEditSupport event="ondblClick" 
                        showOnEdit="saveButton,cancelButton" hideOnEdit="editButton" /> 
            </apex:pageBlockTable> 
            <apex:pageBlockButtons > 
                <apex:commandButton value="Edit" action="{!save}" id="editButton" />
                <apex:commandButton value="Save" action="{!save}" id="saveButton" />
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton" />
            </apex:pageBlockButtons> 
        </apex:pageBlock> 
    </apex:form>
</apex:page>

Please mark it as best answer if it resolved your problem.

Thank You,
Sohel Mohd
This was selected as the best answer
Sushmita Sikha 7Sushmita Sikha 7
Hi Sohel
Thanks for the help. I found out that there was some script written in my code which was not allowing inline editing to work.
 
SFDC GuestSFDC Guest
Hi Sushmita,

Please mark it as best answer so that others will get benefit from this.
Thank You.