Mercredi 1 juillet 2009
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.

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Jeudi 26 février 2009
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

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 1 commentaires - Recommander
Jeudi 26 février 2009
Hafed Benteftifa has just released his FRITE - Forms Rich Text Editor - alowing the Oracle Forms application to edit HTML content.

Frite
This is just the kind of Java Bean, developers and end-users were waiting for years !
Don't waste any more time, run and get it !
Par Oracle Forms community - Publié dans : Bean - Text items
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Jeudi 29 janvier 2009

To mark the third anniversary of the forms-pjc-bean site, I am pleased to launch a Forms Java Bean contest.

To take part, all you need to do is to show a developed Forms application that contains an interesting, innovative, or just plain "cool" use of a Java Bean or PJC.

You do not need to have created the Java Bean, but if you are not the creator, you have to use it in an original, innovative and exciting way.

The winner will be chosen by two principal product managers from the Oracle Forms team: Grant Ronald and Jan Carlin.

It is just for fun, so there is no prize, except your entry getting pride of place on OTN and the eternal admiration of your peers! ;o)

Send your entries in a zip file containing a screenshot or a flash video(*) and/or everything needed to install and run the application to the following address: forms.pjc.bean@free.fr  by the end of February.

  19 contributions sent 

Lionel Lasserre: Planning Bean
P
eter Valencic: Scanner Bean - Scanner Bean 2 - Scanner Bean 3 and a game!
Grant Ronald: Google Maps Bean
Vijaynath Nair: Autocad Integration Bean
Mark Striekwold: JFreeChart Integration and Chat Bean and PDF Viewer Bean
Andreas Weiden: Shuttle Bean and TreeTable-component Bean
Francois Degrelle: Carousel Bean and Wall-Brick Bean
Hafed Benteftifa: FRITE (Forms Rich Text HTML Editor)
Stephane Vinette Image handler Java Bean
Tobias Björnsson Forms wrapper for Oracle Data Visualization Components and Interacting with Forms from other systems
Md. Mehbub Islam Scanner Bean part 1 and Scanner Bean part 2
Oleg Tishchenko Generic Chart Builder


And the winner is Md. Mehbub Islam with his Scanner Bean



(*)Here is a link to a free online screen recorder : http://www.screentoaster.com/
Par Oracle Forms community - Publié dans : General
Ecrire un commentaire - Voir les 3 commentaires - Recommander
Vendredi 2 janvier 2009
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.
Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Mardi 30 décembre 2008
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://jdic.dev.java.net/documentation/incubator/JDICplus/index.html


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 EHTMLBROWSER.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.

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Mercredi 24 décembre 2008

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:\,*.java');



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
Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 1 commentaires - Recommander
Jeudi 16 octobre 2008
Purpose

Here is a Pluggable Java Component that allows to manage a FTP connection.

It is based on the Calvin Tai ftpbean.

simpleFTP bean


The Java source

     SimpleFTP.java



The implementation class of the Bean Area

     oracle.forms.fd.SimpleFTP


The methods you can set

  • managing connection

-- connect the FTP host --
Set_Custom_Property('BL.BEAN', 1, 'CONNECT', 'host_name,user[,password]' );

-- set the port number (if <> 21)
Set_Custom_Property('BL.BEAN', 1, 'SET_PORT', 'port_number' );

-- set the socket timeout number --
Set_Custom_Property('BL.BEAN', 1, 'SET_SOCKET_TIMEOUT', 'number' );

-- set the passive mode (default true) --
Set_Custom_Property('BL.BEAN', 1, 'SET_PASSIVE_MODE_TRANSFER, 'true|false');'

-- close the connection --
Set_Custom_Property('BL.BEAN', 1, 'CLOSE', '' );


  • managing content

-- change host directory --
Set_Custom_Property('BL.BEAN', 1, 'SET_DIRECTORY', 'remote_directory' );

-- get the host directory list --
Set_Custom_Property('BL.BEAN', 1, 'DIRECTORY_LIST', 'remote_directory' );

-- get a binary file --
Set_Custom_Property('BL.BEAN', 1, 'GET_BINARY_FILE', 'remote_filename,local_filename[,remote_file_size][,...]' );

You can provide multiple pairs of remote/local/file_size:
Set_Custom_Property('BL.BEAN',1,'GET_BINARY_FILE','file1.jpg,d:\file1.jpg,0,file2.jpg,d:\file2.jpg,0');

If the remote_file_size is not provided, the progress bar will not display the exact values.

-- get an ascii file --
Set_Custom_Property('BL.BEAN', 1, 'GET_ACSII_FILE', 'remote_filename,local_filename[,remote_file_size]' );

If the remote_file_size is not provided, the progress bar will not display the exact values.

-- put a binary file --
Set_Custom_Property('BL.BEAN', 1, 'PUT_BINARY_FILE', 'locale_filename,remote_filename[,...]' );

You can provide multiple pairs of remote/local/file_size:

Set_Custom_Property('BL.BEAN',1,'PUT_BINARY_FILE','d:\file1.jpg,file1.jpg,d:\file2.jpg,file2.jpg');


-- change to the parent host directory --
Set_Custom_Property('BL.BEAN', 1, 'TO_PARENT_DIR', '' );

-- create a host directory --
Set_Custom_Property('BL.BEAN', 1, 'MAKE_DIRECTORY', 'remote_directory' );

-- remove a host directory --
Set_Custom_Property('BL.BEAN', 1, 'REMOVE_DIRECTORY', 'remote_directory' );

-- delete a remote file --
Set_Custom_Property('BL.BEAN', 1, 'FILE_DELETE', 'remote_filename' );     

-- rename a remote file --
Set_Custom_Property('BL.BEAN', 1, 'FILE_RENAME', 'remote_filename' );

-- execute a command --
Set_Custom_Property('BL.BEAN', 1, 'EXECUTE', 'command' );


  • progress bar

To not just making the wrapper around the great Calvin work, I have added a nice progress bar you can display while transfering files.
The progress bar can be as simple as possible to include it in your existing design, but it can also have a titled border.
All the dimensions must be given in pixel.

-- display/hide the file transfer progress bar --
Set_Custom_Property('BL.BEAN', 1, 'SET_PROGRESS_BAR, 'true|false');'

-- set the progress bar location --
Set_Custom_Property('BL.BEAN', 1, 'SET_PROGRESS_BAR_LOCATION', 'X_POS,Y_POS' );

The coordinates are pixel based, and relative to the upper-left corner of the canvas.
If it is not provided or equals to -1,-1  the progress bar is centered to the canvas.

-- set the progress bar size --
Set_Custom_Property('BL.BEAN', 1, 'SET_PROGRESS_BAR_SIZE', 'width,height' );

If it is not provided, the default values are : 200,16

-- set the progress bar title --
Set_Custom_Property('BL.BEAN', 1, 'SET_PROGRESS_BAR_TITLE', 'title' );

If it is not provided, the progress bar is displayed without any titled border

-- switch on/off the Java console loggin --
Set_Custom_Property('BL.BEAN', 1, 'SET_LOG', 'true|false');


The methods you can get

-- get the message corresponding to the last FTP order --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_MESSAGE');

Generally used after every FTP order to check the execution status.
Returns "OK" if the command succeeded, else returns the error message.

-- get the file list --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_FILE_LIST');

Returns a delimited string of all records founds. The fields are separated by a CHR(9), and the records are separated by a CHR(10).

The record is composed by the following:
 - File type (DIR | FILE | LINK | OTHER)
 - File name
 - File size
 - File date

-- get the FTP reply string --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_REPLY');

It is composed by the FTP code and the FTP message.

-- get the FTP port number --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_PORT');

-- get the FTP socket timeout value --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_SOCKET_TIMEOUT');

-- get the host server name --
var := Get_Custom_Property('BL.BEAN', 1, 'GET_SERVER_NAME');


The events raised by the bean

PROGRESS_MESSAGE
Is raised by the bean by the progress bar

PROGRESS_VALUE
is the current progress bar value

-- example of When-Custom-Item-Event trigger --
DECLARE
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    LC$Value  varchar2(1000);
BEGIN
   IF (eventName='PROGRESS_MESSAGE') THEN
      eventValues := get_parameter_list(:system.custom_item_event_parameters);
      get_parameter_attr(eventValues,'PROGRESS_VALUE',eventValueType, LC$Value);  
      -- display the current transfert percentage --
      :BL.PROGRESS := LC$Value || '%' ;
      Synchronize;
   END IF;
END;



The sample dialog


     . Download the simpleFTP.zip file
     . Unzip the file
     . copy the ftpbean.jar and simpleFTP.jar files in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file
     archive_jini=f90all_jinit.jar,ftpbean.jar,simpleFTP.jar
     archive=f90all.jar,ftpbean.jar,simpleFTP.jar

     . Open the simpleFTP.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

In the sample dialog, when you are connected to the FTP server, double-clicking one line of the file content table-block will open and display the new folder if the file type is DIR, or download the underlying file on the c:/ folder if the file type is FILE.


The two JAR files have to be signed.
Those, shipped with the zip file are already signed.


Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Mardi 13 mai 2008

Purpose

This PJC is a workaround to the issue defined in the bug 3867157 on Metalink.

It allows having the same behaviour on the Web that the one it has on the C/S version. The When-List-Changed trigger would fire only when the mouse is clicked or when the Enter key is pressed, but not when the end-user types a letter to filter the list.

It is a PJC so that you do not need any Bean Area. Just fill the Implementation Class of your existing List Item.



The Java code

     PopList.java



The implementation class of the List Item

     oracle.forms.fd.PopList


The methods you can set



SET_CASE_SENSITIVE

By default, the poplist is case sensitive, but you can set it not sensitive.

Set_Custom_Property( 'BL.BT', 1, 'SET_CASE_SENSITIVE','false');

 

 

  SET_LOG

Set_Custom_Property( 'BL.BT', 1, 'SET_LOG','true');




The sample dialog


     . Download the poplist.zip file
     . Unzip the file
     . copy the poplist.jar file in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file to add the poplist.jar to both archive and archive_jini tags.
     . Open the poplist.fmb module (Oracle Forms 9.0.2) the first List-Item uses the PJC, so that you can compare with the second that is a standard List-Item.
     . Compile all and run the module

Par Oracle Forms community - Publié dans : PJC - Text items
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Vendredi 15 février 2008

Purpose

Here is a Pluggable Java Component that allows to have non rectangular buttons.

Because it uses the Gradient features, it needs, at least the Sun java plugin 1.4
It won't run against JInitiator

You can have shapes described by polygon coordinate pairs, and also button made by a single letter, a word or even, by a complete sentence.


Amazing Button



The Java code

     amazingbutton.java



The implementation class of the Push Button Item

     oracle.forms.fd.AmazingButton


The methods you can set

Because it is a PJC that extends VButton, you can use the standard Set_Item_Property() built-in to set the standard button's properties.



Draw a circle button - SET_CIRCLE

Set_Custom_Property( 'BL.BT', 1, 'SET_CIRCLE','');

 

Draw a losange button - SET_LOSANGE

Set_Custom_Property( 'BL.BT', 1, 'SET_LOSANGE','');


 

Draw a polygon button - SET_POLYGON

Set_Custom_Property( 'BL.BT', 1, 'SET_POLYGON','x,y[,x,y[,...]]');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_POLYGON','24,0,47,34,47,58,38,58,24,37,10,58,1,58,0,33,24,1');

 

Draw a text button - SET_TEXT

Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT','text[,font_name[,font_weight[,font_size]]]');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT','The text,Tahoma,B,45');

 

 

Set the text shadow color - SET_SHADOW_COLOR

Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_SHADOW','rgb_color');

default color is grey (r160g160b160)

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_SHADOW','r129g25b222');

 

 

Set the text shadow shift - SET_SHADOW_SHIFT

Set_Custom_Property( 'BL.BT', 1, 'SET_SHADOW_SHIFT','x_shift,y_shift');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_SHADOW','-5,-4');


When no given x=4 and y=3.

If you want to hide the shadow, provide 0,0

 

  

Set the text position - SET_TEXT_POSITION

Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_POSITION','left | center | right');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_POSITION','left');

 

  

Set the text x,y position - SET_TEXT_AT

Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_AT','x_pos,y_pos');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_AT','10,10');

 

 

 

Set the gradient colors - SET_GRADIENT

Set_Custom_Property( 'BL.BT', 1, 'SET_GRADIENT','rgb_color,rgb_color');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_GRADIENT','r230g154b117,r230g78b0');


 

Set the border color - SET_BORDER_COLOR

Set_Custom_Property( 'BL.BT', 1, 'SET_BORDER_COLOR','rgb_color');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_BORDER_COLOR','r225g50b30');


 

Set the rotation angle - SET_ROTATION

Set_Custom_Property( 'BL.BT', 1, 'SET_ROTATION','angle');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_ROTATION','90');


 

Scale the shape to fit the button's size - SCALE

Set_Custom_Property( 'BL.BT', 1, 'SCALE','true | false');

If not used, the shape is scaled by default.

e.g.
-- don't scale the shape --
Set_Custom_Property( 'BL.BT', 1, 'SCALE','false');


 

Draw the button's bounding box - DRAW_BORDER

Set_Custom_Property( 'BL.BT', 1, 'DRAW_BORDER','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'DRAW_BORDER','true');


 

Draw all buttons' bounding boxes - DRAW_BORDER_ALL

Set_Custom_Property( 'BL.BT', 1, 'DRAW_BORDER_ALL','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'DRAW_BORDER_ALL','true');


 

 

Draw the shape's bounding box - DRAW_CLIP_BORDER

Set_Custom_Property( 'BL.BT', 1, 'DRAW_CLIP_BORDER','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'DRAW_CLIP_BORDER','true');


 

Draw all shapes' bounding boxes - DRAW_CLIP_BORDER_ALL

Set_Custom_Property( 'BL.BT', 1, 'DRAW_CLIP_BORDER_ALL','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'DRAW_CLIP_BORDER_ALL','true');



 

Set a bevel background - SET_RELIEF

Set_Custom_Property( 'BL.BT', 1, 'SET_RELIEF','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_RELIEF','true');



 

Set a bevel background on every button - SET_RELIEF_ALL

Set_Custom_Property( 'BL.BT', 1, 'SET_RELIEF_ALL','true | false');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_RELIEF_ALL','true');



 

 

Set the Text button shadow thickness - SET_TEXT_THICKNESS

Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_THICKNESS','horizontal_thickness,vertical_thickness');

e.g.
Set_Custom_Property( 'BL.BT', 1, 'SET_TEXT_THICKNESS','6,6');




The sample dialog


     . Download the amazingbutton.zip file
     . Unzip the file
     . copy the amazingbutton.jar file in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file to add the amazingbutton.jar .
     . Open the amazingbutton.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

 

Par Oracle Forms community - Publié dans : PJC - Buttons
Ecrire un commentaire - Voir les 0 commentaires - Recommander
Créer un blog sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur - Signaler un abus