RICH TEXT FIELDS AND RERENDER ATTRIBUTE | Techila
1965
single,single-post,postid-1965,single-format-standard,ajax_updown_fade,page_not_loaded,,qode_grid_1300,footer_responsive_adv,hide_top_bar_on_mobile_header,qode-content-sidebar-responsive,qode-theme-ver-9.4.2,bridge,wpb-js-composer js-comp-ver-4.12,vc_responsive
 

RICH TEXT FIELDS AND RERENDER ATTRIBUTE

RICH TEXT FIELDS AND RERENDER ATTRIBUTE

RICH TEXT FIELDS AND RERENDER ATTRIBUTE

You might know that there is a field type called “Rich Text Field”. This field allows you to format the text that you enter, add a URL, Insert pictures etc. It looks mostly like a big textbox with an editing toolbar at the top of the textbox. This is how a rich text field looks like.

Rich text box

The number of visible lines (the value that you specify while creating the field or editing it at Setup -> Object -> Field) controls the height of this field in a Visualforce Page. You may also use the style attribute to define your own height.

Rerender

Rich Text fields do not work with rerender. So, if you say that you have a button “Add another box”, and clicking on this would rerender the panel and add one more rich text field, then this won’t work. You will have to remove the “rerender” attribute and it works.

You should not have the “immediate=true” attribute as well on the commandbutton. This causes the value of the existing rich text fields to be lost.

So, if you have a button in a page which adds more “Rich Text Fields” or does some other rerendering, remove all the rerenderings and do a full page refresh. If you still face issues, remove the “immediate=true” attribute and try again.

Courtesy:  http://www.forcetree.com/2011/01/rich-text-fields-and-rerender.html

https://forums.zoho.com/viewImage.do?fileId=2266000001351107&forumGroupId=2266000000002001

“Know more about Salesforce Consulting at Techila”

Author: techila

No Comments

Post A Comment