1 / 4

JSF Rich Text Area Component

JSF Rich Text Area Component. This Learning Module describes the use of the JSF Rich Text Area component – for allowing users to edit and save “rich text” inside of web pages and forms.  Rich Text Area Component.

Télécharger la présentation

JSF Rich Text Area Component

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for allowing users to edit and save “rich text” inside of web pages and forms.

  2.  Rich Text Area Component  There are quite a few other Enhanced Faces Components to learn about. One of the more interesting is the Rich Text Area, which allows you to put a control on a web page that allows users to create and edit “rich text” text files – that include attributes such as: Color, background color, horizontal rulers, HTML tables, bold, formatting, etc. Let’s create a page that allows us to work with this: • Create a new web page, named: richText.jsp – use a template. • Drag an HTML table into the page. 2 Rows/1 column. Width: 100% • In the top column drag an Enhanced Faces Component: Input – Rich Text Area Respond “Yes” to the question on copying resources to your project • Add a Submit Button below the Rich Text Area • Add an Output component in the 2nd row

  3.  Rich Text Area Component – JSFHandler Variables • The concept with Rich Text Area work is that you bind an EGL string variable to the Rich Text Area component. • The contents of this string will be modified by the users work at run-time, and the string can be saved as a CLOB or just a string (if the content is less than 16,000 bytes). • You can save this string in the database, pass it to another page, or just assign it to another variable. • Let’s experiment, using the simple JSFHandler in the Notes section of the slide: • From Notes copy/paste the JSFHandler – and replace all of your JSFHandler boilerplate code • Press Ctrl/S to save • From Page Data, bind the following EGL variables to the JSF components: • Drag and drop TextIn on top of the Rich Text Area • Drag and drop TextOut on top of the Output component • Set  Render the HTML in the value – property for the output component • Drag and drop moveStrings() on top of the Submit Button

  4. Rich Text Editor – Run on Server • Run the page on the server. • Try the following: • Add: • Bullets • Tables • Lines • Hyper-links • Color the text or its background • Click Submit, and note what the output control looks like, when assigned the value of the string created by the Rich Text Area

More Related