You need to sign in to do that
Don't have an account?
Inline editing in visualforce page
Hi All,
I am trying to achieve inline editing feature for a requirement.
I have a sample code as below :
<apex:page standardController="Contact">
<apex:form >
<apex:pageBlock mode="inlineEdit">
<apex:pageBlockButtons >
<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:pageBlockButtons>
<apex:pageBlockSection >
<apex:outputField value="{!contact.lastname}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!contact.accountId}"/>
<apex:outputField value="{!contact.phone}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
The only thing that i have a problem is that in order to change a contact i have to append the url everytime with a contact id.
That works only in case of one record.
I have a visual force page, which displays a lot of contact records in a pageblocksection. How would i pass the id for the record i am editing and saving to this, as i would have many records.
I do not want to implement "REPEAT TAG" in my code.
Could you please help me out with this requirement
Thanks,
Dave.
Try this example,
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.