You need to sign in to do that
Don't have an account?
prachi barahate
inlineeditsupport with pageblocktable and standard list controller
I am writting a simple code in visualforce using standard list controller and inline edit support.Inline edit support is working properly .
But can able to save records.
Following is the code:
<apex:page standardController="Leave__c" recordSetVar="l">
<apex:form >
<apex:pageBlock title="Display leaves records">
<apex:pageBlockTable value="{!l}" var="e">
<apex:column value="{!e.Employee__r.First_Name__c}"/>
<apex:column value="{!e.From_Date__c}"/>
<apex:column value="{!e.Leave_Type__c}"/>
<apex:column value="{!e.To_Date__c}"/>
<apex:column value="{!e.Number_of_days__c}"/>
<apex:inlineEditSupport />
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton value="Previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="first" action="{!first}"/>
<apex:commandButton value="last" action="{!last}"/> <br/>
<apex:commandButton value="save" action="{!quickSave}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
M I missing something in this code.
Also when InlineditSupport is placed between column tags for every feild .Save is wroking fine.
But my confusion is why my above code is not working as i saw such type of codes working in many online tutorials examples.
But can able to save records.
Following is the code:
<apex:page standardController="Leave__c" recordSetVar="l">
<apex:form >
<apex:pageBlock title="Display leaves records">
<apex:pageBlockTable value="{!l}" var="e">
<apex:column value="{!e.Employee__r.First_Name__c}"/>
<apex:column value="{!e.From_Date__c}"/>
<apex:column value="{!e.Leave_Type__c}"/>
<apex:column value="{!e.To_Date__c}"/>
<apex:column value="{!e.Number_of_days__c}"/>
<apex:inlineEditSupport />
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton value="Previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
<apex:commandButton value="first" action="{!first}"/>
<apex:commandButton value="last" action="{!last}"/> <br/>
<apex:commandButton value="save" action="{!quickSave}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
M I missing something in this code.
Also when InlineditSupport is placed between column tags for every feild .Save is wroking fine.
But my confusion is why my above code is not working as i saw such type of codes working in many online tutorials examples.
Showonedit" Please refer the code Below.
I hope it will be helpful
Best Regards
RahulKumar
All Answers
I think you Have missed out resetFunction="resetInlineEdit" in the following code.
Please check the below link which is earlier posted in success community for similar kind of issue.
http://success.salesforce.com/issues_view?id=a1p30000000Su1mAAC
I hope this could help you, please mark it as solved.
One more thing ..is resetInlineEdit is a javascript function i have to write or is it a default function available.
sorry for asking very basic question.
Showonedit" Please refer the code Below.
I hope it will be helpful
Best Regards
RahulKumar