Dispatching Information

Please see the following note for a full description:
398912.1 - How To Dispatch Events From JavaBeans and PJC Items

This is a sample form that shows the workaround to dispatch CustomEvents to forms from real javabeans & PJC items

        

Modules In This Demo

The dispatching Demo consists of the following files

1. tomsdemos.jar - contains all Beans and Pjcs (signed file)
2. DISPATCHING.fmb - Sample Form
3. tomsdemos_unsigned.jar - contains all Beans and Pjcs (unsigned file)

Reusing the code

Setting up Forms Services

1. In order for an application to be able to use the DispatchingBeans, the relevant configuration in the formsweb.cfg file has to ensure that the supplied tomsdemos.jar is included in the relevant archive setting.

An entry in the formsweb.cfg file for an application that used the FormattingBeans would look like this:

[formatterDemo]
pageTitle=OracleAS Forms Services - Client Info Demo
IE=jinitiator
baseHTMLJInitiator=demobasejini.html
archive_jini=f90all_jinit.jar,tomsdemos.jar
form=DISPATCHING.fmx
width=675
height=480
separateFrame=false
splashScreen=no
lookAndFeel=oracle
colorScheme=blue
background=/formsdemo/images/blue.gif

2. The DISPATCHING.fmx needs to be in a directory available in FORMS_PATH
3. The tomsdemos.jar needs to be signed and placed in the $ORACLE_HOME/forms/java directory

4. A Bean Area handled by the FBean package must register the following class:
fbean.register_Bean('BEANS.DISPATCHINGFBEAN',1,'tom.oracle.demos.dispatch.DispatchingFBean');
5. The Implementation Class property for a hidden Bean Area must be:
tom.oracle.demos.dispatch.DispatchingBean

6. The Implementation Class property for a VBean must be:
tom.oracle.demos.dispatch.DispatchingVBean
7. The Implementation Class property for a PJC must be:
tom.oracle.demos.dispatch.DispatchingPJC

8. Search for all the bean areas of the current module:
Set_Custom_Property('BEANS.DISPATCHINGBEAN',1,'FINDCOMPS','dummyme');

9. Handle the bean events inside the form's module in a When-Custom-Item-Event trigger:
Declare
  BeanValListHdl ParamList;
  paramType      Number;
  EventName      VarChar2(20);
  outputparam    varchar2(255);
Begin
  BeanValListHdl := get_parameter_list(:system.Custom_Item_Event_Parameters);
  EventName      := :SYSTEM.Custom_Item_Event;
  If (EventName = 'MYEVENT') then
    get_parameter_attr(BeanValListHdl,'MYVALUE',ParamType, outputparam);
    message ('Event value: ' || outputparam, no_acknowledge);
  End if;
End;

10. Get the zip file here