Spelling Checker (English)

Here is a Java Bean that works like a spell checker, based on a project that can be found at: Jazzy - Java Spell Check 

It run with JInitiator.

Attached in Spanish and English dictionaries, but you can create dictionaries in any language. Must be text files with the list of words in that language.




The implementation class of the Bean Item 

    oracle.forms.jvr.spelling.JSpelling


The methods you can call 

  • Posición speller
            Set_Custom_Property('BL.BEAN',1, 'SET_POSICION','300,150');
  • Size speller
            Set_Custom_Property('BL.BEAN',1, 'SET_SIZE','400,200');
  • Dictionary
            Set_Custom_Property('BL.BEAN',1, 'SET_DICTIONARY','c:\english.dic');
  • Title screen
            Set_Custom_Property('BL.BEAN',1, 'SET_TITLE','Spelling');
  • Checking buttom label
            Set_Custom_Property('BL.BEAN',1, 'SET_BTCHECK','Spell Check');
  • Exit buttom label 
            Set_Custom_Property('BL.BEAN',1, 'SET_BTEXIT','Ok');
  • Text to check
            Set_Custom_Property('BL.BEAN',1, 'SET_TEXT',:BL.TEXT);
  • Init speller
            Set_Custom_Property('BL.BEAN',1, 'INIT','');
  • Show speller
            Set_Custom_Property('BL.BEAN',1, 'VIEW','');


The event sent by the Java Bean 

ID_EVENT

This event returns the value of edited text.
You can get it in a WHEN-CUSTOM-ITEM-EVENT event:


DECLARE 
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
        
BEGIN 
    IF eventName= 'ID_EVENT' THEN
        eventValues:=get_parameter_list(:system.custom_item_event_parameters);
        get_parameter_attr(eventValues,'ID_VALUE',eventValueType, :BL.TEXT); 
        Synchronize ; 
    END IF; 
END;



The sample dialog

    . Unzip the JSpelling.zip file 
    . Copy the JSpelling.jar y jazzy-SpellChecker.jar files in your /forms/java/ folder 
    . Add it to the archive tags of the /forms/server/formsweb.cfg file
    . Copy the dictionaries on the path referenced for the property SET_DICTIONARY
    . Open the JSpelling.fmb module (Oracle Forms 10.1.2)
    . Compile all and run the module


The JAR file must be signed

The JAR file provided with the ZIP file are already signed