function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PatcsPatcs 

Need help in Rich Text Box very Urgently....

Hi

 

I have changed the datatype Long Text Area into Rich text.some visualforce page is there based on this field, and that VF page  is not working when i changed Long text area into Rich text, it is throwing an error "Rerender is not supported" , then i have removed the rerender from the command button, but that redender is doing some functionality. is there any other way to achive rerender functionality, I am posting the code also, please take a look at it.

 

<apex:form id="form">
        <apex:outputPanel layout="none" rendered="{!readPermissions}">
            <apex:pageBlock id="pageBlock">
           
                <apex:actionStatus id="AjaxStatus" onstart="DisableButton()" onstop="EnableButton()">
                </apex:actionStatus>
               
                <script>
                   
                    var previousOnload = window.onload;       
                    window.onload = function() {
                        if (previousOnload) {
                            previousOnload();
                        }
                        document.getElementById('divLoading').style.visibility = 'hidden';
                    }
                   
                    function DisableButton() {
                        document.getElementById('divLoading').style.visibility = 'visible';
                        document.getElementById("{!$Component.form.pageBlock.buttons.saveButton}").disabled=true;
                    }
                   
                    function EnableButton() {
                        document.getElementById('{!$Component.form.pageBlock.buttons.saveButton}').disabled=false;
                        document.getElementById('divLoading').style.visibility = 'hidden';
                    }
                   
                </script>
<apex:pageBlockButtons id="buttons" location="top">
                    <apex:commandButton action="{!step3}" value="{!$Label.Previous_Button_Label}" id="previousButton" />
                    <apex:commandButton action="{!save}" value="{!$Label.Save_Button_Label}" id="saveButton" status="AjaxStatus" rerender="form"/>
                    <apex:commandLink action="{!cancel}" value="{!$Label.Cancel_Button_Label}" id="cancelButton" />
                </apex:pageBlockButtons>

and the notes code is

<apex:outputPanel id="notesContainer">
                    <table >
                        <thead>
                            <tr>
                                <th><apex:outputText value="{!$ObjectType.Agreement__c.fields.Notes__c.label}" id="esaNotesLabel"/></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                               <td ><apex:inputTextArea richtext="True" styleClass="tableTextArea" value="{!Agreement__c.Notes__c}" id="esaNotes"/></td>
   
                                </tr>
                        </tbody>
                    </table>
                </apex:outputPanel>

Navatar_DbSupNavatar_DbSup

Hi,


You can create another apex:form tag inside the page and put the apex:inputTextArea inside this form. Make sure you have created the new apex:form outside the previous form. Now you can use the rerendered for the all.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

PatcsPatcs

Hi

 

when i did that, the data present in the notes field is not saved, any other idea....

 

Thanks in Advance

 

khillan bhardwajkhillan bhardwaj
Hi, 

Do not reRender whole form. you need to rendered indivisual components.
like :

<apex:commandButton action="{!save}" value="{!$Label.Save_Button_Label}" id="saveButton" status="AjaxStatus" rerender="esaNotesLabel,"/>

in the reRender do not include richtextArea.

Thanks