You need to sign in to do that
Don't have an account?

Bug: ActionFunction breaks inlineEdit on apex:detail
Hey all,
I'm wondering if someone knows a workaround for a bug I encountered.
It seems that apex details inlineEdit function breaks when you add an actionFunction to the page.
In this example:
<apex:page standardController="bltn__c" extensions="bulletinController"> <apex:form > <!-- The function that checks the users "awareness status" of the bulletin --> apex:actionFunction action="{!processAwareness}" reRender="none" name="jsProcessAwareness" /> <apex:detail inlineEdit="true" relatedList="true" relatedListHover="true" showChatter="true" subject="{!$CurrentPage.parameters.id}"/> </apex:form> <script> window.onload = jsProcessAwareness(); </script> </apex:page>
public with sharing class bulletinController { public bulletinController(ApexPAges.StandardController controller) { } public void processAwareness() { usrBltn__c[] u = [SELECT id, awareness__c FROM usrBltn__c WHERE bulletin__c = :ApexPages.currentPage().getParameters().get('id') AND user__c = :userInfo.getUserId() AND awareness__c = 'Informed' LIMIT 1]; if (!u.isEmpty()) { u[0].awareness__c = 'Viewed'; update u; } } }
I cannot inline edit the detail record.
I CAN when I remove the action function from the page.
I need a workaround please.
Thanks,
JNH
It may be that you have inadvertently taken out an onload handler function that the inline editing relies on.
Rather than specifying the onload handler as jsProcessAwareness(), try adding this to the existing handlers, using something like the following:
All Answers
It may be that you have inadvertently taken out an onload handler function that the inline editing relies on.
Rather than specifying the onload handler as jsProcessAwareness(), try adding this to the existing handlers, using something like the following:
There is some error in VF code so that code is not working fine.
<apex:page standardController="bltn__c" extensions="bulletinController">
<apex:form >
<!-- The function that checks the users "awareness status" of the bulletin -->
<apex:actionFunction action="{!processAwareness}" reRender="none" />
// Error in this line You did not give proper syntax actionfunction.
<apex:detail inlineEdit="true" relatedList="true" relatedListHover="true" showChatter="true" subject="
{!$CurrentPage.parameters.id}"/>
</apex:form>
<script>
window.onload = jsProcessAwareness();
</script>
</apex:page>
That did it Bob!
Thanks.