You need to sign in to do that
Don't have an account?
Sonya Dhand 3
Help needed with Inline Editing of a VF page on a custom object?
<apex:page standardController="Employee__c"> <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> <style> body .bPageBlock .pbBody .grey .pbSubheader{ background-color:#c0c0c0; } body .bPageBlock .pbBody .grey .pbSubheader h3{ color:#000; } </style> <apex:outputPanel styleClass="grey" layout="block"> <apex:pageBlockSection title="Worker Licence Details" columns="3"> <apex:pageBlockSectionItem dataStyle="width:0%" labelStyle="width:10%" > <apex:outputLabel >SIA Licence Type</apex:outputLabel> <apex:inputField value="{!Employee__c.SIA_LICENCE__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.Licence_No__c}" style="width:95px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CSCS Card?</apex:outputLabel> <apex:inputField value="{!Employee__c.CSCS_Card__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CSCS #</apex:outputLabel> <apex:inputField value="{!Employee__c.Licence_No__c}" style="width:95px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.CSCS_Expiry_Date__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >CCTV Licence?</apex:outputLabel> <apex:inputField value="{!Employee__c.CCTV_Licence__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.Licence_No__c}" style="width:95px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Driving Licence?</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Licence #</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence_Number__c}" style="width:95px"/> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem dataStyle="width:10%" labelStyle="width:23%" > <apex:outputLabel >Expiry Date</apex:outputLabel> <apex:inputField value="{!Employee__c.Driving_Licence_Expiry__c}" style="width:80px"/> </apex:pageBlockSectionItem> <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton" event="ondblclick" resetFunction="resetInlineEdit"/> </apex:pageBlockSection> </apex:outputPanel> </apex:pageBlock> </apex:form> </apex:page>
All Answers
What kind of help you need?
Thanks,
Kapil
So as I wrote above, the vf page isn't refreshing as expected when data is edited and saved - see the image above?
it should look like this
but looks like this after refreshing....
give a try to do this. Replace your first line with below code.
<apex:page standardController="Employee__c" showHeader="flase" sidebar="false">
Thanks,
Kapil
I replied on that thread as well.
Thanks,
Kapil