Overblog
Suivre ce blog
Editer l'article Administration Créer mon blog
9 février 2006 4 09 /02 /février /2006 10:10

Purpose

This is a Javabean component that allows to intercept each key typed in a text field


Key Typed

Then, there is no need to use a Forms timer to intercept each key typed.

The java code


      Get the Java code here


Forms configuration

  • . Copy the keytyped.jar file in the /forms/java directory
  • . Edit the /forms/server/formsweb.cfg file to add the jar file to the archive_jini variable

archive_jini=
f90all_jinit.jar,……,keytyped.jar

 
Implementation Class property

    oracle.forms.fd.KeyTyped



Properties that can be set

The text of the item

set_custom_property( 'BLOCK.BEAN_ITEM', 1, 'SETTEXT', 'the_text');


The position of the cursor


set_custom_property( 'BLOCK.BEAN_ITEM', 1, 'SETPOS', 'n');


The colors of the item


set_custom_property( 'BLOCK.BEAN_ITEM', 1, 'SETBG', 'rgb value');
set_custom_property( 'BLOCK.BEAN_ITEM', 1, 'SETFG', 'rgb value');

e.g.
set_custom_property( 'BLOCK.BEAN_ITEM', 1, 'SETBG', '200,10,0');


Properties that can be read

The text of the item

get_custom_property( 'BLOCK.BEAN_ITEM', 1, 'GETTEXT', '');


The last character typed


get_custom_property( 'BLOCK.BEAN_ITEM', 1, 'GETCHAR', '');



The keyboard state modifier

get_custom_property( 'BLOCK.BEAN_ITEM', 1, 'GETMODIFIER', '');




Events that can be raised by the bean

A character was typed

KEYTYPED


The sample dialog

  • . Download the KeyTyped.zip file
  • . Unzip the KeyTyped.zip file
  • . Copy the keytyped.jar file in your /forms/java/ directory
  • . Edit your /forms/server/formsweb.cfg file
  • . Open the KEYTYPED.fmb module (Oracle Forms 9.0.2)
  • . Compile all and run the module

     



Partager cet article

Published by Oracle Forms community - dans Bean - Text items
commenter cet article

commentaires