Overblog
Editer l'article Suivre ce blog Administration + Créer mon blog
17 novembre 2009 2 17 /11 /novembre /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


Partager cet article
Repost0

commentaires

N
<br /> Bonjour j'ai fait toutes les étapes que vous avez dit (la configuration) mais aucun résultat lorsque j'éxecute la forme<br /> <br /> <br />
Répondre
O
<br /> A l'exécution, affichez la console Java pour voir les erreurs. Comme ça risque d'être long, je vous conseille de continuer sur la messagerie : forms.pjc.bean@free.fr<br /> <br /> <br />
N
<br /> Bonjour,<br /> J'ai mis cet exemple sur ma machine mais le menu n'existe pas <br /> <br /> <br />
Répondre
O
<br /> Qu'avez-vous fait exactement ?<br /> <br /> <br />