Pages

Tuesday, June 21, 2016

Oracle Forms Developer & Webutil Configuration



Oracle Forms Developer & Webutil Configuration

ICONS SETTINGS (NOT Mandatory):
DEV_SUITE\forms\java\oracle\forms\registry\registry.dat
default.icons.iconpath=file:///C:\\icons (Not applicable for Application Server)
To show icons at design time go my computer properties go to tab advance and add environment variable at system variables

UI_ICON=C:\icons (Applicable for DEV_SUITE Only)
UI_ICON_EXTENSION =gif  (case sensitive) (Applicable for DEV_SUITE Only)

Make an entry in
DEV_SUITE\forms\server\forms.conf 
# Virtual path for ICONS (used to show icons in a form) AliasMatch ^/forms/icons/(..*) "C:\icons/$1"

Open Command Prompt
Set path=DEV_SUITE\jdk\bin;
command for jar file at dos prompt
go to c:\icons\ 
give this command to create jar icons file.
 jar –cvf icons.jar *.gif 
Where icons is name of folder


LOV SETTINGS 
DEV_SUITE\forms\java\oracle\forms\registry\registry.dat
app.ui.lovButtons=true.

FORMS PATH SETTINGS
Forms Path:
DEV_SUITE\forms\server\default.env
FORMS_PATH=DEV_SUITE\forms; D:\MyFolder;
Add new virtual form path other than dev_Suite/App_Server form path
Example: D:\MyFolder; (Note: The directory must be shared on Network)

Append this line FORMS_REJECT_GO_DISABLED_ITEM=FALSE,
After this FORMS_RESTRICT_ENTER_QUERY=TRUE

FORMS CONFIGURATION
Width and Height of explorer window which contains form ( Set these parameters according to your standards)

DEV_SUITE\forms\server\formsweb.cfg

Forms Size Setting
#Forms applet parameter
Width =100%
# Forms applet parameter
Height =100%

Hide oracle window in form (Not Applicable for Application Server)
#Otherparams
usesdi=yes

Hide window tool bar at explorer
separateFrame=true


Default Form Runtime Location (Applicable For Application Server)
#Forms runtime argument: which form module to run
form=login.fmx
# Forms runtime argument: database connection details userid=olplog/olplog@olpsys2

Icon Settings (To get icons from jar files) (Applicable for Application Server)

# Forms applet parameter
imageBase=codebase

Changing Key Function

DEV_SUITE\forms\fmrweb.res

9 : 0 : "Tab" : 1 : "Next Field"
 9 : 1 : "Shift+Tab" : 2 : "Previous Field"
 # 116 : 0 : "F5" : 3 : "Clear Field"
 38 : 0 : "Up" : 6 : "Up"
 40 : 0 : "Down" : 7 : "Down"
 33 : 0 : "PageUp" : 12 : "Scroll Up"
 34 : 0 : "PageDown" : 13 : "Scroll Down"
 69 : 2 : "Ctrl+E" : 22 : "Edit"
 10 : 0 : "Return" : 27 : "Return"
 120 : 0 : "F9" : 29 : "List of Values"
 115 : 0 : "F4" : 32 : "Exit"
 75 : 2 : "Ctrl+K" : 35 : "Show Keys"
 121 : 0 : "F10" : 36 : "Commit"
 118 : 1 : "Shift+F7" : 61 : "Next Primary Key"
 # 117 : 0 : "F6" : 62 : "Clear Record"
 117 : 0 : "F6" : 74 : "Clear Record"
 # 119 : 0 : "F8" : 74 : "Clear Form"
 38 : 2 : "Ctrl+Up" : 63 : "Delete Record"
 117 : 1 : "Shift+F6" : 64 : "Duplicate Record"
 40 : 2 : "Ctrl+Down" : 65 : "Insert Record"
 119 : 1 : "Shift+F8" : 66 : "Next Set of Records"
 1005 : 0 : "Down" : 67 : "Next Record"
 1004 : 0 : "Up" : 68 : "Previous Record"
 # 118 : 0 : "F7" : 69 : "Clear Block"
 66 : 2 : "Ctrl+B" : 70 : "Block Menu"
 34 : 1 : "Shift+PageDown" : 71 : "Next Block"
 33 : 1 : "Shift+PageUp" : 72 : "Previous Block"
 # 116 : 1 : "Shift+F5" : 73 : "Duplicate Field"
 # 116 : 1 : "Shift+F5" : 74 : "Clear Form"
 118 : 0 : "F7" : 76 : "Enter Query"
 # 122 : 2 : "Ctrl+F11" : 77 : "Execute Query"
 119 : 0 : "F8" : 77 : "Execute Query"
 112 : 1 : "Shift+F1" : 78 : "Display Error"


Webutil Configuration for DevSuit or AS
1-Copy webutil folder from DEV_SUITE/Forms to APP_SERVER/Forms
2- Copy frmwebutil.jar,forms_ie.js,forms_base_ie.js file from DEV_SUITE/Forms/Java To APP_SERVER/Forms/Java folder
3- Copy webutil.cfg, WebutilBase.htm, webutiljini.htm, webutiljpi.htm files from DEV_SUITE/Forms/Server folder to APP_SERVER/Forms/Server
4- Copy webutil.olb,Webutil.pll,webutil.plx files from DEV_SUITE/Forms folder toAPP_SERVER/Forms
Webutil Configuration
Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip and extract to a temporary staging area.
1)      Copy jacob.jar to DEV_SUITE\forms\java\
2)      Copy jacob.dll to DEV_SUITE\forms\webutil\
3)      Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt. Add DEV_SUITE \jdk\bin to the PATH:

     set PATH=DEV_SUITE\jdk\bin

Sign the files, and check the output for success:
DEV_SUITE\forms\webutil\sign_webutil DEV_SUITE\forms\java\frmwebutil.jar 
DEV_SUITE\forms\webutil\sign_webutil DEV_SUITE\forms\java\jacob.jar

4)       If you already have a schema in your RDBMS which contains the WebUtil stored code, you may skip this step.
Open DEV_SUITE/forms/create_webutil_db.sql in a text editor, then Copy it to a PLSQL editor   & compile it in to your required schema.
5)      Modify DEV_SUITE \forms\server\default.env, and append the below to the CLASSPATH entry:
DEV_SUITE\jdk\jre\lib\rt.jar;
DEV_SUITE\forms\java\jacob.jar;
WEBUTIL_CONFIG=/forms/server/webutil.cfg (If this entry not exists then add this)

6)      Modify DEV_SUITE \forms\j2ee\orion-web.xml , and append
         <virtual-directory virtual-path="/webutil"real-path="DEV_SUITE/forms/webutil" />

7)      WebUtil needs a single virtual directory to be defined in order to operate. This virtual directory is used to locate various operating system-specific files that WebUtil may need to download.

DEV_SUITE/forms/server/forms.conf

            Add the following line to the file
           # Virtual path for webutil
           AliasMatch ^/forms/webutil/(..*) DEV_SUITE /forms/webutil/$1"

8)      Modify DEV_SUITE \forms\server\formsweb.cfg insde [default] add :
(Note these line should be in this order to run webutil properly)

[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
#baseHTMLjinitiator=webutiljini.htm (UnMark this to use JINITIATOR instead of JRE)
baseHTMLjinitiator=webutiljpi.htm
baseHTMLjpi=webutiljpi.htm
baseHTML=webutilbase.htm
archive_jini=frmall_jinit.jar,icons.jar (For Jinitiator)
archive=frmall.jar,icons.jar (For JRE)
lookAndFeel=oracle
9)      DEV_SUITE\forms\server\webutil.cfg
            transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE


Sample Configuration Code:

Location: DevSuiteHome\forms\server\ formsweb.cfg

[TEST_WEB]
form=D:\WebuitilR2\planets_ole_excel_read.fmx
userId=username/pass@database
width=100%
height=100%
colorscheme=blue
lookAndFeel=oracle
pageTitle=Test Webutil :: Developed by Mr. ABC
#baseHTMLjinitiator=webutiljini.htm (For Jinitiator)
baseHTMLjinitiator=webutiljpi.htm
baseHTMLjpi=basejpi.htm
baseHTML=webutilbase.htm
#archive_jini=frmall_jinit.jar (For Jinitiator)
archive=frmall.jar,frmwebutil.jar,jacob.jar,icons.jar
separateFrame=false
WebUtilArchive=frmwebutil.jar,jacob.jar


Calling URL:

Start OC4J instance then run the url from explorer

http://IP_Address:8889/forms/frmservlet?config=test_web.

Run the form & enjoy!!!



Reference Link:
http://www.baigzeeshan.com/2010/01/open-file-dailog-box-example-using.html