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
Anand_agrawal@persistent.co.inAnand_agrawal@persistent.co.in 

Problem on Text Area (Rich) while using it on visual force page.

Hi All,

 

I am facing some problem on new RTF field feature provided on Spring 11 upgrade.

 

So I created a Text Area (Rich) field on one of our custom objects. Lets say object name is cusomtObject__c and field name is RTFTest__c,

 

I tried binding this text area field on the visual force page with input field tag. However whatever I am entering on it, while submitting the form that value doesn't get passed to the server and on the record empty string ("") gets saved as value of RTFTest__c field.

 

Does anyone have any idea why is this happening ?

 

Thanks & Regards,

Anand Agrawal.

Best Answer chosen by Admin (Salesforce Developers) 
Anand_agrawal@persistent.co.inAnand_agrawal@persistent.co.in

I got this working but its a bug,

 

The value of the RTF field gets saved only when if the actionFunction or CommanButton which calls the save function doesn't have values on Re-render and onComplete list.

 

 

I think salesforce should fix this.

All Answers

sfdc guy.ax723sfdc guy.ax723

Anand, can you please post some code so we can see how you are trying to accomplish this?

 

sravusravu

Are you using the stadard Save method or Custom method to save the Record?

Anand_agrawal@persistent.co.inAnand_agrawal@persistent.co.in

Custom save function but the record is getting saved without having any value for rich text area field as I said.

 

If possible would paste the code as well.

Anand_agrawal@persistent.co.inAnand_agrawal@persistent.co.in

I got this working but its a bug,

 

The value of the RTF field gets saved only when if the actionFunction or CommanButton which calls the save function doesn't have values on Re-render and onComplete list.

 

 

I think salesforce should fix this.

This was selected as the best answer
rpsfdcrpsfdc

I faced the same issue. My Save button was defined as:

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

 

When I saved an Edit page (visualforce page) with Rich Text Area (Long) field, it  never got saved. When I removed the status and rerender attribute, the field started saving.My new code is:

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

 

It definitely looks like a bug in Visualforce which Salesforce should look into. Thank you Anand for providing this insight.

 

Ruchir