You need to sign in to do that
Don't have an account?
Potential bug with loading rich edit boxes via Ajax callback
I have a small page with a dynamic ajax outputPanel that gets rerendered on certain user action and it all works good until the newly loaded pageBlock contains rich edit field (rendered with apex : inputField). Then, I get this javascript error and the entire viewport gets blanked. The initial page load does not contain rich edit field (in case it makes a difference, like it did with calendar popups)
Error:
Object doesn't support this property or method
3_3_0.GAorg.ajax4jsf.javascript.AjaxScript, line 173 character 590
By the looks of call stack it appears as if the Ajax caller failed to parse the response from SF and tried to raise an error and then ran into a missing property/method. The error location is pointing to a piece of code containing "finally{window.document.open=oldDocOpen;}" if that makes any difference as well.
OK, I debugged the offending JS code and I managed to reach the actual error.
"Rerender is not currently supported with rich text editing enabled"
Is this what it is, no support for richedit in Ajax? What is the timetable for this feature (please dont tell me to put it up for vox-populis approval on idea exchange, it should be your responsability not to release half baked solutions)
This is the sample code of richtext Editor. When you use rerender attribute with command button it gives an error like 'Rerender is not currently supported with rich text editing enabled' , so you can't use rerender with rich text editor. It will work fine if use the code without rerender. Find below a sample code :
<apex:page controller="cls_richbox">
<apex:form >
<apex:outputPanel id="richrend">
<apex:pageBlock title="RichEditBox">
<apex:pageBlockSection title="RichTextEditor" >
<apex:pageBlockSectionItem >
<apex:inputTextarea value="{!inputValue}" id="theTextarea" richText="true" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!doSave}" reRender="richrend"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:outputPanel>
</apex:form>
</apex:page>
class:
public class cls_richbox
{
public string inputValue{get;set;}
public cls_richbox(){}
public void doSave()
{
system.debug('$$$$$$$$' + inputValue);
Employee__c emp = new Employee__c();
emp.name = 'testdata101';
emp.testrich__c = inputValue;
insert emp;
}
}
Hope this helps.
For Example