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
lnryanlnryan 

Inline editing for Account list and Account's Contact list

I'm trying to create a single page or two page wizard (without a custom controller) that will provide inline editing for both accounts and the account's contacts but it seems i cannot add inline editing support tag to the data table containing the account's contacts. Can anyone confirm whether or not the inline editing support is limited to the controlling object or to a single dataset?

Thanks.

forecast_is_cloudyforecast_is_cloudy

Can you please post your VF page?

lnryanlnryan

I'm actually just asking what the technical limitations of the inline edit functionality are....so that I can decide whether it's worth the time to code something.

 

Can anyone confirm whether it will work for nested lists? Also, the sample code from the documentation contained id attributes with names like 'AccountNameDOM' are these required for the inline edit support to function and if so, what is the format required for custom fields and non-account fields.

lnryanlnryan

For Instance, here is a page that I would like to use to enable inline editing support of the selected Account's Contact list, but it does not work. I tried both having inline support at the table level and at the outputfield level

 

<apex:page standardController="Account" recordSetVar="accounts" extensions="AccountContacts_Controller">
<apex:form >
    <apex:pageBlock title="Accounts">
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                </apex:selectList>
                <apex:pageBlockTable id="list" value="{!accounts}" var="a">
                    <apex:column value="{!a.Name}"/>
                    <apex:column >
                        <apex:facet name="header">View Contacts</apex:facet>
                        <apex:commandButton reRender="acctContacts" >
                            <apex:param name="aid" value="{!a.id}"/>
                            <apex:param name="aName" value="{!a.Name}"/>
                        </apex:commandButton>
                    </apex:column>
                </apex:pageBlockTable>
            </apex:pageBlock>
            <apex:pageBlock id="acctContacts" title="Contacts for {!$CurrentPage.parameters.aName}">            
                <apex:pageBlockTable value="{!contacts}" var="c">
                    <apex:column >
                        <apex:outputField value="{!c.FirstName}" id="ContactFirstNameDOM">
                            <apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton" hideOnEdit="editButton"/>
                        </apex:outputField>
                    </apex:column>
                </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>