Here is a Java Bean that works like a spell checker, based on a project that can be found at: http://sourceforge.net/projects/jazzy/ Works 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
Set_Custom_Property('BL.BEAN',1, 'SET_POSICION','300,150');
Set_Custom_Property('BL.BEAN',1, 'SET_SIZE','400,200');
Set_Custom_Property('BL.BEAN',1, 'SET_DICTIONARY','c:\english.dic');
Set_Custom_Property('BL.BEAN',1, 'SET_TITLE','Spelling');
Set_Custom_Property('BL.BEAN',1, 'SET_BTCHECK','Spell Check');
Set_Custom_Property('BL.BEAN',1, 'SET_BTEXIT','Ok');
Set_Custom_Property('BL.BEAN',1, 'SET_TEXT',:BL.TEXT);
Set_Custom_Property('BL.BEAN',1, 'INIT','');
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 |
