
The Java code
JTextFieldIcon.java
The implementation class of the Bean Item
oracle.forms.fd.JTextFieldIcon
The methods you can call
Set the image name
Set_Custom_Property('BLOCK.ITEM', 1, 'SETCURSOR', 'image_name');
Set_Custom_Property( 'BL.BEAN', 1, 'SETBLINKRATE', 'milliseconds' ) ;
This behaviour could be easily applied to other kind of items, like Command buttons for instance.
The Java code
BlinkTextField.java
The implementation class of the Text Item
oracle.forms.fd.BlinkTextField
The methods you can call
Set_Custom_Property( 'BL.BEAN', 1, 'SETFGCOLOR', 'r,g,b' ) ;
Set_Custom_Property( 'BL.BEAN', 1, 'SETBGCOLOR', 'r,g,b' ) ;
Set_Custom_Property( 'BL.BEAN', 1, 'START', '' ) ;
Set_Custom_Property( 'BL.BEAN', 1, 'STOP', '' ) ;
The sample dialog
. Download the blink.zip file
. Unzip the files
. copy the blink.jar file in the
. Edit your /forms/server/formsweb.cfg file to add the jar file
. Open the BLINK.fmb module (Oracle Forms 9.0.2)
. Compile all and run the module

It allows to have a coherent behaviour in a multi-record table for items that record number are greater than the number of records displayed.
In the standard way, you can set an Implementation Class to a PJC that extends the corresponding Forms item type (VTextField in this example), but you cannot use the Set_Custom_Property() built-in on a record number greater than the number of records displayed block's property.
For instance, it this property is set to 10 (ten records displayed by the block), the following instruction will raise an error:
Set_Custom_Property( 'BL.TEXT_ITEM', 11, 'SET_PROPERTY', '...' );
This is a problem because you cannot use a PJC on a multi-record block if the number of records fetched or created is greater than then number of records displayed.
This PJC can be used in this case because it holds a table of objects for each PJC's instance.
You can use it to give each record a special color (without having to use the Set_Item_Instance_Property() built-in with tens of visual attributes), or also have one different hint and tooltip for each record (which is not possible in standard).
How it works:
Within the PJC:
each PJC's instance (10 in this example) can handle 0 to n physical records.
You can see, on the screenshot above that the first line displays the record #9. If you scroll the block, it would display the 10th, then the 11th, and so on.
So, each PJC instance hold a table of objects. Each physical record must have a corresponding object in this table.
In this sample, each object contains the following values:
. tooltip
. hint
. background color
. foreground color
. int value
. float value
. string value
The methods you can get Varchar2 := Get_Custom_Property( 'BL.TEXTITEM', disp_rec, 'GET_HINT' ) ; . Download the pjcmultirec.zip file
Within the Forms module:
The trick is to re-draw all the displayed items (the page set) with their corresponding values.
This job is done in the When-New-Item-Instance block-level trigger:
Declare
LN$Pos pls_integer ;
LN$Max pls_integer := Get_Block_Property( :system.current_block, RECORDS_DISPLAYED) ;
LN$Top pls_integer := get_block_property( :system.current_block, TOP_RECORD) ;
Begin
---------------------------------------------------
-- Calculate the cursor position in the page set --
-- cannot be greater than the number --
-- of records displayed --
---------------------------------------------------
If LN$Top > 1 Then
LN$Pos := :system.cursor_record - LN$Top + 1 ;
Else
LN$Pos := :system.cursor_record ;
End if;
--------------------------------
-- Handle the graphic aspects --
-- for the entire page set --
--------------------------------
For i In 0 .. LN$Max-1 Loop
Set_Custom_Property('BL.TXT', i+1, 'PAINT_RECORD', to_char(LN$Top+i) );
End loop ;
End;
The Java code
MultiTextField.java MultiProps.java
The implementation class of the Text Item
oracle.forms.fd.MultiTextField
The methods you can call
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_NEW_REC', 'num_record' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_FGCOLOR', 'num_rec,r,g,b' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_BGCOLOR', 'num_rec,r,g,b' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_HINT', 'num_rec,hint_text' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_TOOLTIP', 'num_rec,tooltip_text' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_INT_VALUE', 'num_rec,int_value' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_FLOAT_VALUE', 'num_rec,float_value' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_CHAR_VALUE', 'num_rec,char_value' ) ;
Set_Custom_Property( 'BL.TEXTITEM', disp_rec, 'SET_INDICE', 'physical_record_number' ) ;
Varchar2 := Get_Custom_Property( 'BL.TEXTITEM', disp_rec, 'GET_TOOLTIP' ) ;
Varchar2 := Get_Custom_Property( 'BL.TEXTITEM', disp_rec, 'GET_INT_VALUE' ) ;
Varchar2 := Get_Custom_Property( 'BL.TEXTITEM', disp_rec, 'GET_FLOAT' ) ;
Varchar2 := Get_Custom_Property( 'BL.TEXTITEM', disp_rec, 'GET_CHAR' ) ;
The property is read for the physical record number indicated by the SET_INDICE property, so you have to set this property before.
e.g. :
-------------------------------------------------
-- Get the hint of the current physical record --
-------------------------------------------------
Set_Custom_Property('BL.TXT', LN$Pos, 'SET_INDICE', to_char(:system.cursor_record) );
Message(Get_Custom_Property('BL.TXT', LN$Pos, 'GET_HINT' ));
The sample dialog
. Unzip the files
. copy the multirecord.jar file in the
. Edit your /forms/server/formsweb.cfg file to add the jar file
. Open the PJCMULTIREC.fmb module (Oracle Forms 9.0.2)
. Compile all and run the module
Purpose
This PJC is a workaround
to the issue defined in the bug 3867157 on Metalink.
It allows having the same behaviour on the Web that the one it has on the C/S version. The When-List-Changed trigger would fire only when the mouse is clicked or when the Enter key is pressed, but not when the end-user types a letter to filter the list.
It is a PJC so that you do not need any Bean Area. Just fill the Implementation Class of your existing List Item.
The Java code
PopList.java
The implementation class of the List Item
oracle.forms.fd.PopList
The methods you can set
SET_CASE_SENSITIVE
By default, the poplist is case sensitive, but you can set it not sensitive.
Set_Custom_Property( 'BL.BT', 1, 'SET_CASE_SENSITIVE','false');
SET_LOG
Set_Custom_Property( 'BL.BT', 1, 'SET_LOG','true');