Suivre ce blog
Editer l'article Administration Créer mon blog
10 mai 2007 4 10 /05 /mai /2007 17:08


Here is a PJC that allows doing some basic operations on a Text Item.
You can apply styles on the selected sub-text and also view the HTML result in a browser window.
It is a "light" component that does not render the HTML result itself, but has the benefit to stay a simple PJC (no Java Bean).

     Basic embeded text

A popup menu is attached to both single and multi-line Text Items.
Select a part of the text, then right-click to display the popup menu.

The Java code

     EmbededTextField.java     EmbededTextArea.java

The implementation class of the

     oracle.forms.fd.EmbedeTextField  for a single-line Text Item

     oracle.forms.fd.EmbedeTextArea  for a multi-line Text Item

The methods you can set

  • . Set the case

Set_Custom_Property( 'BL.BEAN', 1, 'CASE', 'case' ) ;

Where case can b:

    • - UPPER
    • - LOWER


  • . Set the style

Set_Custom_Property( 'BL.BEAN', 1, 'STYLE', 'style' ) ;

Where style can b:

    • - BOLD
    • - ITALIC


The methods you can call


  • Get the cursor location in the Text Item

char := Get_Custom_Property( 'BL.BEAN', 1, 'GET_CARET_POSITION' ) ;

The first position is zero (0).


  • Get the selection range

char := Get_Custom_Property( 'BL.BEAN', 1, 'GET_RANGE_SELECTION' ) ;

that returns a comma delimited string : start_position,end_position

The first position is zero (0).

The sample dialog

     . Download the embededtext.zip file

     . Unzip the file
     . copy the embededtext.jar file in the <ORACLE_HOME>/forms/java directory

     . Edit your /forms/server/formsweb.cfg file to add this jar file
     . Open the embedtext.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

Partager cet article

Published by Oracle Forms community - dans Bean - general
commenter cet article