Search code examples
editorjavabeansjdeveloperjspx

Pass rich text editor value to bean


I'm using Jdevloper 11g R2 and I have a .JSPX page that contains an ADF Rich Text Editor.

This editor can contain text and Images and different styles.

how can i pass the value of this editor to my bean? my goal is to take this value and send it as a body in my email.

but how it can be stored? should it be saved as a string eventhough the editor have images?

any help is really appreciated

Thank you


Solution

  • You can create binding for the RichTextEditor which will be of type oracle.adf.view.rich.component.rich.input.RichTextEditor

    as private RichTextEditor myEditor;

    Write setter and getter methods for the component in your bean as below

    public void setMyEditor(RichTextEditor myEditor) {
        this.myEditor= myEditor;
    }
    
    public RichTextEditor getMyEditor() {
        return myEditor;
    }
    

    Now you may access the value entered in the component with the getter method and use it as you wish.