Monday, May 2, 2011

JRE Mixing Code Probem " Swing Tree"

as the first using for the JRE will be some of java beans that doesn't work with oracle jinitiator like ( Swing buttons , swing tree , Fully Gradient canvases ) , you may face some problems when trying to implement some of these java beans , this related to jar signing all jar files should be signed , the other problem is the java will raise the following exception " signer information does not match trust level of other classes in the same package"
you can overcome with this issue by setting one parameter in the java in the control panel

go to control panel ---> Java ---> advnced ---> Security --- Mixed code Security verification set its value to disable verification

Sunday, May 1, 2011

Using JRE instead Of Jinitiator to run Oracle Forms

as jinitiator have problems with windows 7 and of course the jinitiator have limited functionality rather than JRE , so you should think strongly replace your calling forms using JRE .
The most important motivator to do this is to know that you will do it very easy while still using the jinitiator in different config :
1- the first step is to create a new config section inside the formsweb.cfg as follow
baseHTML=basejpi.htm
baseHTMLJInitiator=basejpi.htm
baseHTMLjpi=basejpi.htm
baseHTMLie=basejpi.htm
# this parameter control the using of version
jpi_classid=clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA
# this parameter indicate a site specific place to download the jre to the client if the client doesn't already have the jre
# insalled on the client , note that the JREDownload should be defined as virtual directory , and # the exe file should# be existed on the physical location of the
jpi_codebase=http://168.169.1.66:52003/forms/JREDownload/jre16016.exe#Version=1,6,0,16
jpi_mimetype=application/x-java-applet;
jpi_download_page=/forms/jinitiator/us/jinit_download.htm
baseHTMLJInitiator=basejpi.htm
# The archive parameter will be used instead the archive_jini , but note the jar files should be #signed
archive=frmall.jar,frmall_jinit.jar,myappicons.jar
-------------------------------------------------------------------------------
in the forms.conf file you should add the following virtual directory
AliasMatch ^/forms/jre/(..*) "C:\DevSuiteHome_1/forms/jre/$1"
-----------------------------
the final step run your forms using the config jretest

Friday, April 29, 2011

Check Application Password Strength

here basic code to check the strength of your application password if you want to restrict the user by choosing strong password here we just check for the Mixing Characters and the length of the password , you can also append the checking of upper case and lower case mix that is means that the user must enter password that containing mixing case of characters (at least one upper case letter and at least one lower case letter)
create or replace function check_password_stren(p_password varchar2) return number is
0 means the password doesn't meet any requirement
1 means only meet the minimum length
2 means exceed the minimum length
4 means meet the lenght and mixed character and numbers
5 exceed the length and mixed character and numbers
v_min_len number(2):=10 ; --- variable according to your bussiness requirements
v_count number(2);
v_len number(5);
v_mix_state number(5);
begin
v_len:=length(p_password);
if v_len < v_min_len then
v_count:=0;
return v_count;
elsif v_len=v_min_len then
v_count:=1;
else
v_count:=2;
end if ;
v_mix_state:= nvl(length(translate(trim(p_password),'0123456789',' ')),0);
if v_mix_state =0 then ---- it is numbers only
v_count:=v_count+0;
elsif v_mix_state=v_len then -- it is characters only
v_count:=v_count+0;
elsif v_mix_state<>v_len then --- it is mix
v_count:=v_count+3;
end if ;
return v_count ;
end;

Friday, January 21, 2011

Create Encrypted PDF Report from oracle reports


some customers nowadays require to generate PDF reports from oracle that prevent the users from copying its contents or printing this document by the user , so this challenge of course need simple third party that encypt the pdf , but how to implement this soluiton into your application ?

- at first prepare this third party that is $27 ( very cheap ) and monitor one directory for example ( c:\temp) on the application server and make the target directory as any directory inside the apache\htdocs inside the application server , and make other configuration ( password require to open the document yes or no , allow printing yes or no , allow copying contents yes or no , ....)
- after that customize your calling of reports to handle the process , how ?
- before running the report check if the report is encrypted or not , if it is encrypted so make the report file destination to be on the monitored directory ,
after that generate random file name using random package.
- check if the job process is finished , if it is finished so ,create timer of 3 o4 4 seconds ( to allow the third party to finish process )
- after that use web.show_document to show the file (random name) from the target directory

--- note that if you use more than one application server you have to run the third party on each application server , and consider which report server is running to show the document from the right pache\htdocs directory

Wednesday, September 15, 2010

Scanning Documents


Actually , implementing Java code that scans document will take time and much efforts. However i find out a workaround solution that enables you to scan document from oracle forms. The solution is in JAVA SCRIPT.
So, we created a Simple HTML file with simple java script that call Twain.Twain is an exe file that scans documents whatever the scanner type is. So you can use it with any type of scanner and Digital Cameras.
The scenario goes like this:
1- create a table that contains two columns :program blob ,program_path varchar2.
2- upload the file TwainGui.exe to the table in "program " column. "program_path" column represents the path that the user should download the file to it.
3-create an icon or button like "download" in your main form to enable end user to download "TwainGui.exe" from your database.
4- copy the html "scan.html" to htdocs in your application server
5- invoke the html using Web.Show_Document from your application form.

open the scan.html file with notepad and search for "shell.run("
take care of the path in "shell.run(" it must be the same path in "program_path" column
download the file
and copy the content into D:\ drive and double click on scan.html

Tuesday, September 14, 2010

How to create Your PJC from scratch

firstly I would like to thank my brother and my best friend Haythem for his valuable participation in this blog.

Many forms developers are interested in PJC(pluggable Java component) . But most o the problem is how to implement a new Java bean. In this demonstration , I shall discuss in Arabic language a very simple implementation for Java bean in forms world. I hope you enjoy it.


this idea can be improved to be a drawing program that used for furniture manufacturer to read the dimension of the pieces from the database and output the result in graphic shapes.

Wednesday, April 21, 2010

Sample Demo For My Private Under Development Application

You can download these Demo presentation from the following link :
http://www.4shared.com/file/xmie15qz/haythem_application.html