Overblog Suivre ce blog
Administration Créer mon blog
6 décembre 2009 7 06 /12 /décembre /2009 10:24


Click to discover                  Click the image to discover

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
29 octobre 2009 4 29 /10 /octobre /2009 17:54
Jesus Vallejo has created a Java Bean to add a Spell Checker in your Forms applications.



Get it from his site.
Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
4 septembre 2009 5 04 /09 /septembre /2009 10:09
Purpose

This Java Bean is provided by Oleg Tishchenco.

One of the most utilized feature of the Oracle Forms is the LOV. Tough Oracle Forms provide us with plenty of functions and properties to customize LOV's appearance and behavior at runtime we still lack some control on LOV:
  • there is Set_LOV_Column_Property to change column's width and title but there is no any Get_LOV_Column_Property;
  • there is no way to recognize how many columns are there;
  • there is no way to get actual size of the LOV. For some reason Get_LOV_Property( LOV_SIZE ) always returns design time width and height;
This is a JavaBean (java part was done by my coworker Michel Kizhner) that fix these breaches by silently parsing LOV's window structure at runtime and sending the result back to Forms via custom event call. Also to make development easier there is UTL_LOV package that wrap all the details of communication to this JavaBean. With this package you can:
  • get how many columns exists in LOV:
UTL_LOV.Get_LOV_Property( <lov_name>, COLUMN_NAME )
  • get column's width and title:
UTL_LOV.Get_LOV_Column_Property( <lov_name>,<column>, WIDTH )
UTL_LOV.Get_LOV_Column_Property( <lov_name>,<column>, TITLE )
  • get actual size of the LOV:
UTL_LOV.Get_LOV_Property( <lov_name>, LOV_SIZE )
if you need for any reason design time width and height you can get it with
UTL_LOV.Get_LOV_Property( <lov_name>, WINDOW_SIZE )

See UTL_LOV package specification for more details.
 


LOV Java Bean




The implementation class of the Bean Item

     oracle.forms.enhancedLOV

 

 

 


The Java code

 

 

     LOVAddOn.java

 

 

 

 

Properties and events


All properties and events are for internal use only.



The sample dialog

     .
Download the lovaddon.zip file
     . Unzip the lovaddon.zip file
     . Copy the lovaddon.jar file in your /forms/java/ folder

     . Add it to the archive tag of the /forms/server/formsweb.cfg file
     . Open the lovaddon.fmb module (Oracle Forms 10.1.2)
     . Compile all and run the module

     .
Logon as scott/tiger
     .
Navigate to MGR or DEPTNO field and invoke LOV
     .
Dismiss LOV with OK or Cancel then you should see alert described the LOV you just called


For any question concerning this bean, send a mail to Oleg at sch@kled.org.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
31 août 2009 1 31 /08 /août /2009 16:20
Purpose

Here is a Java Bean from Jesus Vallejo that
displays a calculator.
 
It cannot run with the JInitiator and needs the Sun Java plug-in.
 


Time Zones Java Bean




The implementation class of the Bean Item

     oracle.forms.jvr.Calculator

 

 

 


The Java code

 

 

     Calculator.java     CalculatorOperations.java

 

 

 

The methods you can call


  • set the frame title

Set_Custom_Property('BL.BEAN',1, 'SET_TITULO','Calculator');



  • Set the label of the button that returns the value of the calculator

Set_Custom_Property('BL.BEAN',1, 'SET_BOTON','Get Value');

  • Set the frame position (x,y)

Set_Custom_Property('BL.BEAN',1, 'SET_POSICION','300,150');


  • Set the initial value

Set_Custom_Property('BL.BEAN',1, 'SET_VALORINICIAL','');


  • Set the calculator mode (E- Standard / C-Scientific) 

Set_Custom_Property('BL.BEAN',1, 'SET_MODO','');


 


  • Show the calculator

Set_Custom_Property('BL.BEAN',1, 'SHOW','');


 

 

The event sent by the Java Bean


CALCULATOR_EVENT
This event tells Forms that a date has been chosen in the calculator.

You can get it in a WHEN-CUSTOM-ITEM-EVENT event:

DECLARE
   
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    valor     varchar2(256); -- Calculator Value
   
BEGIN
   
   IF (eventName='CALCULATOR_EVENT') THEN
      eventValues := get_parameter_list(:system.custom_item_event_parameters);
      get_parameter_attr(eventValues,'CALCULATOR_VALOR',eventValueType, valor);
      Clear_Message;
      Message('Calculator Value: '|| valor );
      Synchronize ;           
   END IF;  
   
END;



 


The sample dialog

     .
Download the Calculator.zip file
     . Unzip the Calculator.zip file
     . Copy the Calculator.jar file in your /forms/java/ folder

     . Add it to the archive tag of the /forms/server/formsweb.cfg file
     . Open the Calculator.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 is already signed


For any question concerning this bean, send a mail to Jesus at vallejo.jesus@gmail.com.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
30 juillet 2009 4 30 /07 /juillet /2009 16:47
Purpose

Here is a Java Bean from Jesus Vallejo that
returns the date / time of major cities.
 
It run with JInitiator.
 
For get the time zone of any city, you can search on: http://www.timezoneconverter.com/cgi-bin/findzone



Time Zones Java Bean




The implementation class of the Bean Item

     oracle.forms.jvr.TimeZones

 

 

 


The Java code

 

 

     TimeZones.java

 

 

 

The methods you can call


  • set the country in which is the server

FBEAN.INVOKE ('BL.BEAN',1,'setPaisOrigen','ES');



  • Set the zone to get the date / time

FBEAN.INVOKE ('BL.BEAN',1,'setZona','America/Buenos_Aires');

  • Get the date and time

:BL.DATE := FBEAN.INVOKE_CHAR ('BL.BEAN',1,'fechaHora','');



The sample dialog

     .
Download the TimeZones.zip file
     .  Unzip the TimeZones.zip file
     .  Copy the TimeZone.jar file in your /forms/java/ folder

     .  Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
     . Open the TIMEZONES.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


For any question concerning this bean, send a mail to Jesus at vallejo.jesus@gmail.com.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
1 juillet 2009 3 01 /07 /juillet /2009 08:45
Purpose

Here is a Java Bean from Jesus Vallejo that works as a translator,
based on the Google Translater project which can be found at "http://google-api-translate-java.googlecode.com/files/google-api-translate-java-0.53.jar".



Translator Bean




The implementation class of the Bean Item

     oracle.forms.jvr.demo.Translater


The methods you can call



  • Register the bean

fbean.register_bean(hBean, 1, 'oracle.forms.jvr.demo.Translater');

This is the very first operation you have to do.



  • Set the text to translate

fbean.invoke( hBean, 1, 'setText', 'Hello');

  • Set the language from

fbean.invoke (hBean,1,'setOrigen','en');


  • Set the language to

fbean.invoke (hBean,1,'setDestino','es');


  • Get the translated text

 translated_text  := fbean.invoke_char (hBean,1,'traducir','');




The sample dialog

     .
Download the gtranslator.zip file
     .  Unzip the gtranslator.zip file
     .  Copy the JAR files in your /forms/java/ folder

     .  Add them to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
     . Open the Translater.fmb module (Oracle Forms 10.1.2)
     . Compile all and run the module

     The jar files must be signed
     The jar files provided with the .zip file are already signed


For any question concerning this bean, send a mail to Jesus at vallejo.jesus@gmail.com.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
26 février 2009 4 26 /02 /février /2009 14:13
Mark Striekwold has just released a new Java Bean allowing the developer to show a PDF document inside the Forms application.

Get it from here

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
2 janvier 2009 5 02 /01 /janvier /2009 09:42

Purpose


Here is a Java bean from Hafed Benteftifa (Québec - Canada) that allows the Forms module to display static Google maps with HTTP geocoding service.



Get the zip file here, that contains the documentation and all the necessary material, or go to his site to get the information.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
30 décembre 2008 2 30 /12 /décembre /2008 10:25

Purpose

Here is a Java Bean from Mark Striekwold to have an enhanced Web Browser (2nd edition). It is a full Web browser that can handle Javascript. This bean is based on the idea of the Full Web Browser Java Bean and rewritten so it makes use of the fbean package to register the bean and to call the methods of the java bean. It also makes use of a newer version of the jdic.jar which makes it easier to use under windows.

The material comes from the JDICplus project (WIN32 only):
https://java.net/projects/jdic


 

Enhanced Web Browser

It can accept both http url and local machine html file names.

 

It needs, at least, a 1.6 JRE so the Sun Java plug-in, so that it won't run with the JInitiator and earlier version of the Sun Java plug-in.


The Java code

     ehb.java



The implementation class of the Bean Item

     oracle.forms.ms.ehb


The methods you can call

 

  • Register the bean

fbean.register_bean('BL.BEAN', 1, 'oracle.forms.ms.ehb');

This is the very first operation you have to do.

 

 

  • Get the Forms Window

fbean.invoke( 'BL.BEAN', 1, 'infoBean', '');

This must be used to retrieve the Forms window that handles the webBrowser, then synchronize its position when the windows is moved. This must be the first property set (in the When-New-Form-Instance trigger).

 

 

 

  • Set the URL/File

fbean.invoke( 'BL.BEAN', 1, 'setUrl', 'URL');


e.g. :

fbean.invoke( 'BL.BEAN', 1, 'setUrl', 'http://mark-oracle.blogspot.com');        



 

  • Set the border of the bean

fbean.invoke( 'BL.BEAN', 1, 'setBorder', 'false');


When you want to use this bean to display a Flash image (*.swf), you would probably prefer not to have any border bounding the image.
In this case, set the border to false.

 

  • Basic navigation

fbean.invoke( 'BL.BEAN', 1, 'setNavigation', 'back | forward | refresh' ) ;

e.g.:

fbean.invoke( 'BL.BEAN', 1, 'setNavigation', 'back');




The sample dialog

     .
Download the ehb.zip file

     .  Unzip the ehb.zip file
     .  Copy the ehb.jar file in your /forms/java/ folder

     . Download the JDICplus project zip file
     .  Unzip the JDICplus-0.2.2-bin-win32.zip file
     . copy the /lib/JDICplus.jar in your /forms/java/ folder
     . copy the /lib/bin/jdicArc.dll and /lib/bin/jdicWeb.dll in your /windows/system32 folder
     . Update your /forms/server/formsweb.cfg configuration file:
          . archive=frmall.jar,ehb.jar,JDICplus.jar
     . Notice that we update the archive tag and not the archive_jini tag because this bean needs the Sun Java plug-in 1.6 and won't run with any older version, including the Oracle JInitiator

     . Open the EHBROWSER.fmb module (Oracle Forms 10.1.2)
     . Compile all and run the module


     The .jar files must be signed
     The ehb.jar file provided with the .zip file are already signed

 

For any question concerning this bean, send a mail to Mark at mark.striekwold@gmail.com.

Repost 0
Published by Oracle Forms community - dans Bean - general
commenter cet article
24 décembre 2008 3 24 /12 /décembre /2008 14:40

Purpose

This enhanced Java Bean is a "fast" open/save file chooser dialog, based on the AWT system, for those who think that the Swing JFileChooser available is too "slow".

It uses the FBean package.





The Java code

     AWTFileDialog.java



The methods you can set


Register the bean


The Implementation Class is : oracle.forms.fd.AWTFileDialog

FBean.Register_Bean('CTRL.BEAN', 1, 'oracle.forms.fd.AWTFileDialog');

 



Open file dialog box


var := FBean.Invoke_Char('CTRL.BEAN', 1, 'openFile' ,'Open a file...,C:\,*.java');

The last argument is composed by a title, a starting directory and a file filter.
If you want to provide a file type list, separate them with a ; like the following:
var := FBean.Invoke_Char('CTRL.BEAN', 1, 'openFile' ,'Open a file...,C:\,*.jpg;*.jpeg;*.gif');

 


Save file dialog box


var := FBean.Invoke_Char('CTRL.BEAN', 1, 'saveFile' ,'Save file as......,C:\,filename.txt');



set debug ON/OFF


FBean.Invoke('CTRL.BEAN', 1, 'setLog' ,'true | false');






The sample dialog


     . Download the AWTFileDialog.jar file
     . Download the AWTFileDialog.fmb file
     . copy the AWTFileDialog.jar file in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file to add the AWTFileDialog.jar to both archive and archive_jini tags.
     . Open the AWTFileDialog.fmb module
     . Compile all and run the module

See also another File selection bean by Hafed Benteftifa

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