Purpose

Here is a Java Bean with a "breadcrumb" menu type behaviour
.


Conceal Text Field


The Java source

     BreadCrumb.java


The implementation class of the Java Bean

     oracle.forms.fd.BreadCrumb


The methods you can call



  • Set the background color

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_BACKGROUND', '#FFFFFF' );
 

  • Set the Font

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_FONT', 'Verdana,bold,14' );
 
second argument can be plain, bold, italic or bolditalic

 

 

  • Set the menu content

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_CONTENT', LC$Menu_Content );
 
declare
 s varchar2(2000);
begin 
 s := '<style>a.val {color: red}</style>';
 s := s || '<a class="val" href="module1.fmx">option 1</a>';
 s := s || ' >> <a class="val" href="module2.fmx">option 2</a>';
 s := s || ' >> option 3';
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_LOG', 'true');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_BACKGROUND', '#FFFFFF');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_FONT', 'Verdana,bold,15');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_CONTENT', s);
end;

 

 

 

  • Set the log

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

The event raised back to Forms

While the end-user selects an option, the LINK_ACTIVATED event is raised, then the link name is transmitted via the LINK_NAME parameter:

When-Custom-Item-Event trigger:

DECLARE
 
    eventName      varchar2(30) := :system.custom_item_event;
    eventValues    ParamList;
    eventValueType number;
    p1             varchar2(256);
 
BEGIN
 
   eventValues := get_parameter_list(:system.custom_item_event_parameters);
  
   IF (eventName='LINK_ACTIVATED') THEN  
      get_parameter_attr(eventValues,'LINK_NAME',eventValueType, p1);
      :CTRL.OPTION := p1;
      new_form(p1);
   END IF;
 
END;



The sample dialog

     .  Download the breadcrumb.zip file
     .  Unzip the breadcrumb.zip file
     .  Copy the breadcrumb.jar file in your /forms/java/ folder
     .  Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
        e.g.: archive_jini=frmall_jinit.jar,breadcrumb.jar
                archive=frmall.jar,breadcrumb.jar
     . Open the breadcrumb.fmb module (Oracle Forms 10.1.2.0.2)
     . Compile all and run the module