The following menu gives you access to a variety of Forms which have extended client capabilities provided by Java. This Java is used as a Pluggable Java Component or Java Bean which can be integrated into the Form by the use of the implementation class property on and item or by using the new FBean package in PL/SQL.
This menu itself uses a PJC which extends a standard Forms button - The "InfoButton" PJC
The InfoButton Pluggable Java Component (PJC) is used in the Demo launch form to provide a simple menu system. The PJC itself is an enhanced version of a normal Forms button. The button can have rounded edges if required to provide compatibility with the Oracle Look and Feel, but it's most important feature is to be able to display text in another field as the mouse moves over the button (rather like a supercharged tooltip).
The text is displayed in another Forms Item, a nominated multi-line text area, as the mouse moves over the button. This all happens in the Forms Java applet without round trips to Forms services on the middle tier.
The InfoButton demo consists of the following files (relative directories shown in brackets):
The doc directory and the classes directory contain the JavaDoc for the code and the compiled class respectively
In order for an application to be able to use the InfoButton PJCs the relevant configuration in the formsweb.cfg file has to ensure that the supplied infobutton.jar (or another jar file containing the compiled InfoButton class) is included in the relevant archive setting.
An entry in the formsweb.cfg file for an application that used the InfoButton PJC would look like this:
[PJCDemo] pageTitle=OracleAS Forms Services - InfoButton Demo IE=jinitiator baseHTMLJInitiator=demobasejini.html archive_jini=frmall_jinit.jar,infobutton.jar form=pjclaunchforms/java width=675 height=480 separateFrame=false splashScreen=no lookAndFeel=oracle colorScheme=blue background=/formsdemo/images/blue.gif
You must first create a normal Forms button, then set the Implementation Class property for this button to oracle.forms.demos.enhancedItems.InfoButton. Note that this property is case sensitive and must be entered exactly as shown.
The enhanced button has the capability to have either or both edges rounded in an Oracle Look and Feel style. To round a button edge, simply prefix or suffix the button label with an opening or closing round bracket. For instance (Press Me) as the label property for the button would result in a button with both edges rounded and the label "Press Me" (the brackets are removed in the final label)
To set up the actual tool-tip functionality up on an InfoButton PJC you need to set two custom properties:
SET_CUSTOM_PROPERTY('MENU.BUTTON1',1,'INFOBUTTON_TEXT','The is the first choice in the Menu');
The first argument to Set_Custom_Property() is the name or id of the PJC enabled item. The second parameter defines the instance of the control that you wish to set the property on. This index number is one based and represents the physical control in the user interface (rather than the record number in the underlying block). You can use the constant ALL_ROWS to set the property on all instances of the PJC for this field. The third argument is the custom property that is being set on the PJC and the forth the value.
SET_CUSTOM_PROPERTY('MENU.BUTTON1',1,'INFOBUTTON_FIELDPOS','100,20');
Property | Get | Set | Valid Values / Return Value | Purpose |
---|---|---|---|---|
INFOBUTTON_TEXT | No | Yes | <string value> | The hint text to display in the target field |
INFOBUTTON_FIELDPOS | No | Yes | X,Y pair as a String | The position of the target field to display the hint text into. |
DEBUGMESSAGES | No | Yes | 'true' | 'false' | Enables/disables debugging to the Java Console for this instance of the control. |
DEBUGMESSAGES_ALL | No | Yes | 'true' | 'false' | Enables/disables debugging to the Java Console for all instances of the control. |