2 Replies Latest reply on Oct 27, 2009 3:49 PM by BC Holmes

    rich:editor and necessary JavaScript

    BC Holmes Newbie

      Hi,

      I've just recently upgraded my app to make use of the latest version (3.3.2 SR1) of RichFaces so that I could make use of the rich:editor. I really like the rich:editor, and think it's great, but it's unfortunately not working in my environment. I think I know why, but I'm hoping for some suggestions about how to make this work.

      The pages in my app use a paradigm where if you look up a business record, the information appears in "boxes" (really, rich:panels). For example, if you look up a person, one box might contain demographic data (name, birthdate, etc.), another might contain contact information (addresses, phone numbers), and so forth. Each box has an "edit" option, and when the user clicks "edit", the area inside of the box gets replaced with an editable version of that section. (I use a4j:include and the "wizard-like" approach to accomplish this).

      Here's my problem (or, at least, I think it's my problem): when go into "edit-mode" on an area that includes a rich:editor, the rich editor needs access to some standard JavaScript resources (such as, for example, tiny_mce/tiny_mce_src.js.jsf). But because I'm not re-rendering the entire page (only one section), those additional resources aren't automagically added to my page. How should I go about fixing this? Do I manually add those JavaScript resources to my page header? Or is there a better way?