Mardi 17 novembre 2009 2 17 11 2009 20:13
Purpose

Here is a PJC that includes a menu in a Text Item.



Text Filed Menu



The implementation class of the PJC

     oracle.forms.fd.ComboMenuPJC


The methods you can call



  • Set the menu

Set_Custom_Property('BLOCK.TEXT_ITEM', 1, 'SET_MENU', 'menu_description');

menu_desription contains the menu definition in a XML format:

Declare
 LC$Menu  Varchar2(32000);
Begin
 LC$Menu := '<main>
    <label>Machines</label>
    <menu>
    <label>Cars</label>
    <smenu><label>Japaneese</label><item>Toyota Prius</item></smenu>
    <smenu><label>Europeen</label><item>Mercedes</item><item>BMW</item><smenu><label>French</label><item>Peugeot 207</item></smenu></smenu>
    </menu>
    <menu>
    <label>Planes</label>
    <smenu><label>Airbus</label><item>A350</item><item>A380</item></smenu>
    <item>Boeing 777</item>
    </menu>
    </main>' ;
    Set_Custom_Property('BLOCK.TEXT_ITEM', 1, 'SET_MENU', LC$Menu);
End;


The content of a complete sub-menu must be written on the same single line between <smenu> and </smenu> tags.

e.g. :
<smenu><label>Japaneese</label><item>Toyota Prius</item></smenu>

Only values included between <item> and </item> tags are real values you can use to populate the Text Item.


 

  • Set the border style
Set_Custom_Property('BLOCK.TEXT_ITEM', 1, 'SET_BORDER', 'border');

  border can be one of the following:

   - line  (défault)
   - raised
   - lowered
   - etched
   - null

 

  • Set the trace to the Java Console

Set_Custom_Property('BLOCK.TEXT_ITEM', 1, 'SET_LOG', 'true');





The sample dialog

     .
Download the combomenupjc.zip file
     .  Unzip the combomenupjc.zip file
     .  Copy the JAR files in your /forms/java/ folder
     .  Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
     . Open the combomenupjc.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



Par Oracle Forms community - Publié dans : PJC - Text items
Ecrire un commentaire - Voir les commentaires - Recommander
Jeudi 29 octobre 2009 4 29 10 2009 17:54
Jesus Vallejo has created a Java Bean to add a Spell Checker in your Forms applications.



Get it from his site.
Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les commentaires - Recommander
Vendredi 4 septembre 2009 5 04 09 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.

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les commentaires - Recommander
Lundi 31 août 2009 1 31 08 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.

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les commentaires - Recommander
Jeudi 30 juillet 2009 4 30 07 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.

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les commentaires - Recommander
Mercredi 1 juillet 2009 3 01 07 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.

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

Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les 1 commentaires - Recommander
Jeudi 26 février 2009 4 26 02 2009 14:11
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 commentaires - Recommander
Jeudi 29 janvier 2009 4 29 01 2009 09:16

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 5 02 01 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.
Par Oracle Forms community - Publié dans : Bean - general
Ecrire un commentaire - Voir les commentaires - Recommander
Créer un blog sur over-blog.com - Contact - C.G.U. - Rémunération en droits d'auteur - Signaler un abus - Articles les plus commentés