I have a output view page, and i want to insert a edit command button. when user click on edit button it will enable them to type on output field and save. Can anybody tell me how to do that? Thanks
<apex:page standardController="Product_Brief__c" sidebar="true" showHeader="true" extensions="gibco" ><br/>
<apex:form ><br/>
<apex:pageBlock mode="inlineEdit"><br/>
<apex:pageBlockSection collapsible="false" title="Section 1: Custom Media Information (Required)"><br/>
<apex:outputField value="{!Product_Brief__c.Opportunity__r.Account.Name}" Label="Company Name"/><br/>
<apex:outputField value="{!Product_Brief__c.Customer_Number__c}" label="Customer Number"/><br/>
<apex:outputField value="{!Product_Brief__c.Billing_Address__c}" /><br/>
<apex:outputField value="{!Product_Brief__c.CreatedBy.Name}" Label="Contact Name"/><br/>
<apex:outputField value="{!Product_Brief__c.Shipping_Address__c}"/>
</apex:pageBlockSection><br/>
<apex:pageblockButtons ><br/>
<apex:commandButton action="{!save&view}" value="SAVE"/><br/>
<apex:commandButton value="PRINT" onclick="window.print();"/><br/>
<apex:commandButton value="Cancel" action="{!Cancel}"/><br/>
</apex:pageblockButtons><br/>
</apex:form>
apex:inputField/apex:outputField
for every potentially editable fields, conditionally rendered based on whether edit button was clicked or not. The edit button's action tells the controller if clicked