Rich Text Editor example
This example describes how to create an application that displays
inputted text in the Rich Text Editor.
Before beginning this example, create a Faces JSP in a Dynamic Web
Project. Be sure you are viewing the project in the Web perspective.
- Expand the Faces Components drawer in the palette
- Drag Rich Text Area from the palette onto
the JSP file to create the Rich Text Editor.
- Click the Rich Text Editor on the JSP file to select it.
- In the Attributes view, type sessionScope.text in
the Bind to field.
- Drag Input from the palette onto the JSP
file.
- Select the Input control on the JSP file to select it.
- In the Attributes view, type sessionScope.text in
the Bind to field.
- Drag Button - Command from the palette onto
the JSP file.
- Save and run the JSP on a test server.
After the JSP is launched, type text in the Input component. The
entered text displays in the Input component. If you clear the text in the
Rich Text Editor and type in the Input control, the entered text displays
in the Rich Text Editor on submit.