Overblog Suivre ce blog
Editer l'article Administration Créer mon blog
7 janvier 2010 4 07 /01 /janvier /2010 15:31


Here is a Forms 11g Pluggable Java Component that allows sending back to the Forms application each key pressed in a Text Item (single or multi-line).

The single-line PJC extends the VTextField class.
The multi-line PJC extends the VTextArea class.

Key Pressed 11g

This PJC can only work with the Forms 11g version. It won't work with any older version like 10g or 9i.

The implementation class of the single-Line Text Item


The implementation class of the multi-Line Text Item


The methods you can call

Set the Java Console logging mode (true/false)


By default, the logging mode is set to false.

-- set the logging on --
Set_Custom_Property( 'BL.TEXTITEM', 1, 'LOG', 'true' ) ;


The event fired by the PJCs


It is constituted by 3 parameters to get the key code, the key char and the key modifier.

To know what text item has just fired the event, ask the :SYSTEM.CURSOR_ITEM variable.


    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    LC$Code   varchar2(25); -- code
    LC$Char   varchar2(25); -- char
    LC$Modif  varchar2(25); -- modifier

   IF (eventName='KEY_PRESSED') THEN
      eventValues := get_parameter_list(:system.custom_item_event_parameters);
      get_parameter_attr(eventValues,'KEY_CODE',eventValueType, LC$Code);
      get_parameter_attr(eventValues,'KEY_CHAR',eventValueType, LC$Char);
      get_parameter_attr(eventValues,'KEY_MODIFIER',eventValueType,  LC$Modif);
      :BL.RESULT := :System.cursor_item || ' Key pressed:'|| LC$Code || ' (' || LC$Char||') '||' modif:'||LC$Modif ;
      Synchronize ;

   END IF; 

The sample dialog

     . Download the KeyPressed.zip file
     . Unzip the file
     . copy the keypressed.jar file in the <ORACLE_HOME>\Middleware\as_1\forms\java directory
     . Edit your formsweb.cfg file to add the keypressed.jar to the archive tag.
     . Open the KEYPRESSED11g.fmb module (Oracle Forms 11g)
     . Compile all and run the module

Partager cet article

Repost 0
Published by Oracle Forms community - dans PJC - Text items
commenter cet article


Julio 15/06/2017 19:16

Hello there,
In getting error: FRM-13008: Cannot find JavaBean with name 'oracle.forms.demos.beans.ColorPicker'.
I'm just trying to create a Forms Application where i could load a Color Picker to change some objects color but i'm unable to do so.
I'm using Oracle Database 11g Enterprise Edition Release - 64bit Production and Oracle Fusion Middleware 11g (11.1.2).
What I did:
In the form module: Created a Bean Area (BEAN_COLORS) with its property: Implementation Class in: oracle.forms.demos.beans.ColorPicker
I copied the file: colorpicker.jar to these folders:
I edited the File: formsweb.cfg, adding: colorpicker.jar to the archive tag like this:
archive=frmall.jar, colorpicker.jar
note: the archive tag was repeated 2 times in the file so I add colorpicker to both of them. I found the formsweb.cfg in three differents locations:
I did the changes in all of them.
I did not do changes to the default.env file but noticed it was in the same three locations already mentioned.
Please help!!!!!!!!
My project is in this google drive link along with the files I’m using:

Oracle Forms community 16/06/2017 08:59

If you have this error only at build time, there is no problem. See if you have it ok at runtime.