Hello everybody,
Today i m going to show u how to add Java bean (Bean area) in Oracle forms 10g and if u want to write some bean for Oracle forms then following are the guidelines
In this Example (Download zip contains all files)
I will write a very very simple Bean In which i will set its value to System date Time and return it (working as global variable).
I used Oracle JDeveloper Studio 11.1.1.2.0.
Things to Remember:
- Whenever u write bean for Forms your class should extends VBean class which is available in frmall.jar $ORACLE_HOME/forms/java directory
- Copy frmall.jar to /lib directory in Jdeveloper installation directory.
Steps:
-Add frmall.jar in Jdeveloper Libraries so u can extend VBean class.
- Write bean code in Jdeveloper (In my example i have created SETMYTIME and GETMYTIME to set and get the value of MyDate string)
-Create a deployment profile JAR type in Properties on the project
- Deploy it using JAR file to $ORACLE_HOME/forms/java or ur application server path.
- Provide ur JAR file name in configuration section archive=frmall.jar,FormProperties.jar in
$ORACLE_HOME/forms/server/formsweb.cfg file
Note: use archive_jinit if u r using Jinitiator plugin
- Create Bean Area in Forms.
- Set its Implementation class property with the fully classified name and path of your bean i.e oracle.forms.custombean.TimeBean in my example.
- You can use SET_CUSTOM_ITEM_PROPERTY procedure to set the Custom events properties to the bean
Thanks Mr.Francois Degrelle for adding this
Make sure the Jar file is signed simple way to sign by using sign_webutil.bat
"C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat C:\DevSuiteHome_1\form\java\FormProperties.jar"
This example is very simple but i hope it would help somebody to understand the basics about Writing and using Java Beans for Oracle forms.
Next time i will try to come with some advance example Till then .......
Cheers,
Baig
Today i m going to show u how to add Java bean (Bean area) in Oracle forms 10g and if u want to write some bean for Oracle forms then following are the guidelines
In this Example (Download zip contains all files)
I will write a very very simple Bean In which i will set its value to System date Time and return it (working as global variable).
I used Oracle JDeveloper Studio 11.1.1.2.0.
Things to Remember:
- Whenever u write bean for Forms your class should extends VBean class which is available in frmall.jar $ORACLE_HOME/forms/java directory
- Copy frmall.jar to /lib directory in Jdeveloper installation directory.
Steps:
-Add frmall.jar in Jdeveloper Libraries so u can extend VBean class.
- Write bean code in Jdeveloper (In my example i have created SETMYTIME and GETMYTIME to set and get the value of MyDate string)
-Create a deployment profile JAR type in Properties on the project
- Deploy it using JAR file to $ORACLE_HOME/forms/java or ur application server path.
- Provide ur JAR file name in configuration section archive=frmall.jar,FormProperties.jar in
$ORACLE_HOME/forms/server/formsweb.cfg file
Note: use archive_jinit if u r using Jinitiator plugin
- Create Bean Area in Forms.
- Set its Implementation class property with the fully classified name and path of your bean i.e oracle.forms.custombean.TimeBean in my example.
- You can use SET_CUSTOM_ITEM_PROPERTY procedure to set the Custom events properties to the bean
Set_Custom_Property('BeanArea', RecordNo, PropertyName,value);- Use GET_CUSTOM_ITEM_PROPERTY to get the value of that property.
Result := Get_Custom_Property( 'BeanArea', recordNo , PropertyName );-Run the form Press Set Time to bean Button and then Press Get Time from Bean button Result item will display the time when u have pressed the Button :)
Thanks Mr.Francois Degrelle for adding this
You can avoid this Design time message by adding the full classname to your FORMS_BUILDER_CLASSPATH variable
Make sure the Jar file is signed simple way to sign by using sign_webutil.bat
"C:\DevSuiteHome_1\forms\webutil>sign_webutil.bat C:\DevSuiteHome_1\form\java\FormProperties.jar"
This example is very simple but i hope it would help somebody to understand the basics about Writing and using Java Beans for Oracle forms.
Next time i will try to come with some advance example Till then .......
Cheers,
Baig
Hi Baig,
ReplyDeletevery nice post, exactlly what i am looking for.
Only one problem: the download link doesn't work (i get a message "the link is false".
can u fix this ?
Hi Baig,
ReplyDeleteI am really impressed with this article, but the link given in this post is not working.
Please give a different link.
Thanks
Akshat
sorry guys that 4shared is now disabled. i am adding a reminder to myself to upload the sample to my google code account.
ReplyDeletethank you for your patience
ZB
Hi, Zeeshan Baig, I am interested in your code, but the download link is even broken. Thanks if you can fix it, please.
DeleteHi Baig,
ReplyDeleteThanks for the post, this is exactly what I am looking for, is it possible to give us an alternate link for the download?
Many thanks!
Hi Baig
ReplyDeleteNice tutorial and thanks. Does a Java bean used in Oracle Forms11.2 also require Vbean to be the parent class and have frmall.jar in its class path.
Thanks in advance
Hi Janaki,
DeleteI am not sure. I have stopped using Forms 7-8 years ago.
Regards,
Zeeshan
thanks for sharing your blog
ReplyDelete